Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mapnik

Package Overview
Dependencies
Maintainers
0
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapnik

C++ map rendering library for node

  • 0.2.10
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Node-Mapnik

Bindings to the Mapnik tile rendering library for node.

var mapnik = require('mapnik');
var http = require('http');

var port = 8000;

http.createServer(function (req, res) {
  var map = new mapnik.Map(256,256);
  map.load("./examples/stylesheet.xml");
  map.zoom_all();
  map.render(map.extent(),"png",function(err,buffer){
      if (err) {
        res.writeHead(500, {'Content-Type':'text/plain'});
        res.end(err.message);
      } else {
        res.writeHead(200, {'Content-Type':'image/png'});
        res.end(buffer);
      }
  });
}).listen(port);

For more see 'examples/'

Development Status

Prototype at this point, API will be frequently changing.

Developed on OS X (10.6)

Tested on Debian Squeeze and Centos 5.4.

Depends

node (development headers)

mapnik (latest trunk >r2397)

Installation

Install node-mapnik:

$ git clone git://github.com/mapnik/node-mapnik.git
$ cd node-mapnik
$ ./configure
$ make
$ sudo make install
$ node test.js

Make sure the node modules is on your path:

export NODE_PATH=/usr/local/lib/node/

For more details see 'docs/install.txt'

Or you can install via npm:

$ npm install mapnik

Quick rendering test

To see if things are working try rendering a world map with the sample data

From the source checkout root do:

$ examples/render.js examples/stylesheet.xml map.png

Examples

See the 'examples/' folder for more usage examples.

License

BSD, see LICENSE.txt

Keywords

FAQs

Package last updated on 28 Feb 2011

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc