Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
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-2015 Code for America. See LICENSE for details.
FAQs
Joyful map rendering with Node.js.
The npm package nodetiles-core receives a total of 2 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.