You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Leaflet Plugin that renders Mapbox Vector Tiles on HTML5 Canvas.
Though there is extensive use of MapboxVectorTiles in Mapnik PNG tile rendering as well as MapboxGL, there is a strange lacking of libraries that integrate these vector tiles directly into Leaflet. Search no more, the library you have been looking for is here!
Take a look at this short presentation outlining what MapboxVectorTiles are and how this is integrated in Leaflet.
##Changelog
v 0.1.5 - May 21, 2015
Added point onClick events
v 0.1.6 - May 26, 2015
Click function uses style.radius or radius function to do hittest.
v 0.1.7 - December 17, 2015
Add XHR Headers to be configured for tile requests, update dependencies, correct package.json "main" property.
This puts a watcher on your source directory and recompiles with browserify automatically. It also serves the project directory on port 3000.
Open your browser to https://localhost:3000/examples and see the plugin in action!
Usage
To put Leaflet.MapboxVectorTile on your map, you create an L.TileLayer.MVTSource object. This is a subclass of L.TileLayer, and it's usage and methods work the same as other Leaflet Tile Layers.
The primary way that you setup your vector tiles is through a configuration object that you send as a parameter to the constructor.