Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to load sgs Images of skyline by Cesium

Shulou Source: shulou.com Published: 2022-06-01 03:40:58 10月03日 Update

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!

Tags: Images services addresses names basics interfaces articles codes parameters fields done documents more standards knowledge web sites industry information information channels this is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn OPPO Reno NVidia Shulou Information MySQL