L.VectorGrid.Slicer requires geojson-vt: the global variable geojsonvt must exist. If topojson data is used, then the topojson global variable must also exist.
L.VectorGrid.Protobuf requires vector-tile and pbf: the global variables VectorTile and Pbf must exist.
By default, VectorGrid is built with those dependencies bundled.
Developing
Run npm install.
TODO
Sub-panes for the tile renderers (to set the "z-index" of layers/features)
More <g>roups in SVG
Offscreen <canvas>es in Canvas
getBounds() support for the slicer (inherit/extrapolate from geojson data)
Parser for mapbox-like vector stylesheets
Motivation
Before VectorGrid, loading vector tiles in Leaflet could only be done with the
Leaflet.MapboxVectorTile or the Hoverboard plugin, but neither of those works with
Leaflet 1.0.0 (or greater).
VectorGrid leverages the GridLayer feature introduced in Leaflet 1.0.0.
Legalese
"THE BEER-WARE LICENSE":
ivan@sanchezortega.es wrote this file. As long as you retain this notice you
can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer in return.