Reputation: 6381
I am implement Google Map in Android , and I got the Latitude
and the Longitude
via onMapClick
like the following code.
public void onMapClick(LatLng latLng) {
Log.d(TAG,"latLng.latitude = " + latLng.latitude);
Log.d(TAG,"latLng.longitude = " + latLng.longitude);
}
But it did not have Altitude data.
Q1: How to get the Altitude of position which I click on the Google Map?
or
Q2: How to get the Altitude via known Latitude and Longitude ?
Thanks in advance.
Upvotes: 2
Views: 5818
Reputation: 772
You can make an HTTP call to the Google Maps Elevation API, documented at https://developers.google.com/maps/documentation/elevation/intro. I don't believe that there is native Android client library for this API. You can make a request including latitude/longitude and receive elevation information in the response.
Upvotes: 1