Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

leaflet-measure-distance

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-measure-distance

Leaflet measure control =======================

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
26
-25.71%
Maintainers
1
Weekly downloads
 
Created
Source

leaflet-measure-distance NPM version NPM Downloads

Measure distances interactively on a leaflet map.

Adds a leaflet control which allows you to activate an interactive mode to measure and annotate distances on the map.

The default units are kilometers, however you can supply an arbitrary scale factor (from meters) and label to support your prefered units.

Example use:

Default: kilometers:

const map = new L.Map("map", {
  measureControl: {
    enabled: true,
  },
});

e.g.: nautical miles:

const map = new L.Map("map", {
  measureControl: {
    enabled: true,
    unitLabel: "nm",
    unitFactor: 1852,
  },
});

e.g.: meters:

const map = new L.Map("map", {
  measureControl: {
    enabled: true,
    unitLabel: "m",
    unitFactor: 1,
  },
});

For a demo see here.

License

CSIRO Open Source Software Licence Agreement (variation of the BSD / MIT License)

Keywords

leaflet

FAQs

Package last updated on 13 Oct 2022

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