Ticket #2334 (closed feature: duplicate)

Opened 4 years ago

Last modified 3 years ago

Blank mouse position when outside map area

Reported by: Joto Owned by:
Priority: minor Milestone: 2.9 Release
Component: Control.MousePosition Version: 2.8
Keywords: Cc:
State:

Description

The MousePosition Control shows the current coordinates for the mouse position. When the mouse leaves the map area, the last coordinates are shown. The enclosed patch changes this behaviour to delete the position text when the mouse leaves the map area. The old behaviour can be easily restored by overwriting the mouseOutsideText function with null or other text can be shown.

Attachments

ol-mouseposition-outside-map.patch Download (0.9 KB) - added by Joto 4 years ago.

Change History

Changed 4 years ago by Joto

Changed 4 years ago by fredj

The control already have a default value: (0, 0). This lon lat is displayed at the control init. I think this behaviour should also be changed.

The redraw function could check if the evt is null or evt.type is mouseout and set the innerHTML to something configurable (mouseOutsideText).

What do you think ?

Changed 3 years ago by bartvde

  • status changed from new to closed
  • resolution set to duplicate

duplicate of ticket:2404

Note: See TracTickets for help on using tickets.