getCanvasContainer method

HtmlElement getCanvasContainer()

Returns the HTML element containing the map's <canvas> element.

If you want to add non-GL overlays to the map, you should append them to this element.

This is the element to which event bindings for map interactivity (such as panning and zooming) are attached. It will receive bubbled events from child elements such as the <canvas>, but not from map controls.

@returns {HTMLElement} The container of the map's <canvas>. @see Create a draggable point @see Highlight features within a bounding box

Implementation

HtmlElement getCanvasContainer() => jsObject.getCanvasContainer();