how to set zoom level in 25km in google map?
I woul开发者_开发百科d like set my google map zoom level 25km. How it will be set my google api map please help me
Regards,
You may want to check the documentation first.
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
The second parameter should be the zoom level.
I thinks it's not such weird question, assuming he read the documentation, and knows he can set the zoomlevel in a ratio. This ratio is a kind of weird choice... it depends on the initial chosen bounds, and not very intuitive in that matter.
Here lies maybe the answer, you could define 2 points around the point you want to show, one northwest of the point (distance 12,5 km.) and 1 point southwest (also 12,5 km disctance). Than create bounds with this points and zoom to this bound.
A lot of coding, but it can be done.
So you should consider whether you want this, or just choose a proper inital zoomlevel.... (in ratio, not in km)
精彩评论