Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
leaflet-layerindex
Advanced tools
Efficient spatial index for Leaflet layers. It works recursively
for L.FeatureGroup
objects.
Requires the Magnificient RTree.js
Check out the live demo
L.Map.include(L.LayerIndexMixin);
var map = L.map(...);
...
var layer = L.GeoJSON(data).addTo(map);
map.indexLayer(layer);
// Search visible features for example
map.on('moveend', function () {
var shown = map.search(map.getBounds());
console.log(shown.length + ' objects shown.');
});
L.IndexedGeoJSON = L.GeoJSON.extend({
includes: L.LayerIndexMixin,
initialize: function (geojson, options) {
// Decorate onEachFeature to index layers
var onEachFeature = function (geojson, layer) {
this.indexLayer(layer);
if (this._onEachFeature) this._onEachFeature(geojson, layer);
};
this._onEachFeature = options.onEachFeature;
options.onEachFeature = L.Util.bind(onFeatureParse, this);
// Parent initialization
L.GeoJSON.prototype.initialize.call(this, geojson, options);
}
});
var layer = L.IndexedGeoJSON(data).addTo(map);
var aroundToulouse = layer.searchBuffer(L.latLng([43.60, 1.44]), 0.1);
FAQs
Spatial index of Leaflet layer objects using RTree.js
The npm package leaflet-layerindex receives a total of 5 weekly downloads. As such, leaflet-layerindex popularity was classified as not popular.
We found that leaflet-layerindex 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.