This is a Polyline Offset plugin extension for vue2-leaflet package.
npm install --save vue2-leaflet-polylineoffset
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
on <template> add
<l-polyline-offset :lat-lngs="latlngs" :offset="offset" color="red" />
(all <l-polyline>
options are available)
on <script> add
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,
...
},
...
}
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)
npm install
npm run build
Readme adapted from polyline decorator plugin by jperelli
MIT polyline offset plugin extension for vue2-leaflet package