How to load sgs Images of skyline by Cesium
Xiaobian to share with you how Cesium loads skyline sgs image map, I hope you have something to gain after reading this article, let's discuss it together!
Skyline's sgs can publish wms services for images and wms services for elevations, and conform to ogc standards. Cesium can load wms services for images, so it can be loaded directly according to the API provided by Cesium.
This is the interface document address of Cesium loading wms. To view detailed parameter settings, check the following URL: cesiumjs.org/Cesium/Build/Documentation/WebMapServiceImageryProvider.html
The API provides a sample wms service that loads arcgis online publications:
var provider = new Cesium.WebMapServiceImageryProvider({ url : 'https://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer', layers : '0', proxy: new Cesium.DefaultProxy('/proxy/')});
viewer.imageryLayers.addImageryProvider(provider);
Skyline's sgs publish wms image service is based on http://localhost/SG/Imagery, which can be loaded according to the layer name.
The detailed codes are as follows:
viewer.imageryLayers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({
//basic url address
url: 'http://localhost/SG/Imagery',
//layer name
layers: 'ts.mpt',
//field configuration
parameters: {
service: 'WMS',
format: 'image/png'
},
baseLayerPicker: false
}));
After reading this article, I believe you have a certain understanding of "Cesium how to load skyline sgs image map", if you want to know more related knowledge, welcome to pay attention to the industry information channel, thank you for reading!