garethmann

Spatial reference issue with 2 layers and setting the map's initial extent.

Discussion created by garethmann on Oct 31, 2011
Latest reply on Oct 31, 2011 by hzhu
I am trying to put two layers in the map. One layer is my own data served from our ArcGIS Server instance, the other one is the ESRI world street basemap layer. The two layers overlay on top of each other perfect (i.e. my data appears over the street map exactly where it is supposed to):
http://www.northmiamicra.org/testjsapi.html

However, when I try to set the initial extent of the map to be the initial extent of my own data (North Miami, Florida), it does zoom to the initial extent of my data, but for some reason it overlays it with the World Street Map in Nigeria! Why is this happening?
http://www.northmiamicra.org/test2layers.html

FYI, the code in the second link is virtually identical to the sample code found here:
http://help.arcgis.com/en/webapi/javascript/arcgis/demos/map/map_setextent.html

The only thing I changed in the sample code was that I removed the geographicToWebMercator function because my data is already in Transverse Mercator.

Outcomes