- 其中url和layers参数不晓得怎么填的请参考(注意:不是照搬哈,只是参考,格式类型还请参考代码)
let privide = new Cesium.WebMapServiceImageryProvider({url: "http://localhost:8098/geoserver/LjPipeGIS/wms", //服务地址layers: "LjPipeGIS:BaseBoundaryTown", //服务图层,需要修改成你自己发布的名称parameters: {service: "WMS",format: "image/png",transparent: true}});//wms服务let layer = viewer.imageryLayers.addImageryProvider(privide);//缩放至目标区域(经度,纬度,高)viewer.camera.flyTo({destination: Cesium.Cartesian3.fromDegrees(100.3283867,26.8411889,200000)});
- 结果(加载进来的wms显示始终是贴地的效果,很友好)
资源下载:Cesium+Vue-Javascript文档类资源-CSDN下载
QQ群(GIS开发交流、数据共享、软件使用):993836992