When I receive a geocode response from the GeoCode service from Google, it contains a recommended viewport describe as Lat/Lng pairs.
How can I zoom in/out to the recommended viewport ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The answer to this problem is to use MapController.zoomToSpan(…).
Find the difference between the North/East coordinates and the South/West coordinates and then call the zoomToSpan method.
Fuller description can be found here Getting map zoom level for given bounds on Android like on JS Google Maps API: map.getBoundsZoomLevel(bounds) in user640688 posting.