Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet 1.0.0
Alternatives To Leaflet.vectorgrid
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Awesome Vector Tiles1,991
9 days ago2cc0-1.0
awesome implementations of the Mapbox Vector Tile specification
Leaflet Geoman1,8653114 days ago17May 20, 202240mitJavaScript
🍂🗺️ The most powerful leaflet plugin for drawing and editing geometry layers
Leaflet Realtime689627 months ago13September 07, 201914iscJavaScript
Put realtime data on a Leaflet map
Leaflet Omnivore5565542 years ago11November 17, 201623otherJavaScript
universal format parser for Leaflet & Mapbox.js
Leaflet.vectorgrid47843182 years ago8August 28, 2017102JavaScript
Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet 1.0.0
2a year ago1May 20, 20178bsd-2-clauseJavaScript
OSM Buildings Classic 2.5D
a year ago1February 09, 201654otherJavaScript
This is a Leaflet plug-in that plays back points that have a time stamp synchronized to a clock.
Proj4leaflet449100443 years ago9August 14, 201711bsd-2-clauseJavaScript
Smooth Proj4js integration with Leaflet.
Mapstore2412220 hours ago6August 26, 2022501otherJavaScript
Modern webmapping with OpenLayers, Leaflet, Cesium and React
Leaflet.timeline303112 years ago15June 26, 202036iscTypeScript
Display arbitrary GeoJSON on a map with a timeline slider and play button
Alternatives To Leaflet.vectorgrid
Select To Compare

Alternative Project Comparisons


Display gridded vector data (sliced GeoJSON, TopoJSON or protobuf vector tiles) in Leaflet 1.0.0


demo-geojson.html Sliced GeoJSON
demo-topojson.html Sliced TopoJSON (sorry for the antimeridian mess, topojson-to-geojson seems to not handle it properly)
demo-vectortiles.html Protobuf vector tiles: OpenMapTiles, MapBox, MapZen or even ESRI vector tiles
demo-points.html Clickable points and lines
demo-points-icons.html Points as icons


If you use npm:

	npm install leaflet.vectorgrid

That will make available two files: dist/Leaflet.VectorGrid.js and dist/Leaflet.VectorGrid.bundled.js.

The difference is that dist/Leaflet.VectorGrid.bundled.js includes all of VectorGrid's dependencies:

If you are adding these dependencies by yourself, use dist/Leaflet.VectorGrid.js instead.

If you don't want to deal with npm and local files, you can use unpkg.com instead:

<script src="https://unpkg.com/[email protected]/dist/Leaflet.VectorGrid.bundled.js"></script>

or, with the same caveats about bundled dependencies:

<script src="https://unpkg.com/[email protected]/dist/Leaflet.VectorGrid.js"></script>


This plugin exposes two new classes:

  • L.VectorGrid.Slicer for displaying GeoJSON or TopoJSON data
  • L.VectorGrid.Protobuf for displaying vector tiles from an online tile server

You can find the API documentation, and the explanation about the styling, at:



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.


Run npm install.


  • 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


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.


"THE BEER-WARE LICENSE": [email protected] 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.

Popular Leaflet Projects
Popular Geojson Projects
Popular User Interface Components Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Protocol Buffers
Vector Tiles