DataBinningLayer Class

Bing
 

The DataBinningLayer class which makes it easy to create data bins from arrays of pushpins. The generated data bins extend from the polygon class and support all polygon options and events.

DataBinningLayer(pushpins?: Pushpin[], options?: DataBinningOptions)

NameReturn TypeDescription
clear()Removes all the data in the layer.
dispose()Cleans up any resources this object is consuming.
getOptions()DataBinningOptionsRetrieves the options used by the data binning layer.
getPushpins()Pushpin[]Retrieves all the pushpins that have been passed into the data binning layer.
getPrimitives()DataBinPolygon[]Returns an array containing all the data bin polygons.
getVisible()booleanGets a value indicating whether the layer is visible or not.
getZIndex()numberGets the zIndex of the layer.
setOptions(options: DataBinningOptions)Sets the options used for calculating and rendering the data bins.
setPushpins(pushpins: Pushpin[])Sets the array of pushpins that are used to generate the data bins.
setVisible(value: boolean)Sets whether the layer is visible or not.
setZIndex(zIndex: number)Sets the zIndex of the layer. See also: zIndexing in Bing Maps V8

The DataBinningLayer extends from the Layer class and allows supports all the same events.

NameArgumentsDescription
clickMouseEventArgsOccurs when the mouse is used to click the map or when a touch end event occurs on a data bin in the layer.
dblclickMouseEventArgsOccurs when the mouse is used to double click the map or when a touch end event occurs on a data bin in the layer.
mousedownMouseEventArgsOccurs when the left mouse button is pressed or a touch start event occurs on a data bin in the layer.
mouseoverMouseEventArgsOccurs when the mouse cursor moves over top of the area covered by a data bin in the layer.
mouseoutMouseEventArgsOccurs when the mouse cursor moves out of the area covered by a data bin in the layer.
mouseupMouseEventArgsOccurs when the left mouse button is lifted up or when the touch end event occurs on a data bin in the layer.
rightclickMouseEventArgsOccurs when the right mouse button is used to click the map or when a long touch press occurs on a data bin in the layer.
Show: