Cesium加载服务
1.加载geoserver服务的shp数据
var imageryProvider1=new Cesium.WebMapServiceImageryProvider({ url:'http://localhost:8088/geoserver/xy/wms', //layers:['0','1'], layers:'xy:ZD_xy', parameters : { service : 'WMS', format: 'image/png', transparent:true, //show:false }, }); viewer.imageryLayers.addImageryProvider(imageryProvider1);
2.加载arcgis server的影像服务
var imageryProvider_world=new Cesium.ArcGisMapServerImageryProvider({ url:'http://localhost:6080/arcgis/rest/services/worldImage_L9/MapServer', layers: 'worldImage_L9' }); viewer.imageryLayers.addImageryProvider(imageryProvider_world);
3.加载cesiumLab的影像服务或本地瓦片数据
var imageryProvider = new Cesium.UrlTemplateImageryProvider({ url: "../Demo_XinYi/Data/world_L5/{z}/{x}/{y}.png", tilingScheme: new Cesium.WebMercatorTilingScheme(), fileExtension: 'png', minimumLevel: 0, maximumLevel: 17 }); viewer.imageryLayers.addImageryProvider(imageryProvider);