Classes
Methods
-
module:ol/control/MousePosition.render(mapEvent)
control/MousePosition.js, line 258 -
Update the projection. Rendering of the coordinates is done in
handleMouseMove
andhandleMouseUp
.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 <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.
undefinedHTML
string <optional>
' ' 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
' '
(
) when the pointer leaves the viewport. To retain the last rendered position, set this option to something falsey (like an empty string''
).