ContourLayer Class

The ContourLayer class takes an array of ContourLine and organizes them and creates non-overlapping polygon to represent each contour area.

Constructor

ContourLayer(contourLines: ContourLine[], options?: ContourLayerOptions)

Methods

Name Return Type Description
clear() Clears all data on the contour layer.
getContourLines() ContourLine[] Gets the contour lines of this layer.
getContourPolygons() Polygon[] Gets the polygons that were generated from the contour lines in this layer.
getOptions() ContourLayerOptions Retrieves the options of this contour layer.
getVisible() boolean Gets a boolean that indicates if the layer is visible or not.
getZIndex() number Gets the zIndex of the layer.
setContourLines(contourLines: ContourLine[]) Sets the contour lines used to calculate the polygon areas of this layer.
setOptions(options: ContourLayerOptions) Sets the options of the contour layer.
setVisible(show: boolean) Sets the visibility of the layer.
setZIndex(idx: number) Sets the zIndex of the layer. See also: zIndexing in Bing Maps V8

Events

Name Arguments Description
click MouseEventArgs Occurs when the mouse is used to click the map or when a touch end event occurs on a contour line in the layer.
dblclick MouseEventArgs Occurs when the mouse is used to double click the map or when a touch end event occurs on a contour line in the layer.
mousedown MouseEventArgs Occurs when the left mouse button is pressed or a touch start event occurs on a contour line in the layer.
mouseover MouseEventArgs Occurs when the mouse cursor moves over top of the area covered by a contour line in the layer.
mouseout MouseEventArgs Occurs when the mouse cursor moves out of the area covered by a contour line in the layer.
mouseup MouseEventArgs Occurs when the left mouse button is lifted up or when the touch end event occurs on a contour line in the layer.
rightclick MouseEventArgs Occurs when the right mouse button is used to click the map or when a long touch press occurs on a contour line in the layer.