forked from mapnik/node-mapnik
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add README for new mapnik node.js bindings
- Loading branch information
Dane Springmeyer
committed
Nov 16, 2010
0 parents
commit 25a025e
Showing
1 changed file
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
|
||
# Node-Mapnik | ||
Bindings to the [Mapnik](http://mapnik.org) tile rendering library for [node](http://nodejs.org). | ||
|
||
var mapnik = require('mapnik'); | ||
var express = require('express'); | ||
|
||
var app = express.createServer(); | ||
app.get('/', function(req, res) { | ||
var map = new mapnik.Map(256,256); | ||
map.load("./examples/stylesheet.xml"); | ||
map.zoom_all(); | ||
res.contentType("tile.png"); | ||
res.send(map.render_to_string()); | ||
}); | ||
|
||
app.listen(8000); | ||
|
||
For more see 'examples/' | ||
|
||
|
||
## Development Status | ||
|
||
Prototype at this point, API will be frequently changing. | ||
|
||
Developed on OS X (10.6), not yet tested on linux. | ||
|
||
|
||
## Depends | ||
|
||
node (development headers) | ||
mapnik (latest trunk) | ||
|
||
|
||
## Installation | ||
|
||
Install node-mapnik: | ||
|
||
$ git clone git://github.com/mapnik/node-mapnik.git | ||
$ cd node-mapnik | ||
$ node-waf configure build install | ||
$ node test.js | ||
|
||
For more details see 'docs/install.txt' | ||
|
||
|
||
## 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. | ||
|
||
|
||
## In Action | ||
|
||
See https://github.com/tmcw/tilelive.js | ||
|
||
|
||
## License | ||
|
||
BSD, see LICENSE.txt |