Re: [Google Maps API v3] LatLngBounds extend bug?

2011-08-19 Thread DiTieM
Thanks a lot! It makes sense now. Pity I had to learn this in the painful way. Regards, David -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-m

Re: [Google Maps API v3] LatLngBounds extend bug?

2011-08-19 Thread Ben Appleton
This is because longitudes wrap around at -180 = 180 degrees. Focusing just on the longitudes: 1 - First you add the point -56 2 - Then you add the point -118. The bounds are now [-118, 56]. 3 - Lastly you add the point 126. The smallest bounds containing 126 and the previous bounds is [126, -56],

[Google Maps API v3] LatLngBounds extend bug?

2011-08-19 Thread DiTieM
Just got this simple test case: var bounds = new google.maps.LatLngBounds( ) ; bounds.extend( new google.maps.LatLng( -34, -56 ) ) ; bounds.extend( new google.maps.LatLng( 34, -118 ) ) ; bounds.extend( new google.maps.LatLng( 25, 121 ) ) ; console.log( [ bounds.getSou