Install Leaflet.VectorGrid
masterYou can install Leaflet.VectorGrid via npm or include it directly in your HTML using unpkg.com.
Using npm
Install the package using:
npm install leaflet.vectorgridThis provides two files in the dist/ directory:
Leaflet.VectorGrid.js: Use this if you are managing dependencies (likegeojson-vt,pbf,topojson, andvector-tile) manually.Leaflet.VectorGrid.bundled.js: Use this if you want a single file that includes all dependencies.
Using unpkg.com
For quick integration without npm, add a script tag to your HTML:
With bundled dependencies:
<script src="https://unpkg.com/leaflet.vectorgrid@latest/dist/Leaflet.VectorGrid.bundled.js"></script>Without bundled dependencies:
<script src="https://unpkg.com/leaflet.vectorgrid@latest/dist/Leaflet.VectorGrid.js"></script>