Skip to content

vue-leaflet/vue2-leaflet-polylineoffset

Repository files navigation

vue2-leaflet-polylineoffset

This is a Polyline Offset plugin extension for vue2-leaflet package.

Install

npm install --save vue2-leaflet-polylineoffset

Demo

git clone https://github.com/maratumba/vue2-leaflet-polylineoffset

# using npm
npm install
npm run example

Then you should be able to navigate with your browser and see the demo in http://localhost:4000/

You can see the demo code in the file example.vue

Usage

on <template> add

<l-polyline-offset :lat-lngs="latlngs" :offset="offset" color="red" />

(all <l-polyline> options are available)

on <script> add

option 1

In the same template file, at <script> part, this will make the component available only to the template in this file

import LPolylineOffset from 'vue2-leaflet-polylineoffset'
...
export default {
    ...
    components: {
    LPolylineOffset,
    ...
    },
    ...
}

option 2

At main Vue configuration, this will make the component available to all templates in your app

import Vue from 'vue'
import LPolylineOffset from 'vue2-leaflet-polylineoffset'
...
Vue.component('l-polyline-offset', LPolylineOffset)

Develop and build

npm install
npm run build

Author

maratumba

Readme adapted from polyline decorator plugin by jperelli

License

MIT polyline offset plugin extension for vue2-leaflet package

About

polyline offset plugin for vue2leaflet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published