需要引入esri-leaflet.js
github:https://github.com/esri/esri-leaflet
百度盘下载:http://pan.baidu.com/s/1nt0S2JR
L.esri.basemapLayer("Streets").addTo(map);//此行可行 //ArcGIS Server Dynamic Map Service, Historic Hurricane Tracks dynLayer = L.esri.dynamicMapLayer(kaifaqu, { opacity: 1, layers: [0, 1] }); map.setView([30.60, 119.65], 9); //浙江 http://www.cnblogs.com/wangcan/来自(http://www.cnblogs.com/wangcan/)
需要引入shapefile.js
github:https://github.com/calvinmetcalf/shapefile-js
百度盘(shp.min.js下载后引入即可):http://pan.baidu.com/s/1hq5MuDe
//添加shapefile function addShapeFile() { map.setView([34.74161249883172, 18.6328125], 2); var geo = L.geoJson({ features: [] }, { onEachFeature: function popUp(f, l) { //console.info(f); var out = []; if (f.properties) { for (var key in f.properties) { out.push(key + ": " + f.properties[key]); } l.bindPopup(out.join("<br />")); } } })//.addTo(map); //保存到 图层数组 map_layers.push(geo); //此处指向shapefile的zip文件即可 var base = 'files/bou1_4m.zip'; shp(base).then(function(data) { console.info(data); geo.addData(data); }); }