BingMapsImageryProvider

new Cesium.BingMapsImageryProvider(options)

BingMaps imagery service provider.
Name Type Description
options Object The object has the following properties:
Name Type Default Description
url String BingMaps service url.
key String optional The key used by the application can be applied on the official website https://www.bingmapsportal.com/. If no key is provided, BingMapsApi.defaultKey will be used; if BingMapsApi.defaultKey is also not defined, a message will be written to remind you to create an application. When using Bing Maps, the application cannot be deployed without creating a separate key.
tileProtocol String optional The protocol used when loading the tiles, such as'http:' or'https:'. By default, it loads using the same protocol as the page.
mapStyle BingMapsStyle BingMapsStyle.AERIAL optional Service type.
culture String '' optional For details, please refer to http://msdn.microsoft.com/en-us/library/hh441729.aspx.
ellipsoid Ellipsoid optional Ellipsoid. When not defined, the WGS84 ellipsoid is used by default.
tileDiscardPolicy TileDiscardPolicy optional A strategy for determining whether slices are invalid and discarded. If not specified, DiscardMissingTileImagePolicy is used by default.
proxy Proxy optional The requested proxy. This object has a getURL function, which returns the proxy URL if necessary.
Example:
var bing = new Cesium.BingMapsImageryProvider({
    url : 'https://dev.virtualearth.net',
    key : 'get-yours-at-https://www.bingmapsportal.com/',
    mapStyle : Cesium.BingMapsStyle.AERIAL
});
See:

Members

readonlycredit : Credit

Obtain service description information when the service is active.

readonlyculture : String

To obtain the language used when requesting BingMaps service, please refer to http://msdn.microsoft.com/en-us/library/hh441729.aspx for details.

defaultGamma : Number

Use the default @link ImageryLayer#gamma to create an image layer. After creating @link ImageryLayer, changing the value of @link ImageryLayer#gamma is invalid. You can set the @link ImageryLayer#gamma attribute of the image layer.
Default Value: 1.0

readonlyerrorEvent : Event

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

readonlyhasAlphaChannel : Boolean

Gets a value indicating whether the image provided by the image provider contains an alpha channel. If this property is false, the alpha channel (if it exists) will be ignored. If this property 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.

readonlykey : String

Get the key of the service.

readonlymapStyle : BingMapsStyle

Get the service type.

readonlymaximumLevel : Number

Get the maximum level of detail (LOD) that can be requested. This property cannot be called before BingMapsImageryProvider#ready returns true.

readonlyminimumLevel : Number

Get the smallest level of detail (LOD) that can be requested. This property cannot be called before BingMapsImageryProvider#ready returns true.

readonlyproxy : Proxy

Get the proxy used by the service provider.

readonlyready : Boolean

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

readonlyreadyPromise : Promise.<Boolean>

Get a promise that resolves to true when the service is available.

readonlyrectangle : Rectangle

Get the image rectangle and radian parameters provided by the instance. This function is called when @link BingMapsImageryProvider#ready returns true.

readonlytileDiscardPolicy : TileDiscardPolicy

Get the tile discard strategy. If not defined, the discard strategy filters out non-existent tiles through the shouldDiscardImage function. If the function returns undefined, no tiles are filtered out.BingMapsImageryProvider#readyCall this function when it returns true.

readonlytileHeight : Number

Get the height of each tile, in pixels. This property cannot be called before BingMapsImageryProvider#ready returns true.

readonlytileWidth : Number

Get the width of each tile, in pixels. This property cannot be called before BingMapsImageryProvider#ready returns true.

readonlytilingScheme : TilingScheme

Get the segmentation strategy used by the service provider. This property cannot be called before BingMapsImageryProvider#ready returns true.

readonlyurl : String

Get the url of the service.

Methods

staticCesium.BingMapsImageryProvider.quadKeyToTileXY(quadkey)

Request an image from the Bing Maps server and convert the four-pronged key of a tile to (x, y, level) position.
Name Type Description
quadkey String Four-pronged key for tiles.
See:

staticCesium.BingMapsImageryProvider.tileXYToQuadKey(x, y, level)

Convert the (x, y, level) position of a tile into a four-prong key, 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 zoom level of the tile.
See:

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

Get the subtitle information displayed by the 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 the tile.
Returns:
The subtitle information displayed by the tile.
Throws:
  • DeveloperError : getTileCredits It is prohibited to call before the image service is provided.

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

Pick feature objects. If the image provider does not currently 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 the tile.
longitude Number Pick the longitude of the feature object.
latitude Number Pick the latitude of the feature object.
Returns:
When the asynchronous picking operation is completed, a promise of picking features will be formed. The value of promise isImageryLayerFeatureInfoAn array of instances. If no feature object is found at the specified position, the array will be empty. If the picking operation is not supported, the operation object may be undefined.

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

Request the image of the specified tile. This function is called when BingMapsImageryProvider#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 the tile.
request Request optional Request object. For internal use only.
Returns:
The promise that forms the image when the image is available, or is undefined (if the server receives too many requests, the request is prompted to try again later). The parsed image can be an image or a Canvas DOM object.
Throws:
  • DeveloperError : requestImage It is prohibited to call before the image service is provided.