Module: ol/control/MousePosition

ol/control/MousePosition


Classes

MousePosition

Type Definitions

Options{Object}

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

CSS class name.

coordinateFormat CoordinateFormat <optional>

Coordinate format.

projection ProjectionLike <optional>

Projection. Default is the view projection.

render function <optional>

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

target HTMLElement | string <optional>

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

placeholder string <optional>

Markup to show when the mouse position is not available (e.g. when the pointer leaves the map viewport). By default, a non-breaking space is rendered initially and the last position is retained when the mouse leaves the viewport. When a string is provided (e.g. 'no position' or '' for an empty string) it is used as a placeholder.

wrapX boolean <optional>
true

Wrap the world horizontally on the projection's antimeridian, if it is a global projection.