Class: SingleTileImageryProvider

SingleTileImageryProvider

new SingleTileImageryProvider()

Used to load a single static image as an image layer class

Name Type Default Description
options.url String

The URL of the tile.

options.rectangle Rectangle Rectangle.MAX_VALUE optional

The rectangle covered by the image (in radians).

options.credit Credit | String optional

The copyright statement of the data source is displayed on the canvas.

options.ellipsoid Ellipsoid optional

Ellipsoid. If not specified, use WGS84 ellipsoid.

options.proxy Object optional

Proxy used for requests. If necessary, the object should have a getURL function to return the proxy URL.

See:

Members

readonly creditCredit

Obtain the copyright statement to be displayed when activating the image provider. Usually, this will be used to add credit to the image source. This function should not be called before SingleTileImageryProvider # ready returns true.

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

Get a value indicating whether to ignore the image provided by this image provider. If this attribute is true, any image without an alpha channel will be considered as an image with an alpha value of 1.0. If this attribute is false, it will reduce memory usage and texture upload time.

readonly maximumLevelNumber

Obtain the maximum level of granularity that can be requested. This function should not be called until SingleTile ImageryProvider # ready returns true.

readonly minimumLevelNumber

Obtain the minimum level of granularity that can be requested. This function should not be called until SingleTile ImageryProvider # ready returns true.

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 this instance. This function should not be called before SingleTileImageryProvider # 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 SingleTile ImageryProvider # ready returns true.

readonly tileHeightNumber

Get the height of each tile in pixels. This function should not be called until SingleTileImageryProvider # ready returns true.

readonly tileWidthNumber

Get the width (in pixels) of each tile. This function should not be called before SingleTileImageryProvider # ready returns true.

readonly tilingSchemeTilingScheme

Obtain the slicing scheme used by this provider. This function should not be called before SingleTileImageryProvider # ready returns true.

readonly urlString

Obtain the URL of a single top-level image tile.

Methods

getTileCredits(x, y, level){Array.<Credit>}

Obtain the copyright statement to be displayed when displaying a given tile.

Name Type Description
x Number

The X-coordinate of the tile.

y Number

The Y coordinate of the tile.

level Number

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}

The image provider currently does not support feature selection, so this function returns undefined.

Name Type Description
x Number

The X-coordinate of the tile.

y Number

The Y coordinate of the tile.

level Number

The level of tiles.

longitude Number

Select the longitude of the feature.

latitude Number

Select the latitude of the feature.

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 SingleTileImageryProvider # ready returns true.

Name Type Description
x Number

The X-coordinate of the tile.

y Number

The Y coordinate of the tile.

level Number

The level of tiles.

request Request 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.