Set Map Extent with layers with different wkid

572
1
Jump to solution
04-08-2014 06:40 AM
JimBridge
Occasional Contributor
I have a map with a spatial reference of 102748 (2285) and want to use
http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer as a background layer. This map has a wkid of 4326  (4326) .

Once I've added them I want to zoom to my map with the wkid 4326.

I'm adding the layers   map.addLayers([backgroundMapLayer, LinkedMap]); //      map.addLayers([102748 , 4326]);

What should I be using to the map extent. I've tried using the linkedMap full exent min/max xy coordinate and wkid of 102746.
I've also tried to set it to background min/max xy coordinate and wkid of 4326
I've then tried to zoom the map and get the whole world ( I can manually zoom and center and see my map layer over the base map in the correct place) or 0,0 off of Africa.

If someone could explain to me what I should be setting my initial map extent so when I run  map.setZoom or   map.centerAndZoom(map.getLayer("baseLayer").fullExtent.getCenter(), 5) it zooms to where my map I'd appreciate it.

I'm believe I'm missing how I reconcile the different wkid.

Thanks

Jim
0 Kudos
1 Solution

Accepted Solutions
JimBridge
Occasional Contributor
Not sure why it wouldn't zoom but realized the 2d service is on extended support and changed to the world street map and everything worked fine as is.

http://www.arcgis.com/home/item.html?id=3b93337983e9436f8db950e38a8629af

Thanks
Jim

View solution in original post

0 Kudos
1 Reply
JimBridge
Occasional Contributor
Not sure why it wouldn't zoom but realized the 2d service is on extended support and changed to the world street map and everything worked fine as is.

http://www.arcgis.com/home/item.html?id=3b93337983e9436f8db950e38a8629af

Thanks
Jim
0 Kudos