vue2-leaflet-vectorgrid

A Leaflet.VectorGrid plugin for the vue2-leaflet package
4,153 17
Install
npm install vue2-leaflet-vectorgrid
Latest Version:1.1.1
Vue:2
License:BSD-3-Clause
Last Updated:Apr 28, 2020
Links: GitHub  ·  npm
Maintainer: yellowcap

vue2-leaflet-vectorgrid

This is a VectorGrid plugin extension for the vue2-leaflet package. Currently only the VectorGrid.protobuf layer is implemented.

Install

npm install vue2-leaflet-vectorgrid

Quickstart

For a complete example, have a look at the demo code in the single-file component example.

On <template> add something like this

<l-map :zoom=10 :center="[-34.9205, -57.953646]">
  <l-protobuf url="https://example.com/my/favorite/endpoint/{z}/{y}/{x}.pbf" :options="options"/>
</l-map>

on <script> add

import { LMap } from 'vue2-leaflet';
import LProtobuf from 'vue2-leaflet-vectorgrid'

export default {
  components: {
    LMap,
    LProtobuf
  },
  data () {
    return {
      options: {
      	vectorTileLayerStyles: { ... },
         ...  // More VectorGrid options.
      }
    }
  }
}

Example

There is a simple but complete usage example. First, clone the repo and install its dependencies.

git clone git@github.com:tesselo/vue2-leaflet-vectorgrid.git
cd vue2-leaflet-vectorgrid
npm install

Also install peer dependencies.

npm install vue leaflet vue2-leaflet

To run the example @vue/cli and @vue/cli-service-global are required to be installed globally.

   npm install -g @vue/cli @vue/cli-service-global

Start the dev server using the the vue serve utility

vue serve example/app.vue

Then you should be able to navigate with your browser and see the demo at http://localhost:8080/.

Develop and build

npm install
npm run build

Deploy

Pack locally for install testing.

npm pack

Publish release

npm publish

Acknowledgements

Thanks to Aaron Gong and Julián Perelli, the authors of the markercluster plugin and the tracksymbol plugin. Both packages have been used as a basis to build this plugin.

Related Packages

vue2-leaflet-markercluster

markercluster plugin extension for vue2-leaflet package

246,240 132
vue2-leaflet-geosearch

GeoSearch plugin extension for vue2-leaflet package

27,968 36
vue2-leaflet-googlemutant

googlemutant plugin extension for vue2-leaflet package

23,040 19
vue2-leaflet-rotatedmarker

rotatedmarker plugin extension for vue2-leaflet package

18,812 19
vue2-leaflet-locatecontrol

locatecontrol plugin extension for vue2-leaflet package

6,397 11

Version History

Version Released License
1.1.1 BSD-3-Clause
1.1.0 BSD-3-Clause
1.0.7 BSD-3-Clause
1.0.6 BSD-3-Clause
1.0.4 BSD-3-Clause