ImageryLayer

new Cesium.ImageryLayer(imageryProvider, options)

影像图层类,用于显示影像提供者的瓦片影像数据。
Name Type Description
imageryProvider SuperMapImageryProvider The specified image provider.
options Object optional The object has the following properties:
Name Type Default Description
rectangle Rectangle imageryProvider.rectangle optional The rectangular extent of the layer that limits the visible range of the image.
alpha Number | function 1.0 optional Layer transparency value, ranging from 0.0 to 1.0.
brightness Number | function 1.0 optional Layer brightness value. A value of 1.0 indicates that the original image is used; when the value is greater than 1.0, the image will be brighter; when the value is less than 1.0, the image will be darkened.
contrast Number | function 1.0 optional Layer contrast. A value of 1.0 indicates that the original image is used; a value greater than 1.0 indicates an increase in contrast; a value less than 1.0 indicates a decrease in contrast.
hue Number | function 0.0 optional Layer tones. A value of 0.0 indicates that the original image is used.
saturation Number | function 1.0 optional Layer saturation. A value of 1.0 indicates that the original image is used; a value greater than 1.0 indicates an increase in saturation; a value less than 1.0 indicates a decrease in saturation.
gamma Number | function 1.0 optional Layer gamma correction. A value of 1.0 indicates that the original image is used.
show Boolean true optional Specifies whether the layer is displayed, true means that this layer is displayed, false means no display.
splitDirection ImagerySplitDirection | function ImagerySplitDirection.NONE optional Specifies the direction in which the image layer is split.
minimumTerrainLevel Number optional Minimum terrain detail level. Level 0 is the minimum level of detail.
maximumTerrainLevel Number optional Maximum terrain detail level.
Example:
var  imageryProvider = new Cesium.SuperMapImageryProvider({
		    url : ‘http://localhost:8090/iserver/services/datas/China’
     });
     //Create an image layer with an image provider
var imageryLayer = new Cesium.ImageryLayer(imageryProvider);

Members

alpha : Number

Layer transparency value, ranging from 0.0 to 1.0. 0.0 means completely transparent; 1.0 means completely opaque.
Default Value: 1.0

brightness : Number

Layer brightness value. A value of 1.0 indicates that the original image is used; when the value is greater than 1.0, the image will be brighter; when the value is less than 1.0, the image will be darkened.
Default Value: ImageryLayer.DEFAULT_BRIGHTNESS

contrast : Number

Layer contrast. A value of 1.0 indicates that the original image is used; a value greater than 1.0 indicates an increase in contrast; a value less than 1.0 indicates a decrease in contrast.
Default Value: ImageryLayer.DEFAULT_CONTRAST

gamma : Number

Layer gamma correction. A value of 1.0 indicates that the original image is used.
Default Value: ImageryLayer.DEFAULT_GAMMA

hue : Number

Layer tones. A value of 0.0 indicates that the original image is used.
Default Value: ImageryLayer.DEFAULT_HUE

indexedDBSetting : Object

Get or set indexedDB settings information

saturation : Number

Layer saturation. A value of 1.0 indicates that the original image is used; a value greater than 1.0 indicates an increase in saturation; a value less than 1.0 indicates a decrease in saturation.
Default Value: ImageryLayer.DEFAULT_SATURATION

show : Boolean

Specifies whether the current layer is displayed.
Default Value: true

splitDirection : ImagerySplitDirection

Specify the image layer split directionImagerySplitDirection,可控制影像图层仅在分割条的左边或右边区域显示。
Default Value: ImageryLayer.DEFAULT_SPLIT

transperantBackColor : Color

Set the image transparency.
Default Value: ImageryLayer.DEFAULT_TRANSPERANTBACKCOLOR

transperantBackColorTolerance : Number

Set the image transparent color tolerance, which ranges from 0.0 to 1.0. 0.0 means completely transparent and 1.0 means completely opaque.
Default Value: ImageryLayer.DEFAULT_TRANSPERANTBACKCOLORTOLERANCE

Methods

destroy()undefined

Release the resources occupied by the object.
Returns:
Example:
imageryLayer = imageryLayer && imageryLayer.destroy();
See:

getViewableRectangle()Promise

Get the visible range of the layer.
Returns:
A rectangular object that represents the visible range of the layer.
Example:
// Zoom to an imagery layer.
imageryLayer.getViewableRectangle().then(function (rectangle) {
    return camera.flyTo({
        destination: rectangle
    });
});

isBaseLayer()Boolean

Determines if the layer is the underlying layer in the image layer collection ImageryLayerCollection.

The base layer is special and it is considered to have a global rectangle.
Returns:
True is the base layer; false is the non-base layer.
Example:
var isBaseLayer = imageryLayer.isBaseLayer();

isDestroyed()Boolean

Returns whether to release the resources occupied by the object.
Returns:
Whether to release the occupied resources.
See: