new ImageryProvider()
Provide images displayed on ellipsoids. This type describes an interface and cannot be directly instantiated.
Members
-
readonly creditCredit
-
Obtain the copyright statement to be displayed when activating the image provider. Usually, this function is used to indicate the source of the image. This function should not be called before ImageryProvider # ready returns true.
-
defaultAlphaNumber
-
The default alpha blend value for this provider is 0.0 for complete transparency and 1.0 for complete opacity.
- Default Value: undefined
defaultBrightnessNumber
The default brightness of the provider. 1.0 Use unmodified image colors. Less than 1.0 will darken the image, while greater than 1.0 will brighten the image.
- Default Value: undefined
defaultContrastNumber
The default contrast of the provider. 1.0 Use unmodified image colors. Less than 1.0 will reduce contrast, while greater than 1.0 will increase contrast.
- Default Value: undefined
defaultGammaNumber
The default gamma correction applied to this provider. 1.0 Use unmodified image colors.
- Default Value: undefined
defaultHueNumber
The default color tone of the provider (in radians). 0.0 Use unmodified image colors.
- Default Value: undefined
defaultMagnificationFilterTextureMagnificationFilter
The default texture magnification filter to apply to this provider.
- Default Value: undefined
defaultMinificationFilterTextureMinificationFilter
The default texture minification filter to apply to this provider.
- Default Value: undefined
defaultSaturationNumber
The default saturation of the provider. 1.0 Use unmodified image colors. Less than 1.0 will decrease saturation, while greater than 1.0 will increase saturation.
- Default Value: undefined
readonly errorEventEvent
Retrieve the event triggered when the image provider encounters an asynchronous error. By subscribing to this event, you will receive error notifications and may potentially recover from them. The event listener will receive an instance of TileProviderError.
readonly hasAlphaChannelBoolean
Obtain a value indicating whether the image provided by the image provider contains an alpha channel. If the attribute is false, the existing alpha channel will be ignored. If this attribute is true, any image that does not contain an alpha channel will be considered as an image with an alpha value of 1.0. When this attribute is false, both memory usage and texture upload time will be reduced.
readonly maximumLevelNumber
Obtain the maximum level of granularity that can be requested. This function should not be called until ImageryProvider # ready returns true.
readonly minimumLevelNumber
Obtain the minimum level of granularity that can be requested. This function should not be called until ImageryProvider # ready returns true. Generally speaking, the minimum level should only be used when the rectangular range of the image is small enough that the number of tiles at the minimum level is minimal. If the minimum number of tiles in the image provider exceeds a few, it will cause rendering problems.
readonly proxyProxy
Get the proxy used by the provider.
readonly readyBoolean
Get a value indicating whether the provider can use it.
readonly readyPromisePromise.<Boolean>
Get the Promise that parses to true when the provider is ready.
readonly rectangleRectangle
Obtain the rectangle (in radians) of the image provided by the instance. This function should not be called before ImageryProvider # ready returns true.
readonly tileDiscardPolicyTileDiscardPolicy
Obtain tile discard strategy. If not defined, the discard policy is responsible for filtering out "lost" tiles through its should DiscardImage function. If this function returns undefined, it will not filter any tiles. This function should not be called until ImageryProvider # ready returns true.
readonly tileHeightNumber
Get the height of each tile in pixels. This function should not be called until ImageryProvider # ready returns true.
readonly tileWidthNumber
Get the width of each tile in pixels. This function should not be called before ImageryProvider # ready returns true.
readonly tilingSchemeTilingScheme
Obtain the tile scheme used by the image provider. This function should not be called before ImageryProvider # ready returns true.
Methods
-
static loadImage(imageryProvider, url, Package){Promise.<(Image|Canvas)>|undefined}
-
Load images from the given URL. If the server referenced by the URL already has too many requests waiting to be processed, this function will return undefined, indicating that the request should be retried later.
Name Type Description imageryProviderImageryProvider The image provider of the URL.
urlResource | String The URL of the image.
PackagepackingRequest Request encoding.
Returns:
Type Description Promise.<(Image|Canvas)> | undefined Promise of the image, which will parse the image when it is available; If there are too many requests on the server, the Promise is not defined and the requests should be retried later. The parsed image can be an image or a Canvas DOM object. -
getTileCredits(x, y, level){Array.<Credit>}
-
Obtain the copyright statement to be displayed when displaying a given tile.
Name Type Description xNumber The X-coordinate of the tile.
yNumber The y-coordinate of the tile.
levelNumber The level of tiles.
Throws:
-
GetTileCredits must not be called before the video provider is ready.
- Type
- DeveloperError
Returns:
Type Description Array.<Credit> The copyright statement to be displayed when displaying tiles. -
-
pickFeatures(x, y, level, longitude, latitude){Promise.<Array.<ImageryLayerFeatureInfo>>|undefined}
-
Asynchronous determination of the terrain features (if any) at the given longitude and latitude in the tile. This function should not be called until ImageryProvider # ready returns true. This function is optional, so not all image providers have this function.
Name Type Description xNumber The X-coordinate of the tile.
yNumber The y-coordinate of the tile.
levelNumber The level of tiles.
longitudeNumber Select the longitude of the feature.
latitudeNumber Select the latitude of the feature.
Throws:
-
PickFeatures must not be called before the video provider is ready.
- Type
- DeveloperError
Returns:
Type Description Promise.<Array.<ImageryLayerFeatureInfo>> | undefined When asynchronous extraction is completed, the Promise of the extracted features will be parsed. The parsed value is an array composed of ImageryLayerElementInfo instances. If no features are found at the given location, the array may be empty. If extraction is not supported, the array may also be undefined. -
-
requestImage(x, y, level, request){Promise.<(Image|Canvas)>|undefined}
-
Request to specify the image of the tile. This function should not be called before ImageryProvider # ready returns true.
Name Type Description xNumber The X-coordinate of the tile.
yNumber The y-coordinate of the tile.
levelNumber The level of tiles.
requestRequest optional Request object. For internal use only.
Throws:
-
RequestImage must not be called before the image provider is ready.
- Type
- DeveloperError
Returns:
Type Description Promise.<(Image|Canvas)> | undefined Promise of the image, which will parse the image when it is available; If there are too many requests on the server, the Promise is not defined and the requests should be retried later. The parsed image can be an image or a Canvas DOM object. -