android - How to set zoom level of a Google map according to marker locations -


i have placed 2 markers on google map. 1 in usa , other 1 somewhere in asia. google gives zoom levels 1, 2, 3, 4, 5, 6, etc.

i don't want hard-code zoom level. how can display markers depending upon distance? i.e. if 2 items close each other or in same city, close zoom level should used, , if they're far apart, maximum zoom level should used.

what using generate maps? i'm making use of gmap2 api in project of mine 8 months back, , looks had call 'gdirections(map{{div}});' on, well, map div in order display route between 2 locations, , adjust level of zoom appropriately.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -