Hi,

Could you post that to a publicly accessible url?  I'd like to debug
it for myself.

Thanks
Ben

On Dec 4, 5:23 pm, "d.bun" <[email protected]> wrote:
> the reference says LatLngBounds (SouthWest-Corner, NorthEast-Corner);
> However when I try in that format to fitBounds - it doesn't work
> properly.
> However when I switch to LatLngBounds (NorthEast-Corner, SouthWest-
> Corner),
> Fit Bounds works properly.
> Also latlngbounds.getNorthEast, and latlngbounds.getSouthWest -
> returns the opposite corners.  So getNorthEast returns the SouthWest
> Corner.
>
> Maybe I'm doing something...
>
> var new_icon = 'icon.png'
> google.maps.event.addListener(map, "click", function(event){
>          var swCorner =                 new 
> google.maps.LatLng(event.latLng.lat
> ()-1,event.latLng.lng()+1);
>          marker =                         new google.maps.Marker
> ({map:map, position:swCorner, icon: new_icon});
>          var neCorner =                 new 
> google.maps.LatLng(event.latLng.lat()
> +1,event.latLng.lng()-1);
>          marker =                         new google.maps.Marker({map:map,
> position:neCorner});
>          var searchBounds =     new 
> google.maps.LatLngBounds(neCorner,swCorner);
>          map.fitBounds(searchBounds);
>          if (searchBounds.getNorthEast() == swCorner){alert('oh
> snap!')};
>          if (searchBounds.getSouthWest() == neCorner){alert('double
> whoops!')};
>     });
>
> I used different icons just to be sure I wasn't 100% imagining things,
> if I am this is kind of embarrassing. : )

--

You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Reply via email to