vue2-leaflet-ruler

leaflet-ruler extension plugin for vue2leaflet package
2,501 2
Install
npm install vue2-leaflet-ruler
Latest Version:0.0.5
Vue:2
License:MIT
Last Updated:Oct 7, 2021
Links: GitHub  ·  npm
Maintainer: panbak

vue2-leaflet-ruler

a Vue2Leaflet plugin wrapper for 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 plugin.

Author

Panagiotis Bakas

License

This project is licensed under the MIT License .

Related Packages

vue2-leaflet-polyline-measure

Leaflet.PolylineMeasure control plugin extension for Vue2Leaflet package

2,141 9
vue-leaflet-minimap

A Vue2Leaflet wrapper for the Leaflet-MiniMap control plugin.

3,285 6
vue2-leaflet-freedraw

A Vue2Leaflet wrapper for Freedraw

4,435 13
vue2-leaflet

Vue2 leaflet library

1,578,765 1,952

Version History

Version Released Vue License
0.0.5 ^2.6.11 MIT
0.0.4 ^2.6.11 MIT
0.0.3 ^2.6.11 MIT
0.0.2 ^2.6.11 MIT
0.0.1 ^2.6.11 MIT