New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

leaflet-mouse-position

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-mouse-position

An npm wrapper for Ardhi Lukianto’s Leaflet.MousePosition plugin

latest
Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
2.1K
10.84%
Maintainers
1
Weekly downloads
 
Created
Source

leaflet-mouse-position npm version NPM Downloads

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.

Screenshot

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. Argument: numerical longitude value. Return value: formatted string. Defaults to undefined.

latFormatter: Custom function to format the latitude value. Argument: numerical latitude value. Return value: formatted string. Defaults to undefined.

prefix: A string to be prepended to the coordinates. Defaults to the empty string ‘’.

wrapLng: Controls if longitude values will be wrapped. Defaults to true.

formatter: A custom function to format the entire value. Arguments: numerical longitude value, numerical latitude value. Return value: formatted string. Defaults to undefined. If defined will ignore: lngFirst, lngFormatter, latFormatter and prefix.

Public Methods:

These are the available methods:

getLatLng: Request the last recorded cursor position, as a LatLng object.

License

MIT License (MIT)

Keywords

leaflet

FAQs

Package last updated on 04 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts