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):

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?

FYI, the code in the second link is virtually identical to the sample code found here:

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