# vue2-leaflet-ruler

> leaflet-ruler extension plugin for vue2leaflet package

Latest version **0.0.5** (published 2021-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue2-leaflet-ruler
pnpm add vue2-leaflet-ruler
yarn add vue2-leaflet-ruler
bun add vue2-leaflet-ruler
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2021-10-07 |
| First published | 2021-04-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 15.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Panagiotis Bakas |
| Maintainers | panbak |
| Keywords | vue, leaflet, vue2leaflet, ruler |

## Links

- npm: https://www.npmjs.com/package/vue2-leaflet-ruler
- Repository: https://github.com/panbak/vue2-leaflet-ruler
- Homepage: https://github.com/panbak/vue2-leaflet-ruler#readme
- Issues: https://github.com/panbak/vue2-leaflet-ruler/issues
- npm.io page: https://npm.io/package/vue2-leaflet-ruler

## Dependencies (1)

- [leaflet-ruler](https://npm.io/package/leaflet-ruler.md) https://github.com/gokertanrisever/leaflet-ruler/tarball/master

## Recent versions

- 0.0.5 (latest) — 2021-10-07
- 0.0.4 — 2021-04-16
- 0.0.3 — 2021-04-16
- 0.0.2 — 2021-04-16
- 0.0.1 — 2021-04-16

## README

# vue2-leaflet-ruler
a Vue2Leaflet plugin wrapper for [leaflet-ruler](https://github.com/gokertanrisever/leaflet-ruler)

## Installation

`npm i vue2-leaflet-ruler`

## Usage

```
//...
import LRuler from "vue2-leaflet-ruler";
//...

export default {
  //...
  components: {
    "l-ruler": LRuler,
  },
  //...
```

```
<l-map>
  <!-- other components -->
  <l-ruler :options="rulerOptions" />
</l-map>
```

Available options (These are the default)

```
rulerOptions: {
        position: "topright", // Leaflet control position option
        circleMarker: {
          // Leaflet circle marker options for points used in this plugin
          color: "red",
          radius: 2,
        },
        lineStyle: {
          // Leaflet polyline options for lines used in this plugin
          color: "red",
          dashArray: "1,6",
        },
        lengthUnit: {
          // You can use custom length units. Default unit is kilometers.
          display: "km", // This is the display value will be shown on the screen. Example: 'meters'
          decimal: 2, // Distance result will be fixed to this value.
          factor: null, // This value will be used to convert from kilometers. Example: 1000 (from kilometers to meters)
          label: "Distance:",
        },
        angleUnit: {
          display: "&deg;", // This is the display value will be shown on the screen. Example: 'Gradian'
          decimal: 2, // Bearing result will be fixed to this value.
          factor: null, // This option is required to customize angle unit. Specify solid angle value for angle unit. Example: 400 (for gradian).
          label: "Bearing:",
        },
      },

```

## Credits

Thanks to the contributors of the [leaflet-ruler](https://github.com/gokertanrisever/leaflet-ruler) plugin.

## Author

Panagiotis Bakas

## License

This project is licensed under the MIT License .

---
_Source: https://npm.io/package/vue2-leaflet-ruler · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
