Class: BingMapsImageryProvider

BingMapsImageryProvider

new BingMapsImageryProvider()

Bing Maps image service provider.

Name Type Default Description
options.url String

Bing Maps service URL.

options.key String optional

The key used by the application can be found on the official website https://www.bingmapsportal.com/ apply. If no key is provided, BingMapsAi.defaultKey will be used; If BingMapsAi.defaultKey is also undefined, a message will be written to remind you to create an application. When using Bing Maps, applications cannot be deployed without creating a separate key.

options.tileProtocol String optional

The protocol used when loading tiles, such as' http: 'or' https: '. By default, the same protocol as the page is used for loading.

options.mapStyle BingMapsStyle BingMapsStyle.AERIAL optional

Service type.

options.culture String '' optional

Please refer to the detailed content http://msdn.microsoft.com/en-us/library/hh441729.aspx .

options.ellipsoid Ellipsoid optional

Ellipsoid body. When undefined, WGS84 ellipsoid is used by default.

options.tileDiscardPolicy TileDiscardPolicy optional

Determine whether the tiles are invalid and the strategy for disposal. When not specified, DiscardMissingTile ImagePolicy is used by default.

options.proxy Proxy optional

The requested agent. This object has a getURL function that returns the URL of the proxy if needed.

See:
Example
var bing = new SuperMap3D.BingMapsImageryProvider({
    url : 'https://dev.virtualearth.net',
    key : 'get-yours-at-https://www.bingmapsportal.com/',
    mapStyle : SuperMap3D.BingMapsStyle.AERIAL
});

Members

static logoUrlString

Retrieve or set the URL of the Bing logo displayed in copyright information.

readonly creditCredit

Retrieve service description information when the service is active.

readonly cultureString

Please refer to the language used when requesting Bing Maps service for details http://msdn.microsoft.com/en-us/library/hh441729.aspx .

defaultGammaNumber

The default ImageryLayer # gamma value used for image layers created by this provider. Changing this value after creating an ImageryLayer for this provider will be invalid. On the contrary, the ImageryLayer # gamma attribute of this layer should be set.

Default Value:
1.0

readonly errorEventEvent

The event triggered when an asynchronous error occurs in obtaining the image service. The event listener passes an instance of TileProviderError.

readonly hasAlphaChannelBoolean

Obtain a value indicating whether the image provided by the image provider contains an alpha channel. If this attribute is false, the alpha channel (if present) will be ignored. If this attribute is true, any image without an alpha channel is considered to have an alpha value of 1. Setting this value to false will reduce memory usage and texture loading time.

readonly keyString

Get the key to the service.

readonly mapStyleBingMapsStyle

Obtain service type.

readonly maximumLevelNumber

Get the maximum level of capability (LOD) that can be requested. This property cannot be called until BingMapsImagryProvider # ready returns true.

readonly minimumLevelNumber

Get the minimum level of capability (LOD) that can be requested. This property cannot be called until BingMapsImagryProvider # ready returns true.

readonly proxyProxy

Obtain the proxy used by the service provider.

readonly readyBoolean

Get a value indicating whether the service is available for use.

readonly readyPromisePromise.<Boolean>

Obtain a promise that resolves to true when the service is available for use.

readonly rectangleRectangle

Obtain the image rectangle and radian parameters provided through the instance. @Link BingMapsImagryProvider # ready returns true time and calls this function.

readonly tileDiscardPolicyTileDiscardPolicy

Obtain tile abandonment strategy. If not defined, the discard strategy filters out non-existent tiles through the shoulder DiscardImage function. If the function returns undefined, no tiles are filtered out. BingMapsImagryProvider # ready returns true time and calls this function.

readonly tileHeightNumber

Get the height of each tile in pixels. This property cannot be called until BingMapsImagryProvider # ready returns true.

readonly tileWidthNumber

Get the width of each tile in pixels. This property cannot be called until BingMapsImagryProvider # ready returns true.

readonly tilingSchemeTilingScheme

Obtain the partitioning strategy used by the service provider. This property cannot be called until BingMapsImagryProvider # ready returns true.

readonly urlString

Get the URL of the service.

Methods

static quadKeyToTileXY(quadkey)

Request an image from the Bing Maps server and convert a tile's quadkey to (x, y, level) position.

Name Type Description
quadkey String

The four key of the tile.

See:

static tileXYToQuadKey(x, y, level)

Convert the (x, y, level) position of a tile into a quadkey and request an image from the Bing Maps server.

Name Type Description
x Number

The x-coordinate of the tile.

y Number

The y-coordinate of the tile.

level Number

The scaling level of tiles.

See:

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

Obtain subtitle information displayed on tiles.

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 is prohibited from being called before providing imaging services.

Type
DeveloperError
Returns:
Type Description
Array.<Credit> Subtitle information displayed on tiles.

pickFeatures(x, y, level, longitude, latitude){Promise.<Array.<ImageryLayerFeatureInfo>>|undefined}

Pick up feature objects. If the image provider currently does not support the pickup function, the function will return undefined. ClippingType.js

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

Pick the longitude of the feature object.

latitude Number

Pick the latitude of the feature object.

Returns:
Type Description
Promise.<Array.<ImageryLayerFeatureInfo>> | undefined When the asynchronous picking operation is completed, a promise for selecting features will be formed. The value of the promise is the ImageryLayerElementInfo instance array. If no feature object is found at the specified location, the array will be empty. If picking operation is not supported, it may be because the operation object is undefined.

requestImage(x, y, level, request){Promise.<(Image|Canvas)>|undefined}

Request to specify the image of the tile. When BingMapsImagryProvider # ready returns true, this function is called.

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 is prohibited from being called before providing image services.

Type
DeveloperError
Returns:
Type Description
Promise.<(Image|Canvas)> | undefined When the image is available, a promise is formed for the image, or if it is undefined (if the server receives too many requests, the request is prompted to retry later). The parsed image can be an image or a Canvas DOM object.