1、4.x 多了MapView,地图在MapView中显示
4.x
var map = new Map({
basemap: "streets"
});
var view = new MapView({
container: "viewDiv",
map: map,
center: [-85.050200, 33.125524],
zoom: 6
});
<div id="viewDiv"></div>
3.x
map = new Map("map", {
extent: extent,
center: [-85.050200, 33.125524],
zoom: 13
});
<div id="map"></div>
2、layer发生变化,除了增加一些新layer之外,以前的如ArcGISDynamicMapServiceLayer被新的MapImageLayer取代。
3、操作layer的方式发生变化,具体可以查看其api,如添加新图层
4.x
var streetMap = new MapImageLayer("http://localhost:6080/arcgis/rest/services/Network/MapServer");
map.layers.add(streetMap);
3.x
var streetMap = new ArcGISDynamicMapServiceLayer("http://localhost:6080/arcgis/rest/services/Network/MapServer");
map.addLayer(streetMap);