修复地图显示瓦片错乱问题

This commit is contained in:
hym 2024-09-27 16:31:50 +08:00
parent 7c7b05eae0
commit 8bc6192761
1 changed files with 11 additions and 5 deletions

View File

@ -373,7 +373,7 @@ export default {
this.viewer.scene.postProcessStages.fxaa.enabled = true this.viewer.scene.postProcessStages.fxaa.enabled = true
// //
// this.viewer.imageryLayers.get(0).show = false this.viewer.imageryLayers.get(0).show = false
// //
const earthMap = new Cesium.WebMapTileServiceImageryProvider( const earthMap = new Cesium.WebMapTileServiceImageryProvider(
@ -381,9 +381,11 @@ export default {
url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:world/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/jpeg', url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:world/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/jpeg',
layer: 'ougp:world', layer: 'ougp:world',
style: 'default', style: 'default',
tileMatrixSetID: 'EPSG:900913',
format: 'image/jpeg', format: 'image/jpeg',
tilingScheme: new Cesium.GeographicTilingScheme() // tileMatrixSetID: 'EPSG:4326',
// tilingScheme: new Cesium.GeographicTilingScheme()
tileMatrixSetID: 'EPSG:900913',
tilingScheme: new Cesium.WebMercatorTilingScheme()
} }
) )
this.viewer.imageryLayers.addImageryProvider(earthMap) this.viewer.imageryLayers.addImageryProvider(earthMap)
@ -393,9 +395,11 @@ export default {
url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:GSHHS_f_L1/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png', url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:GSHHS_f_L1/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png',
layer: 'ne:GSHHS_f_L1', layer: 'ne:GSHHS_f_L1',
style: 'default', style: 'default',
tileMatrixSetID: 'EPSG:900913',
format: 'image/png', format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme() tilingScheme: new Cesium.GeographicTilingScheme()
// tileMatrixSetID: 'EPSG:900913',
// tilingScheme: new Cesium.WebMercatorTilingScheme()
} }
) )
this.viewer.imageryLayers.addImageryProvider(coastline) this.viewer.imageryLayers.addImageryProvider(coastline)
@ -405,9 +409,11 @@ export default {
url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:正射影像图_GM输出_20240516/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png', url: this.CesiumHostAddr + 'geoserver/gwc/service/wmts/rest/ougp:正射影像图_GM输出_20240516/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png',
layer: 'ougp:正射影像图_GM输出_20240516', layer: 'ougp:正射影像图_GM输出_20240516',
style: 'default', style: 'default',
tileMatrixSetID: 'EPSG:900913',
format: 'image/png', format: 'image/png',
tileMatrixSetID: 'EPSG:4326',
tilingScheme: new Cesium.GeographicTilingScheme() tilingScheme: new Cesium.GeographicTilingScheme()
// tileMatrixSetID: 'EPSG:900913',
// tilingScheme: new Cesium.WebMercatorTilingScheme()
} }
) )
this.viewer.imageryLayers.addImageryProvider(shipline) this.viewer.imageryLayers.addImageryProvider(shipline)