标签:blog http io for ar div amp line
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
标签:blog http io for ar div amp line
原文地址:http://www.cnblogs.com/rockman/p/3917438.html