Reputation:
When I close my map or switch a different activity, the map calls the onSaveInstanseState(). I want to get the current camera position and LatLng so that when the user switches back to the map, they will be in the same location.
Thank you.
Upvotes: 1
Views: 251
Reputation: 13668
Google Maps have a getCameraPosition() method.
To get the latLang, you simple have to get the camera position then get the target. Such as:
LatLang latlang = googleMaps.getCameraPosition().target
Upvotes: 1