显示/隐藏地面高程
程序员文章站
2023-02-20 23:35:26
将map平面的ground:"world-elevation"进行三维显示 var map = new Map({ basemap:"hybrid", ground:"world-elevation" }); var view = new SceneView({ container:"viewDiv ......
将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;
})
}
})