Module: ol/control/MousePosition

ol/control/MousePosition


Classes

MousePosition

Methods

module:ol/control/MousePosition~render(mapEvent)

control/MousePosition.js, line 252

Update the mouseposition element.

This:
Name Type Description
mapEvent module:ol/MapEvent~MapEvent

Map event.

Type Definitions

Options{Object}

Properties:
Name Type Argument Default Description
className string <optional>
'ol-mouse-position'

CSS class name.

coordinateFormat module:ol/coordinate~CoordinateFormat <optional>

Coordinate format.

projection module:ol/proj~ProjectionLike

Projection.

render function <optional>

Function called when the control should be re-rendered. This is called in a requestAnimationFrame callback.

target Element | string <optional>

Specify a target if you want the control to be rendered outside of the map's viewport.

undefinedHTML string <optional>
'&#160;'

Markup to show when coordinates are not available (e.g. when the pointer leaves the map viewport). By default, the last position will be replaced with '&#160;' (&nbsp;) when the pointer leaves the viewport. To retain the last rendered position, set this option to something falsey (like an empty string '').