maplibre-gl-measures
- 1 minmaplibre-gl-measures
A MapLibre GL JS plugin for taking length measures with lines and area measures with polygons. Check it out here:
It’s working with MapLibre GL JS inspired by the great work done by mapbox/mapbox-gl-draw
Code
Code is available on this Github repo.
Demo
You can rush to the demo here.
Getting started
To use this plugin you need to run:
npm install --save maplibre-gl-measures
and then, in your code use it as follows:
// Import it into your code
import MeasuresControl from 'maplibre-gl-measures';
// your map logic here...
// add the plugin
map.addControl(new MeasuresControl({ /** see options below for further tunning */}), "top-left");