The imagery layer class is used to display the tile imagery data of the imagery provider.
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
imageryProvider |
SuperMapImageryProvider | The specified imagery provider. | ||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
optional
The object has the following properties:
|
Example:
var imageryProvider = new Cesium.SuperMapImageryProvider({
url : ‘http://localhost:8090/iserver/services/datas/China’
});
//Create imagery layer through imagery provider
var imageryLayer = new Cesium.ImageryLayer(imageryProvider);
Members
-
The layer transparency value, the value range is 0.0~1.0. 0.0 means completely transparent; 1.0 means completely opaque.
-
Default Value:
1.0
-
The brightness value of the layer. A value of 1.0 means the original image is used; when the value is greater than 1.0, the image will become brighter; when the value is less than 1.0, the image will become darker.
-
Default Value:
ImageryLayer.DEFAULT_BRIGHTNESS
-
Layer contrast. A value of 1.0 means using the original image; a value greater than 1.0 means increasing the contrast; a value less than 1.0 means reducing the contrast.
-
Default Value:
ImageryLayer.DEFAULT_CONTRAST
-
When the image request of the child tile fails, the image of the parent tile will be used, the default value: true (when only part of the four child tiles have data, it can be set to false to prevent image confusion
-
Layer gamma correction. A value of 1.0 means the original image is used.
-
Default Value:
ImageryLayer.DEFAULT_GAMMA
-
Layer tone. A value of 0.0 means the original image is used.
-
Default Value:
ImageryLayer.DEFAULT_HUE
-
Get or set whether the indexedDB cache of the image is turned on (IE browser does not support)
Example:
//Set whether to save the image cache to the indexedDB database of the browser var imageryLayer = viewer.imageryLayers.get(1); imageryLayer.indexedDBSetting.isOpen = true;
-
Gets or sets the offset when loading the image layer. The offset here refers to the offset in the level of detail. The larger the value, the more the detail layer shifts upward, the finer the loaded image layer, the clearer the image, and the more blurry the image is when the value is negative. Note: The value here can only be set as an integer. The default value is 0, no offset.
-
Default Value:
0
-
Layer saturation. A value of 1.0 means using the original image; a value greater than 1.0 means increasing the saturation; a value less than 1.0 means reducing the saturation.
-
Default Value:
ImageryLayer.DEFAULT_SATURATION
-
Specify whether the current layer is displayed.
-
Default Value:
true
-
splitDirection : ImagerySplitDirection
-
Specify the split direction
ImagerySplitDirection
of the image layer to control the image layer to be displayed only on the left or right area of the split bar.-
Default Value:
ImageryLayer.DEFAULT_SPLIT
-
Get or set whether to turn on the shutter function.
-
swipeRegion : Rectangle
-
Gets or sets the quadrilateral area of the rolling shutter.
-
transparentBackColor : Color
-
Set the imagery transparency color.
-
Default Value:
ImageryLayer.DEFAULT_TRANSPARENTBACKCOLOR
-
Set the image transparency tolerance, the value range is 0.0~1.0. 0.0 means completely transparent, 1.0 means completely opaque.
-
Default Value:
ImageryLayer.DEFAULT_TRANSPARENTBACKCOLORTOLERANCE
Methods
-
Release the resources occupied by the object.
Returns:
Example:
imageryLayer = imageryLayer && imageryLayer.destroy();
See:
-
Get the visible range of the layer.
Returns:
Rectangle object, representing the visible range of the layer.Example:
// Zoom to an imagery layer. imageryLayer.getViewableRectangle().then(function (rectangle) { return camera.flyTo({ destination: rectangle }); });
-
Determine whether the layer is the basic layer in the image layer set
ImageryLayerCollection
.
The base layer is special, it is considered to have a global rectangle.Returns:
True means the base layer; false means the non-base layer.Example:
var isBaseLayer = imageryLayer.isBaseLayer();
-
Returns whether to release the resources occupied by the object.
Returns:
Whether to release the occupied resources.See:
-
Set the layer corresponding to the viewport visibility according to the index.
Name Type Description index
Number Index of the viewport visible
Boolean Visibility of the viewport Throws:
-
DeveloperError : the index is 0~3
-