ArcGIS Api for Js基础

1、创建ArcGISDynamicMapServiceLayer

    var demographicsLayerURL = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer";
             var demographicsLayerOptions = {
                 "id": "demographicsLayer",
                 "opacity": 0.8,
                 "showAttribution": false
             };
             var demographicsLayer = new ArcGISDynamicMapServiceLayer(demographicsLayerURL, demographicsLayerOptions);
             demographicsLayer.setInfoTemplates({
                 1: { infoTemplate: _blockGroupInfoTemplate },
                 2: { infoTemplate: _countyCensusInfoTemplate }
             });
             demographicsLayer.setVisibleLayers([1, 2]);
             map.addLayer(demographicsLayer);

             var oilAndGasLayer = new ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Petroleum/KGS_OilGasFields_Kansas/MapServer", {
                 "id": "oilAndGasLayer",
                 "opacity": 0.75
             });
             oilAndGasLayer.setInfoTemplates({
                 0: { infoTemplate: _oilAndGasInfoTemplate }
             });
             map.addLayer(oilAndGasLayer);

  

ArcGIS Api for Js基础,布布扣,bubuko.com

ArcGIS Api for Js基础

上一篇:git基本操作(笔记)


下一篇:NSD WINDOWS--2014.8.11