https://github.com/whitequark/leaflet.nanomeasure
Sub-millimeter distance and area measurement tool for Leaflet.js
https://github.com/whitequark/leaflet.nanomeasure
Last synced: 3 months ago
JSON representation
Sub-millimeter distance and area measurement tool for Leaflet.js
- Host: GitHub
- URL: https://github.com/whitequark/leaflet.nanomeasure
- Owner: whitequark
- License: mit
- Created: 2015-06-18T05:26:03.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-07-23T18:07:20.000Z (almost 10 years ago)
- Last Synced: 2025-03-02T12:39:51.698Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 754 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Leaflet.Nanomeasure
===================Leaflet.Nanomeasure is a sub-millimeter measurement tool for [Leaflet](http://leaflet.com). It allows to select a path or outline and displays the length or area in square nanometers, micrometers or millimeters.
Screenshot
----------
Usage
-----Include the script:
``` html
```
Add the control to the map:
``` javascript
L.control.nanomeasure({
nanometersPerPixel: scale,
}).addTo(map);
```Options
-------| Option | Type | Default | Description |
| -------------------- | --------- | -------------- | ----------- |
| `nanometersPerPixel` | `Number` | `1000` | The ratio between pixels at known zoom and nanometers. |
| `ratioAtZoom` | `Number` | `map.getMaxZoom()` | The zoom level used for translating pixels to distances. |
| `position` | `String` | `'bottomleft'` | The position of the control (one of the map corners). See [control positions](http://leafletjs.com/reference.html#control-positions). |License
-------[MIT license](LICENSE.txt)