cesium加载GeoWebCache发布的ArcGIS切片(WMS和WMTS)

Geoserver2.16.1配置GeoWebCache 发布ArcGIS Server瓦片_晚秋10的博客-CSDN博客

根据上篇文章,配好 GeoWebCache 发布ArcGIS Server瓦片后,可以在openlayers5中加载预览,在cesium中加载的方式有WMS,WMTS,TMS,地址点击GetCapabilities就可以看到

cesium加载GeoWebCache发布的ArcGIS切片(WMS和WMTS)_第1张图片

1.cesium加载WMS

viewer.imageryLayers.addImageryProvider(
 new Cesium.WebMapServiceImageryProvider({
	url: "http://localhost:8080/geowebcache/service/wms",
	// 必填
	layers: "test",
	parameters: {
	service: "WMS",
	version: "1.1.0",
	transparent: true,
	format: "image/jpeg",
	srs: "EPSG:4326",
},
}))

 2.cesium加载WMTS

相应的参数可在http://localhost:8080/geowebcache/service/wmts?REQUEST=getcapabilities中查到。

注意:4326的Labels从1级开始

viewer.imageryLayers.addImageryProvider(
    new Cesium.WebMapTileServiceImageryProvider({
					url: "http://localhost:8080/geowebcache/service/wmts",
					layer: "test",
					style: "",
					format: "image/jpeg",
					tilingScheme: new Cesium.GeographicTilingScheme(), 
					tileMatrixSetID: "EPSG:4326_test",
					tileMatrixLabels: [
						"EPSG:4326_test:1",
						"EPSG:4326_test:2",
						"EPSG:4326_test:3",
						"EPSG:4326_test:4",
						"EPSG:4326_test:5",
						"EPSG:4326_test:6",
						"EPSG:4326_test:7",
						"EPSG:4326_test:8",
						"EPSG:4326_test:9",
						"EPSG:4326_test:10",
						"EPSG:4326_test:11",
						"EPSG:4326_test:12",
						"EPSG:4326_test:13",
						"EPSG:4326_test:14",
						"EPSG:4326_test:15",
						"EPSG:4326_test:16",
						"EPSG:4326_test:17",
						"EPSG:4326_test:18",
					],
					show: false,
				}));

你可能感兴趣的:(Geoserver,arcgis,geoserver,geowebcache)