$vc.creatingPromise.then((readyObj) => {
if(tileLayer){
readyObj.viewer.imageryLayers.remove(tileLayer)
tileLayer = null
}
let provider = new Cesium.WebMapTileServiceImageryProvider({
url : `http://192.168.8.28:8080/geoserver/gwc/service/wmts?layer=cite:dom_${d.value}&style=&tilematrixset=EPSG:3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix=EPSG:3857:{TileMatrix}&TileCol={TileCol}&TileRow={TileRow}`,
layer : 'USGSShadedReliefOnly',
style : 'default',
format : 'image/png',
tileMatrixSetID : 'EPSG',
maximumLevel: 19,
credit : new Cesium.Credit('U. S. Geological Survey'),
rectangle: rectangle
});
tileLayer = readyObj.viewer.imageryLayers.addImageryProvider(provider);
provider.readyPromise.then((state)=>{
if(state){
loading.close()
readyObj.viewer.camera.flyTo({
destination: rectangle
});
// emit('loaded')
}
})
})
网友评论