An open API service indexing awesome lists of open source software.

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

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
----------

![Screenshot](screenshot.png)

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)