Classes
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 <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 | boolean <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 when the mouse leaves the viewport. To render something else, provide a string to be used as the text content (e.g. 'no position' or '' for an empty string). Set the placeholder to
false
to retain the last position when the mouse leaves the viewport. In a future release, this will be the default behavior.undefinedHTML
string <optional>
' ' This option is deprecated. Use the
placeholder
option instead.