1.MapView和SceneView
2.Map中图层的分组
2.1Ground layers地形图层
API : Map.ground
2.1.1使用默认ground实例
const map = new Map({
ground: 'world-elevation'
})
2.1.2使用自定义Ground实例
const customElevation = new ElevationLayer({
url:'heep://may.server.com/arcgis/rest/service/MyElevationService/ImageServer'
})
const customGround = new Ground({
layers: [customElevation]
})
const map = new Map({
ground: customGround
})
2.1.3设置背景色
map.ground.surfaceColor = '#004C73'
示例:
2.1.4设置透明度
2.1.5穿透地表
map.ground.navigationConstraint = {type:'none'}穿透地表
map.ground.navigationConstraint = {type:'stay-above'}保持在地表以上
2.2Basemap layers底图图层
2.2.1使用默认Basemap实例
可供选择的basemap
const map = new Map({
basemap: 'topo'
})
2.2.2使用自定义Basemap实例
basemap: {
baseLayers: [
new TileLayer({url: baseUrl})
],
refereneceLayers: [
new TileLayer({url: refUrl})
]
}
2.3Operational layers业务图层
Map.layers
const f1 = new FeatureLayer({
'https://samplesever6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0'
})
const g1 = new GraphicsLayer()
const map = new Map({
layers: [f1,g1]
})