Cesium加载Geowebcache切片
1、会有跨域问题,谷歌浏览器跨域解决方案
2、加载代码:
let parameters = { service: 'WMS', format: 'image/png', tiled: true, //是否是切片 version: '1.1.0', SRS: 'EPSG:3857', exceptions: 'application/vnd.ogc.se_inimage', transparent: 'true', request: 'GetMap' }; var provider_mmmm = new Cesium.WebMapServiceImageryProvider({ crossOrigin: 'anonymous', //跨域 url: 'http://10.19.151.238:8080/geoserver/yq/wms', wrapX: false, //是否可以重复平铺 //layers: 'JCSJ_SHLJZ_BLACK', layers: 'yq:ShangHai_SLJP', parameters, tilingScheme: new Cesium.WebMercatorTilingScheme({ numberOfLevelZeroTilesX: 1, numberOfLevelZeroTilesY: 1 }), proxy: new Cesium.DefaultProxy('/proxy/') }); view.imageryLayers.addImageryProvider(provider_mmmm);