| Issue 1757: | Bug: fitBounds() doesn't work across the 180 meridian | |
| 2 people starred this issue and may be notified of changes. | Back to list |
I would have expected the following : var bounds = new google.maps.LatLngBounds(new google.maps.LatLng(- 35, 170), new google.maps.LatLng(-45, -170)); console.log(bounds.toSpan().lng()) // 20 gmap.fitBounds(bounds); to zoom the map in to roughly fit New Zealand. Instead I get an extremely zoomed-out map, showing the entire world. The bounds variable in my example appears to be successfully set up to be a rectangle crossing the 180 longitudinal meridian (note the span has a longitude of 20 degrees), but fitBounds ignores this and seems to try to fit the very wide rectangle starting at -170, and taking the long way round to get to +170. Is this a known problem?
Oct 7, 2009
(No comment was entered for this change.)
Status:
FixedNotReleased
Oct 15, 2009
(No comment was entered for this change.)
Status:
Fixed
Labels: Fixed-18 |
|
| ► Sign in to add a comment |
Labels: Internal-2168456