new ImageryLayer(imageryProvider, optionsopt)
An imagery layer that displays tiled image data from a single imagery provider
on a
Globe
.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
imageryProvider |
ImageryProvider | The imagery provider to use. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
Object |
<optional> |
Object with the following properties:
Properties
|
- Source:
Members
(static) DEFAULT_BRIGHTNESS :Number
This value is used as the default brightness for the imagery layer if one is not provided during construction
or by the imagery provider. This value does not modify the brightness of the imagery.
Type:
- Number
- Default Value:
- 1.0
- Source:
(static) DEFAULT_CONTRAST :Number
This value is used as the default contrast for the imagery layer if one is not provided during construction
or by the imagery provider. This value does not modify the contrast of the imagery.
Type:
- Number
- Default Value:
- 1.0
- Source:
(static) DEFAULT_GAMMA :Number
This value is used as the default gamma for the imagery layer if one is not provided during construction
or by the imagery provider. This value does not modify the gamma of the imagery.
Type:
- Number
- Default Value:
- 1.0
- Source:
(static) DEFAULT_HUE :Number
This value is used as the default hue for the imagery layer if one is not provided during construction
or by the imagery provider. This value does not modify the hue of the imagery.
Type:
- Number
- Default Value:
- 0.0
- Source:
(static) DEFAULT_SATURATION :Number
This value is used as the default saturation for the imagery layer if one is not provided during construction
or by the imagery provider. This value does not modify the saturation of the imagery.
Type:
- Number
- Default Value:
- 1.0
- Source:
alpha :Number
The alpha blending value of this layer, with 0.0 representing fully transparent and
1.0 representing fully opaque.
Type:
- Number
- Default Value:
- 1.0
- Source:
brightness :Number
The brightness of this layer. 1.0 uses the unmodified imagery color. Less than 1.0
makes the imagery darker while greater than 1.0 makes it brighter.
Type:
- Number
- Default Value:
- Source:
contrast :Number
The contrast of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
the contrast while greater than 1.0 increases it.
Type:
- Number
- Default Value:
- Source:
gamma :Number
The gamma correction to apply to this layer. 1.0 uses the unmodified imagery color.
Type:
- Number
- Default Value:
- Source:
hue :Number
The hue of this layer in radians. 0.0 uses the unmodified imagery color.
Type:
- Number
- Default Value:
- Source:
(readonly) imageryProvider :ImageryProvider
Gets the imagery provider for this layer.
Type:
- Source:
(readonly) rectangle :Rectangle
Gets the rectangle of this layer. If this rectangle is smaller than the rectangle of the
ImageryProvider
, only a portion of the imagery provider is shown.
Type:
- Source:
saturation :Number
The saturation of this layer. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
saturation while greater than 1.0 increases it.
Type:
- Number
- Default Value:
- Source:
show :Boolean
Determines if this layer is shown.
Type:
- Boolean
- Default Value:
- true
- Source:
Methods
destroy() → {undefined}
Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
release of WebGL resources, instead of relying on the garbage collector to destroy this object.
Once an object is destroyed, it should not be used; calling any function other than
Once an object is destroyed, it should not be used; calling any function other than
isDestroyed
will result in a DeveloperError
exception. Therefore,
assign the return value (undefined
) to the object as done in the example.
- Source:
- See:
Throws:
-
This object was destroyed, i.e., destroy() was called.
- Type
- DeveloperError
Returns:
- Type
- undefined
Example
imageryLayer = imageryLayer && imageryLayer.destroy();
getViewableRectangle() → {Promise.<Rectangle>}
Computes the intersection of this layer's rectangle with the imagery provider's availability rectangle,
producing the overall bounds of imagery that can be produced by this layer.
- Source:
Returns:
A promise to a rectangle which defines the overall bounds of imagery that can be produced by this layer.
- Type
- Promise.<Rectangle>
Example
// Zoom to an imagery layer.
imageryLayer.getViewableRectangle().then(function (rectangle) {
return camera.flyTo({
destination: rectangle
});
});
isBaseLayer() → {Boolean}
Gets a value indicating whether this layer is the base layer in the
ImageryLayerCollection
. The base layer is the one that underlies all
others. It is special in that it is treated as if it has global rectangle, even if
it actually does not, by stretching the texels at the edges over the entire
globe.
- Source:
Returns:
true if this is the base layer; otherwise, false.
- Type
- Boolean
isDestroyed() → {Boolean}
Returns true if this object was destroyed; otherwise, false.
If this object was destroyed, it should not be used; calling any function other than
If this object was destroyed, it should not be used; calling any function other than
isDestroyed
will result in a DeveloperError
exception.
- Source:
- See:
Returns:
True if this object was destroyed; otherwise, false.
- Type
- Boolean