
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
leaflet.vectorgrid
Advanced tools
Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet 1.0
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/leaflet.vectorgrid@latest/dist/Leaflet.VectorGrid.bundled.js"></script>
or, with the same caveats about bundled dependencies:
<script src="https://unpkg.com/leaflet.vectorgrid@latest/dist/Leaflet.VectorGrid.js"></script>
This plugin exposes two new classes:
L.VectorGrid.Slicer
for displaying GeoJSON or TopoJSON dataL.VectorGrid.Protobuf
for displaying vector tiles from an online tile serverYou can find the API documentation, and the explanation about the styling, at:
http://leaflet.github.io/Leaflet.VectorGrid/vectorgrid-api-docs.html
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
.
<g>
roups in SVG<canvas>
es in CanvasgetBounds()
support for the slicer (inherit/extrapolate from geojson data)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": 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.
1.3.0 (2017-08-28)
setFeatureStyle
(#42 by @lediur)for
loops in preference over for...in
(#27, #70 by @perliedman)master
to canvas renderer (#78 by @jkuebart)FeatureLayer
into Symbolizers
(by @IvanSanchez)fetch
, adds cookie capability for example (#100 by @tlaitinen)setUrl
method to L.VectorGrid.Protobuf
(#105 by @frodrigo)FAQs
Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet 1.0
The npm package leaflet.vectorgrid receives a total of 6,940 weekly downloads. As such, leaflet.vectorgrid popularity was classified as popular.
We found that leaflet.vectorgrid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.