Dynamic Layer + Basemap Layer

Discussion created by rking9 on Aug 10, 2010
Latest reply on Aug 13, 2010 by hbostic
I would like to take one dynamic map service and put it on top of an ESRI or Bing basemap.  I have only been able to make this work by manually specifying the spatialReference and Extent of my dynamic layer.  Then I add the basemap layer first and then my dynamic layer.  I see in the API reference that the DynamicMapServiceLayer class has "spatialReference" and "initialExtent" properties.  However, these always seem to be null.

Maybe I am approaching this the wrong way, I simply want to be able to combine any dynamic map service with a basemap layer and not have to specify the extent or spatial reference.   I want it to zoom to the initial extent of the dyamic map service.  My dynamic map services typically use a state plane coordinate system.  I am using ArcGIS 10 Server Workgroup Standard.  I am coding in the Javascript API.