删除所有的图层  this.viewer.imageryLayers.removeAll()

删除单个图层  this.viewer.imageryLayers.remove(变量名)    

变量名是你在往地球上添加图层时定义的,如:

this.zoning = this.viewer.imageryLayers.addImageryProvider(
new this.Cesium.WebMapServiceImageryProvider({
url: URL,
maximumLevel: 8,
layers: '',
credit: 'Black Marble imagery courtesy NASA Earth Observatory'
})
)
this.zoning.alpha = 0.1 //图层的透明度
this.zoning.brightness = 5.0 //图层的亮度

其中zoning是在data中定义的 , 这里不能用 var zoning,这个变量必须是全局变量,图层才可以被删除

相关文章:

  • 2021-11-17
  • 2021-09-18
  • 2021-11-30
  • 2021-09-28
  • 2021-10-28
猜你喜欢
  • 2022-12-23
  • 2021-11-14
  • 2021-12-16
  • 2022-02-05
  • 2022-01-01
  • 2022-12-23
  • 2021-11-04
相关资源
相似解决方案