Issue
I know the span of the latitude and longitude that I want to have included in my view. I do not want to use zoomToSpan(), I want to use animateTo(). Is there a way to determine what the zoom level of the map will be, before actually getting to that location? Basically convert the bounds of the span into a zoom level?
Solution
Here's one way to reverse-engineer it:
1.) Create a test app with a mapview and record the span values for each zoom level (using Logcat).
2.) In your real app, create a HashMap from span values to zoom level and populate it with the data you've collected in Step 1.
3.) So now, all you have to do is figure out what zoom value does your required span value correspond to and this can be done efficiently by doing a look up using the HashMap created in Step 2.
Answered By - Vishwa Patel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.