在本節中,註意到三維底圖既加入了行政邊界的矢量要素圖層,也加入了場景要素 var countries = new FeatureLayer({ //各國矢量邊界 url:"https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/service ...
在本節中,註意到三維底圖既加入了行政邊界的矢量要素圖層,也加入了場景要素
var countries = new FeatureLayer({ //各國矢量邊界
url:"https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/World_Countries_(Generalized)/FeatureServer",
renderer:{
type:"simple",
symbol:{
type:"polygon-3d",
symbolLayers:[{
type:"fill",
material:{color:[0,0,0,0]},
outline:{color:[4,245,248]}
}]
}
}
});
var layer = new SceneLayer({
url:"https://tiles.arcgis.com/tiles/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Airports_PointSceneLayer/SceneServer/layers/0",
renderer:{
type:"simple",
symbol:{
type:"point-3d",
symbolLayers:[{
type:"icon",
size:1.7
}]
},
visualVariables:[{
type:"color",
field:"type_airpport",
stops:[{
value:1,
color:[252,12,245]
},{
value:3,
color:[83,0,244]
},{
value:7,
color:[4,245,248]
}]
}]
}
})
var map = new Map({
layers:[countries,layer] //哪個圖層在第一個,哪一個就覆蓋顯示
ground:{
opacity:0.6,
surfaceColor:"black"
}
});
var view = new SceneView({
container:"viewDiv",
map:map,
environment:{
starsEnabled:false,
atmosphereEnabled:false,
background:{
type:"color",
color:"black"
}
}
})