views:

150

answers:

2

I need to calculate the bounds of a map given center and zoom level.

I imagine I could temporarily set map center and zoom and call map.getBounds(), but I would prefer not to (I would need to disable/re-enable a few event handlers).

Does anybody know how to do this in v3?

A: 

What is your use case here?

You can calculate this in the v2 API:

map.getBoundsZoomLevel(bounds);

However there is no way to do it in the v3 API.

broady
Thanks, broady - I know the v3 API has no built-in method for doing that :) The use case would be a bit complicated too explain, but in the end I just need to convert {center, zoom} to a LatLngBounds object... anyway I'm halfway there now: I'll post on any success I get (when I have time to come back to that google map project)
giorgiga