john.c.cartwright

zoom to extent which crosses 180

Discussion created by john.c.cartwright on Jun 18, 2011
Latest reply on Jun 22, 2011 by john.c.cartwright
Hello All,

I'm using the web mercator projection and wrapAround180 option to provide seamless panning across the antimeridian.  I would like to set the extent of the map to an area which in geographic coordinates would cross the antimeridian, e.g.


var bbox = new esri.geometry.Extent(175.0,15.0,-175.0,25.0, new esri.SpatialReference({ wkid:4326 }));
map.setExtent(esri.geometry.geographicToWebMercator(bbox),true);

However this does not work, centering instead on central Africa and setting the zoom level to the maximum.

Can someone please suggest the appropriate way to do this?

Thanks!

--john

Outcomes