Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ardhi/Leaflet.MousePosition
A mouse position control for Leaflet
https://github.com/ardhi/Leaflet.MousePosition
Last synced: 16 days ago
JSON representation
A mouse position control for Leaflet
- Host: GitHub
- URL: https://github.com/ardhi/Leaflet.MousePosition
- Owner: ardhi
- License: mit
- Created: 2012-11-30T10:55:37.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2022-10-13T14:15:03.000Z (about 2 years ago)
- Last Synced: 2024-08-01T00:52:40.544Z (3 months ago)
- Language: JavaScript
- Size: 254 KB
- Stars: 99
- Watchers: 10
- Forks: 71
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Leaflet.MousePosition
Leaflet.MousePosition is a simple mouse position control that you can drop into your leaflet map. It displays geographic coordinates of the mouse pointer, as it is moved about the map.
## Using the Mouse Position Control
Insert the following line:
...
L.control.mousePosition().addTo(map);
...## Available Options:
These are the available options:
`position:` The standard Leaflet.Control position parameter. Defaults to 'bottomleft'
`separator:` To separate longitude\latitude values. Defaults to ' : '
`emptystring:` Initial text to display. Defaults to 'Unavailable'
`numDigits:` Number of digits. Defaults to 5
`lngFirst:` Weather to put the longitude first or not. Defaults to false
`lngFormatter:` Custom function to format the longitude value. Defaults to undefined
`latFormatter:` Custom function to format the latitude value. Defaults to undefined
`prefix:` A string to be prepended to the coordinates. Defaults to the empty string ‘’.