Cesium(四)加载影像图层
一、常用影像图层加载 1、添加高德地图 viewer.imageryLayers.addImageryProvider(new Cesium.UrlTemplateImageryProvider({ url: 'http://webrd04.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}', tilingScheme: new Cesium.WebMercatorTilingScheme() }) ); 2、添加天地图 //影像 viewer.imageryLayers.addImageryProvider( new Cesium.WebMapTileServiceImageryProvider({ url: "http://t0.tianditu.com/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=你的token", layer: "tdtBasicLayer", style: "default", format: "image/jpeg" }), ); //注记 viewer.imageryLayers.addImageryProvider( new Cesium.WebMapTileServiceImageryProvider({ url: "http://t0.tianditu.com/cia_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=cia&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default.jpg&tk=你的token", layer: "tdtAnnoLayer", style: "default", format: "image/jpeg" }) ); 3、添加ArcServer地图 viewer.imageryLayers.addImageryProvider(new Cesium.ArcGisMapServerImageryProvider({ url : 'http://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer' }) 4、添加Geoserver 地图 //wms地图服务 viewer.imageryLayers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({ url : 'http://localhost:8080/geoserver/fs/wms', layers : 'fs:county3',//图层 parameters : { transparent : true, format : 'image/png', srs: 'EPSG:4490', styles:'' } }) ); //wmts服务 viewer.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider({ url:'http://localhost:8080/geoserver/gwc/service/wmts/rest/topp:states/{style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}?format=image/png', layer: 'topp:states',//图层名称 style: '', format: 'image/png', tileMatrixSetID: 'EPSG:4326', tileMatrixLabels: ['EPSG:4326:0', 'EPSG:4326:1', 'EPSG:4326:2', 'EPSG:4326:3', 'EPSG:4326:4', 'EPSG:4326:5', 'EPSG:4326:6', 'EPSG:4326:7', 'EPSG:4326:8', 'EPSG:4326:9', 'EPSG:4326:10', 'EPSG:4326:11' ...
https://www.jianshu.com/p/9d1d5a234307