Cesium加载WMS和WMTS和TMS

一、加载WMS

                let baseUrl = 'http://127。0.0.1:9001/geoserver/hnny/wms';
            var provider = new Cesium.WebMapServiceImageryProvider({
                url: baseUrl,
                enablePickFeatures:true,
                rectangle: Cesium.Rectangle.fromDegrees(115.9595781, 33.70809, 116.648063, 34.298223),
                layers: 'hnny:Growth_2019',
                parameters: {
                    TRANSPARENT: true,
                    format: 'image/png',
                    version:'1.3.0',
                    service:'WMS'
                }
            });

Cesium加载WMS和WMTS和TMS

 

 Cesium加载WMS和WMTS和TMS

 

 

二、加载WMTS

var wmtsImageryProvider = new Cesium.WebMapTileServiceImageryProvider({
                url: 'http://127.0.0.1:9001/geoserver/gwc/service/wmts/rest/hnny:Growth_2020_05/{style}/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png',
                layer: 'hnny:Growth_2020_05',
                style: 'raster',
                format: 'image/png',
                tileMatrixSetID: 'EPSG:900913',
                rectangle: Cesium.Rectangle.fromDegrees(73, 21, 140, 50)

            });
            var layer = viewer.imageryLayers.addImageryProvider(wmtsImageryProvider);
            viewer.flyTo(layer, {
                duration: 2
            });

Cesium加载WMS和WMTS和TMS

 

上一篇:中国铁路信息化行业规划布局及投投资可行性分析报告2022-2028年版


下一篇:JS的alert内容换行问题