显示/隐藏地面高程
作者:互联网
将map平面的ground:"world-elevation"进行三维显示
var map = new Map({
basemap:"hybrid",
ground:"world-elevation"
});
var view = new SceneView({
container:"viewDiv",
map:map,
camera:{
position:[7.654, 45.919, 5184],
tilt:80
}
})
view.when(function(){
document.getElementById("elevationInput").addEventListener("change",update);
function update(ev){
map.ground.layers.forEach(function(layer){
layer.visible = ev.target.checked;
})
}
})
标签:function,高程,layer,map,地面,var,ev,隐藏,ground 来源: https://www.cnblogs.com/GIS-Yangol/p/10415890.html