Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
nodetiles-core
Advanced tools
Readme
Nodetiles-core is a javascript library for rendering map tiles suitable for slippy-maps and static images. Features include:
/* Set up the libraries */
var nodetiles = require('nodetiles-core'),
GeoJsonSource = nodetiles.datasources.GeoJson,
Projector = nodetiles.projector,
fs = require('fs'); // we'll output to a file
/* Create your map context */
var map = new nodetiles.Map({
projection: "EPSG:4326" // set the projection of the map
});
/* Add some data */
map.addData(new GeoJsonSource({
name: "world",
path: __dirname + '/countries.geojson',
projection: "EPSG:900913"
}));
/* Link your Carto stylesheet */
map.addStyle(fs.readFileSync('./style.mss','utf8'));
/* Render out the map to a file */
map.render({
// Make sure your bounds are in the same projection as the map
bounds: {minX: -180, minY: -90, maxX: 180, maxY: 90},
width: 800, // number of pixels to output
height: 400,
callback: function(err, canvas) {
var file = fs.createWriteStream(__dirname + '/map.png'),
stream = canvas.createPNGStream();
stream.on('data', function(chunk){
file.write(chunk);
});
stream.on('end', function(){
console.log('Saved map.png!');
});
}
});
Big THANKS to Tom Carden whose original gist inspired this project. He also has other very useful projects.
Copyright (c) 2012-2013 Code for America. See LICENSE for details.
FAQs
Joyful map rendering with Node.js.
The npm package nodetiles-core receives a total of 1 weekly downloads. As such, nodetiles-core popularity was classified as not popular.
We found that nodetiles-core 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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).