![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
l.lg.c.kfork
Advanced tools
Readme
Provides basic collision detection in order to declutter large or overlapping sets of Leaflet markers.
Don't like READMEs? Then see http://mazemap.github.io/Leaflet.LayerGroup.Collision/demo/demo.html
Inspired by the ClusterMarker plugin, this plugin works by hiding any markers that overlap each other - only the marker which was first added to the LayerGroup will be shown.
Collision detection is done by using the dimensions of the DOM elements inside the L.Marker
's icon; this has been tested only using display:block
elements. L.Layer
s which are not markers will be always shown.
This plugin uses Vladimir Agafonkin's rbush
library for the grunt work of detecting bounding box collisions.
Caveats: this plugin expects markers to not change dynamically, to not be draggable, and marker deletion is not supported (yet). Currently everything is recalculated on zoom change. Only partial data caching is done - marker bounding boxes are cached; collisions per zoom level are recalculated.
Works as a normal Leaflet LayerGroup, just add your markers to it.
When instantiating, can take the 'margin' option. This defines the margin between markers, in pixels, and defaults to zero.
var collisionLayer = L.layerGroup.collision({margin:5});
collisionLayer.addTo(map);
collisionLayer.add( L.marker( markeroptions ) );
This plugin also extends L.FeatureGroup
into L.FeatureGroup.collision
and L.GeoJSON
into L.GeoJSON.collision
.
There is a live demo at http://mazemap.github.io/Leaflet.LayerGroup.Collision/demo/demo.html
The demo loads about 1000 placenames, each of them being a L.DivIcon
with two boxes.
The demo includes data from Natural Earth, which is public domain. Please visit http://www.naturalearthdata.com/downloads/10m-cultural-vectors/10m-populated-places/ for more information.
In order to try the demo locally, just clone the repo, run bower install
(if using the gh-pages
branch, use git clone --recursive
instead to pull the rbush
submodule), and see the file demo/demo.html
. You can choose to load more or less data by commenting/uncommenting the lines that include the natural earth data files.
FAQs
Leaflet plugin for uncluttering L.Markers using basic collision detection.
The npm package l.lg.c.kfork receives a total of 0 weekly downloads. As such, l.lg.c.kfork popularity was classified as not popular.
We found that l.lg.c.kfork 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.