ducksunlimited

ArcGISTiledMapServiceLayer overlays ArcGIS Online Basemaps

Discussion created by ducksunlimited on May 16, 2014
Latest reply on May 20, 2014 by kenbuja
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]);

Outcomes