ArcGISTiledMapServiceLayer overlays ArcGIS Online Basemaps

833
3
05-16-2014 10:37 AM
ducksunlimited
New Contributor
Hi all, I just started JS API so forgive me this newbie question. What I want to do is trying to overlay a tiled layer on top of the AGS online satellite basemap, but when i run the app, the tiled layer didn't show up. However, when I tried to display the tiled layer only, it showed up. What's the problem here? below are the codes. By the way, the tiled layer has the same projection as the basemap.

      //Define a new map
      map = new Map("map", {
        zoom: 7,
basemap: "satellite",
extent: bounds
      });

      //Define a base layer
      var baseLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://gis.123.com/arcgis/rest/services/State_Province_County/MapServer");

     //Add layers to the map
     map.addLayers([baseLayer]);
0 Kudos
3 Replies
KenBuja
MVP Esteemed Contributor
Does the Tiled Service have the same Levels of Detail (LODs) as the standard basemaps? If not, then you won't be able to display both at the same time. Compare the LODs of your service with one of the basemaps (like this).
0 Kudos
ducksunlimited
New Contributor
Thanks Ken for your reply.

Do you mean the number of LODs have to match between two tiled services for display? or as long as the LODs in my tiled service are included in the AGS online base map, it would work? You know our tiled service is at county level instead of world-wide.

Does the Tiled Service have the same Levels of Detail (LODs) as the standard basemaps? If not, then you won't be able to display both at the same time. Compare the LODs of your service with one of the basemaps (like this).
0 Kudos
KenBuja
MVP Esteemed Contributor
The number of LODs don't have to match, but the resolution and scale have to match.

For example, I have created a tiled service that doesn't have all the LODs of the Ocean basemap, but if you look at the scale and resolution of the different levels, you'll see that they match (Level 0 in my service and Level 12 on the Ocean service have a scale of 144447.638572 and a resolution of 38.2185141425366). You can limit the number of LODs that the user can zoom to on your map, as shown in this sample.
0 Kudos