Select to view content in your preferred language

Dynamic Layer + Basemap Layer

943
1
08-10-2010 05:25 PM
RichardKing
New Contributor
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.
0 Kudos
1 Reply
HaroldBostic
Frequent Contributor
Hello,

You should be able to add a dynamic map on top of any base map as the first map added defines the spatial reference.  With that said, if you dynamic map service is not in the sampe sr and the first map added, then you will not be able to zoom to your dynamic map service extent unless you convert the coords to the correct sr.  You could leave your underlying data in SP and make the data frame match Bing Map SR, then publish that as a map service.

You can't add your dynamic map first because tiled services can't be reprojected on the fly, but you could load a cached map service as a dynamic layar, but that would defeat the purpuse and is highly not recommended.
0 Kudos