As we all know, there is a function named Calculate.getPointXY() which can calculate the screen point by map point. If there are many map points, we can easily find our the great distance in lat and lon, and got the center of all these points. When they converted to screen point and we also have the screen width and screen height, think becomes easy. A zoom in level just div the distance(pixels) by 2 and a zoom out multiple it. so we can find out the new level by current level.
Maybe i should update my project with this feature :P AD: Welcome to my project sharepath on google code. On 4月7日, 下午12时42分, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello everyone, > I want to get the zoom number from a distance. > For instance, > > int distance = 999; > > Now, how could I calculate the amount of zoom needed so I can see all > of these 999 miles on the map? > Ex. > > int distance = 999; > MapView mMapView = new MapView(this); > MapController mc = mMapView.getController(); > //let's say that I calculated that the amount of zoom is 10 > //here I need to actually calculate this > mc.zoomTo(10); > > Thanks, > Noam. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

