finds.dev

Leaflet/Leaflet.VectorGrid

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

View on GitHub

★ 675JavaScriptupdated Jan 2025

// the take

A Leaflet plugin for rendering vector tiles — both sliced GeoJSON/TopoJSON and protobuf tiles from remote servers — using Leaflet 1.0's GridLayer API. It fills a specific gap: before this, none of the existing vector tile plugins worked with Leaflet 1.x. Aimed at mapping developers who are already on Leaflet and want to avoid pulling in Mapbox GL.

The WebWorker-based GeoJSON slicing (slicerWebWorker.js) is the right call — slicing large GeoJSON on the main thread blocks the UI noticeably. Dual distribution (bundled vs. unbundled) is practical; you're not forced to manage geojson-vt and pbf separately if you don't want to. The symbolizer abstraction (Fill/Line/Point/PolyBase) gives per-feature style callbacks that work cleanly for choropleth-style maps. Protobuf support covers OpenMapTiles, Mapbox, and ESRI tiles with the same API.

Last meaningful activity is years-old and the TODO section in the readme is still the TODO section — sub-pane z-index control, getBounds() for the slicer, and Mapbox stylesheet parsing are all unimplemented. If you need anything beyond basic click events on features (hover, highlight, feature state), you're writing it yourself. The global variable dependency model (geojsonvt, Pbf, VectorTile must exist on window) is a 2016 pattern that clashes with modern ESM bundler setups. No tests anywhere in the repo.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
675
Forks
201
Language
JavaScript
Last commit
9 Jan 2025

// nearby

If Leaflet.VectorGrid isn't quite it.

All repos →