
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
leaflet-glify-layer
Advanced tools
Add-on for the Leaflet.glify plugin to provide more leaflet-idiomatic bindings
Add-on for the Leaflet.glify plugin to provide more leaflet-idiomatic bindings.
Together this provides fast webgl rendering for GeoJSON FeatureCollections (currently limited to polygons, lines and points).
wow, very data

The leaflet-glify plugin is great 🙏🙏 but does not behave like a typical leaflet layer, e.g.
layer.addTo(map), map.removeLayer(layer) don't work 'the leaflet way'[lng,lat])layer.getBounds)npm install leaflet-glify-layer --save
This plugin acts as an add-on for L.glify, to managing the various L.glify layers required if you provide mutiple geometry types, and providing other leaflet-iodomatic methods/bindings.
Most importantly - GeoJSON can either be provided as:
FeatureCollection containing features of mixed geometry typesFeatureCollection for each geometry type (faster)Note: L.glify expects points as an array of coords rather than GeoJSON features, so for now - the full GeoJSON object/properties are lost.. 😞
const myLayer = L.glify.layer({
// Option #1. A single GeoJSON FeatureCollection that needs to be sorted
geojson: {},
// Option #2. -> FeatureCollection's that are pre-sorted by type
type: {
shapes: {}, // FeatureCollection of Polygon's
lines: {}, // FeatureCollection of LineString's
points: {}, // FeatureCollection of Point's
},
// L.glify options - currently a single set
// of options is used for all geometry types
glifyOptions: {
// defaults vaguely match leaflet
border: true,
opacity: 0.2,
size: 10
}
// OPTIONAL - supply the name of a custom pane,
// will be created if doesn't exist, defaults to overlayPane
// (used by L.glify as `pane` option)
// https://leafletjs.com/reference-1.6.0.html#map-pane
paneName: "overlayPane",
// OPTIONAL - callback to be notified when types
// have been sorted, L.glify will be created
onTypesReady() {},
// OPTIONAL - callbacks when layer is added/removed from map
onAdd: function(){},
onRemove: function(){},
});
myLayer.addToMap(map);
| method | params | description |
|---|---|---|
setStyle | options: { color, border, opacity, size} | Updates style settings |
getBounds | Returns L.latLngBounds for the L.glify.layer | |
render | Force re-render | |
update | (data, index) | Calls update on L.glify layers |
remove | (index) | Calls remove on L.glify layers |
npm install
npm run build
FAQs
Add-on for the Leaflet.glify plugin to provide more leaflet-idiomatic bindings
We found that leaflet-glify-layer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.