Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
leaflet-spin
Advanced tools
Shows a nice spin cursor on the map. See online demo.
This plugin requires Spin.js.
npm install leaflet-spin
Download the latest release and include it in your app
This plugin can be loaded with AMD/CommonJS.
map.spin(true); // on
...
map.spin(false); // off
You can control apparence of wheel by passing options on first spin()
call.
map.spin(true, {lines: 13, length: 40});
More details on available options...
map.spin(true);
$.ajax({url: 'http://server/api/'})
.done(function() {
map.spin(false);
})
.error(function () {
map.spin(false);
});
Using events:
var layer = L.geoJson(null).addTo(map);
layer.fire('data:loading');
$.getJSON('http://server/path.geojson', function (data) {
layer.fire('data:loaded');
layer.addData(data);
});
var layer = L.geoJson.ajax();
layer.addUrl('http://server/path.geojson');
You can use example folder for testing.
npm run release # minify js and copy leaflet.spin.min.js in example folder
npm run deploy # deploy to gh-pages
Should work with all 0.x and 1.x versions of leaflet
Add the dependency to spin.js in the module definition
Update export and extend system
Update structure with official Leaflet plugin rules
Update bower dependencies
Initial version
FAQs
Show a spinner on a Leaflet map using Spin.js
The npm package leaflet-spin receives a total of 1,265 weekly downloads. As such, leaflet-spin popularity was classified as popular.
We found that leaflet-spin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.