Having a problem with CenterAndZoom

380
2
Jump to solution
05-23-2013 01:56 PM
TylerRothermund
New Contributor II
I'm having a strange problem with CenterAndZoom not working

var point = esri.geometry.geographicToWebMercator(new esri.geometry.Point(-98.5795, 39.8282));
                    map.centerAndZoom(point, 5);


The above code will work fine for this map
http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer

But not for this one,  the map never makes any network calls for the imagery
http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer


Both maps have the same spatialreference. 
Any ideas???
0 Kudos
1 Solution

Accepted Solutions
derekswingley1
Frequent Contributor
0 Kudos
2 Replies
derekswingley1
Frequent Contributor
That map services have different spatial references.

http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer

Spatial Reference: 102100 (3857)


http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer

Spatial Reference: 4326
0 Kudos
TylerRothermund
New Contributor II
0 Kudos