![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
leaflet-virtual-grid
Advanced tools
A lightweight DOM-less tile layer for Leaflet that can be used to query APIs with bounding boxes or center/radius as opposed to loading tiles.
You can use new VirtualGrid
to generate simple, cacheable, grids of L.LatLngBounds
objects you can use to query APIs. This lets you query APIs for smaller units and space and never make a call data in the same area twice.
var vg = new VirtualGrid();
// listen for when new cells come into the view for the first time
vg.on("cellcreate", function(e){
console.log(e.type, e);
});
// listen for when cells reenter the view
vg.on("cellenter", function(e){
console.log(e.type, e);
});
// listen for when cells leave the view
vg.on("cellleave", function(e){
console.log(e.type, e);
});
// add the grid to the map
vg.addTo(map);
var MyGrid = new VirtualGrid.extend({
createCell: function(bounds, coords){
console.log('create cell', bounds, coords);
},
cellEnter: function(bounds, coords){
console.log('cell enter', bounds, coords);
},
cellLeave: function(bounds, coords){
console.log('cell leave', bounds, coords);
}
})
var thingWithGrid = new MyGrid().addTo(map);
var vg = new VirtualGrid({
cellSize: 512,
updateInterval: 150
});
updateInterval
How often to update the grid. Defaults to 150
cellSize
How big each cell is in pixels. Defaults to 512
Here is what the grid looks like under the hood...
Each rectangle would represent a call to an API or query to a data source. You would only make one request per cell so you not make repeat calls to areas like requesting all the data in a map view when a user performs a small pan.
Most of this code is based on L.Grid
from https://github.com/Leaflet/Leaflet/commit/670dbaac045c7670ff26198136e440be9c2bb3e5.
[1.0.4]
FAQs
A lightweight DOM-less tile layer for Leaflet that can be used to query APIs with bounding boxes or center/radius as opposed to loading tiles.
The npm package leaflet-virtual-grid receives a total of 862 weekly downloads. As such, leaflet-virtual-grid popularity was classified as not popular.
We found that leaflet-virtual-grid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.