ImageryLayer

new SuperMap3D.ImageryLayer(imageryProvider, options)

Imagery layer class, is used to display imagery provider's tiled imagery data.
Name Type Description
imageryProvider SuperMapImageryProvider The specified imagery provider.
options Object optional The object has the following properties:
Name Type Default Description
rectangle Rectangle imageryProvider.rectangle optional The rectangular range of the layer, which limits the visible range of the image.
alpha Number | function 1.0 optional Layer transparency value, the value range is 0.0~1.0.
brightness Number | function 1.0 optional Layer brightness value. A value of 1.0 means to use the original image; values ​​greater than 1.0 will lighten the image; values ​​less than 1.0 will darken the image.
contrast Number | function 1.0 optional Layer contrast. A value of 1.0 means to use the original image; a value greater than 1.0 means to increase the contrast; a value less than 1.0 means to decrease the contrast.
hue Number | function 0.0 optional Layer tint. A value of 0.0 means to use the original image.
saturation Number | function 1.0 optional Layer saturation. A value of 1.0 means use the original image; a value greater than 1.0 means increase saturation; a value less than 1.0 means decrease saturation.
gamma Number | function 1.0 optional Layer gamma correction. A value of 1.0 means to use the original image.
show Boolean true optional Specify whether to display the layer, true means to display this layer, false means not to display。
splitDirection ImagerySplitDirection | function ImagerySplitDirection.NONE optional Specifies the split direction of the imagery layer.
minimumTerrainLevel Number optional Minimum terrain level of detail. level 0 is the minimum level of detail.
maximumTerrainLevel Number optional Maximum terrain level of detail.
Example:
var  imageryProvider = new SuperMap3D.SuperMapImageryProvider({
		    url : ‘http://localhost:8090/iserver/services/datas/China’
     });
     //Create an imagery layer from an imagery provider
var imageryLayer = new SuperMap3D.ImageryLayer(imageryProvider);

Members

alpha : Number

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

brightness : Number

Layer brightness value. A value of 1.0 means to use the original image; values ​​greater than 1.0 will lighten the image; values ​​less than 1.0 will darken the image.
Default Value: ImageryLayer.DEFAULT_BRIGHTNESS

contrast : Number

Layer contrast. A value of 1.0 means to use the original image; a value greater than 1.0 means to increase the contrast; a value less than 1.0 means to decrease the contrast.
Default Value: ImageryLayer.DEFAULT_CONTRAST

enableUpsample : Boolean

When the image request of the child tile fails, the image of the parent tile will be used. Default value: true (when only some of the four child tiles have data, it can be set to false to prevent image confusion)

gamma : Number

Layer gamma correction. A value of 1.0 means to use the original image.
Default Value: ImageryLayer.DEFAULT_GAMMA

hue : Number

Layer tint. A value of 0.0 means to use the original image.
Default Value: ImageryLayer.DEFAULT_HUE

indexedDBSetting : Object

Get or set whether the indexedDB cache of the image is enabled (IE browser does not support it)
Example:
//Set whether to save the image cache to the browser's indexedDB database
var imageryLayer = viewer.imageryLayers.get(1);
imageryLayer.indexedDBSetting.isOpen = true;

lodOffset : Number

Get or set the offset when loading the image layer. The offset here refers to the offset on the level of detail. The larger the value, the higher the offset of the detail layer, the finer the loaded image layer and the clearer the image, and the more blurred the image when the value is negative. Note: The value here can only be set as an integer. The default is 0, no offset.
Default Value: 0

name : String

Get the provider name from the imagery layer.
Example:
var name = ImageryLayer.name;

saturation : Number

Layer saturation. A value of 1.0 means use the original image; a value greater than 1.0 means increase saturation; a value less than 1.0 means decrease saturation.
Default Value: ImageryLayer.DEFAULT_SATURATION

show : Boolean

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

splitDirection : ImagerySplitDirection

Specifies the image layer split directionImagerySplitDirection, you can control the image layer to be displayed only in the left or right area of ​​the separator.
Default Value: ImageryLayer.DEFAULT_SPLIT

swipeEnabled : Boolean

Get or set whether to enable the rolling shutter function.

swipeRegion : Rectangle

Get or set the quadrilateral area of ​​the shutter.

transparentBackColor : Color

Sets the transparent color of the image.
Default Value: ImageryLayer.DEFAULT_TRANSPARENTBACKCOLOR

transparentBackColorTolerance : Number

Set the image transparent color tolerance, the value range is 0.0~1.0. 0.0 means opaque.
Default Value: ImageryLayer.DEFAULT_TRANSPARENTBACKCOLORTOLERANCE

Methods

destroy()undefined

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

getViewableRectangle()Promise

Get the visible range of the layer.
Returns:
A 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
    });
});

isBaseLayer()Boolean

Determine whether the layer is an image layer collectionImageryLayerCollection base layer.

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

isDestroyed()Boolean

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

setVisibleInViewport(index, visible)

Sets the corresponding viewport visibility of the layer according to the index.
Name Type Description
index Number viewport index
visible Boolean viewport visibility
Throws: