首页 / 浏览问题 / 三维GIS / 问题详情
超图FAQ:【WebGL】iClient3D for Cesium如何实现多子域加载WMTS服务呢?
64,468EXP 2023年12月26日
【WebGL】iClient3D for Cesium如何实现多子域加载WMTS服务呢?

1个回答

【解决办法】设置subdomains参数,在WMTS的url地址中加上{s}占位符即可,详细代码参考如下: var wmtsOptions = { url: 'http://{s}/iserver/services/map-LL/wmts100', layer: 'RIVER', style: 'default', format: 'image/png', tileMatrixSetID: 'Custom_RIVER', maximumLevel: 18, subdomains: ['localhost:8081', 'localhost:8082', 'localhost:8083'], tileMatrixLabels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18'], tilingScheme: new Cesium.GeographicTilingScheme({ rectangle: new Cesium.Rectangle(1.7856923984979798, 0.37526560245886974, 2.0031185547384606, 0.46793488206123156) }) } var imageryProvider = new Cesium.WebMapTileServiceImageryProvider(wmtsOptions) var imageryLayer = new Cesium.ImageryLayer(imageryProvider) viewer.scene.imageryLayers.add(imageryLayer)
64,468EXP 2023年12月26日
热门文章
关注我们
...