dexconor

Cannot add ArcGISTiledMapServiceLayer on my map

Discussion created by dexconor on Feb 28, 2014
Latest reply on Mar 5, 2014 by jskinner-esristaff
Hi all,

function init() {
        var initExtent = new esri.geometry.Extent({"xmin":1076363,"ymin":3109863,"xmax":1084228,"ymax":3113690,"spatialReference":{"wkid":32139}});
        var popup = new esri.dijit.Popup({
          fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.25]))
        }, dojo.create("div"));
  center = [-90.3378, 39.6177];
  zoom = 14;
        map = new esri.Map("map",{
   basemap: "topo",
   infoWindow:popup,
   center: center,
   zoom: zoom,
   sliderStyle: "large"
        });
        
        dojo.connect(grid, "onRowClick", onRowClickHandler);
  
        var basemap = new esri.layers.ArcGISDynamicMapServiceLayer("http://localhost:6080/arcgis/rest/services/bt/beta_OnlineMap_Topo/MapServer");

  var imageParameters = new esri.layers.ImageParameters();
        imageParameters.layerIds = [0,1,2,3,4,6,8];
        imageParameters.layerOption = esri.layers.ImageParameters.LAYER_OPTION_HIDE;
        Vlayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://localhost:6080/arcgis/rest/services/bt/beta_MapInfo/MapServer", {"imageParameters":imageParameters});
  map.addLayers([basemap,Vlayer]);



where var basemap=
I added
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://localhost:6080/arcgis/rest/services/bt/beta_OnlineMap_Topo/MapServer");


but entire map didn't work

what did I do wrong?

dojo.require("esri.layers.TiledMapServiceLayer");

is in the code as well

Outcomes