Loading Imagery Layers in Cesium Clients

SGS serves imagery layers to Cesium viewers.

To load imagery data in a Cesium client using Cesium API:

1.      Add a Cesium ImageryProvider element.

var imageryLayers = viewer.imageryLayers;

imageryLayers.addImageryProvider();

2.      Create a new Cesium WebMapServiceImageryProvider object.

new Cesium.WebMapServiceImageryProvider({});

Example:

var viewer = new Cesium.Viewer("cesiumContainer");
var imageryLayers = viewer.imageryLayers;

Cesium.when(imageryLayers.addImageryProvider(

  new Cesium.WebMapServiceImageryProvider({

    url: "https://www.skylineglobe.com/sg/default/streamer.ashx",

    layers: "landsat_oahu.ii.2927284",

rectangle: Cesium.Rectangle.fromDegrees(-158.38508605957,21.2051582336426,-157.554759979248,21.8001365661621),

    parameters: {

      transparent: true,

      format: "image/png",

    },

  })),function(a){viewer.camera.flyTo({destination: new Cesium.Rectangle.fromDegrees(-158.38523979, 21.8002224, -157.55467415, 21.2050724)});});