jsn

Sample to show my specific map service

Discussion created by jsn on Sep 27, 2013
Latest reply on Sep 27, 2013 by zj_zou
I am looking for a sample that shows my own map service, using the new AMD style and syntax .

Thanks


This is the code I have with the old sysntax.

dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.AccordionContainer");
dojo.require("esri.map");

var myMap;    // global variable representing the map

function init() {
 var initialExtent = new esri.geometry.Extent({"xmin":-13050590.679808607,"ymin":3848824.1306140213,"xmax":-13033430.566958608,"ymax":3863366.2752452563,"spatialReference":{"wkid":102100}});
 myMap = new esri.Map("mapDiv", {extent:initialExtent});
 var baseLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
 var opLayer1 = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/NetworkAnalysis/SanDiego/MapServer",{ opacity:0.8 });
 myMap.addLayers([baseLayer, opLayer1]);
}


dojo.addOnLoad(init);

Outcomes