Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an ESRI Javascript API application that uses a local Map Service with various feature layers. Now I need to add Imagery or top maps from ArcGIS online as base maps.

I am trying the following. First two lines add layers from my local map service. Then I am trying to add topo map. When I do this I can't see any topo layers on the map. If I comment out code adding from local map service, I can see topo layers.

Is there something I need to do to mashup layers from different map services?

layer = new esri.layers.ArcGISDynamicMapServiceLayer(mapServiceURL);

        var layer1 = new esri.layers.ArcGISTiledMapServiceLayer("");

Thanks Cyril

share|improve this question
What projection is your local map service in? Also, add the basemap first, then add your data layers. – Mintx May 8 '13 at 20:48
The coordinate system of my map service is 4267 and that of TileMapService that I am trying to add is 102100 (3857). How do I reproject the TileMapService? The constructor does not have SpatialReference. – Cyril May 9 '13 at 1:12
After doing some research it seems that the spatial reference of first added layer will be the spatial reference of them map. But I wish to have the spatial reference of my map service (4267) as the spatial reference of the map. Because I have some tools that add polygon graphics to map. Currently the polygons are created from featureclasses that are used in the map service and they correctly align with the layer. – Cyril May 9 '13 at 1:37
@Cyril: What you want cannot be done. If you add an tiled layer, the map has to be in the same projection as that. your overlay layers should be projected to 3857 – Devdatta Tengshe May 9 '13 at 3:13
Thanks Devadatta, I just figured that out. I created a test mxd in Web Mercatert and published it. This layer was correctly showing up over the ArcGIS Online layer. So I will have to create my map service in Web Mercarter. – Cyril May 10 '13 at 0:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.