Skip to content

Commit

Permalink
touchups to tile app
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Dec 16, 2010
1 parent 9764e46 commit 7d1f49c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -46,6 +46,10 @@
$ node-waf configure build 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'


Expand Down
13 changes: 11 additions & 2 deletions examples/tile/app.js
Expand Up @@ -5,10 +5,17 @@ var mapnik = require('mapnik')
, http = require('http')
, url = require('url')
, tile = 256
, port = 8000
, img = 'google_point_8.png'
, async_render = false;

var usage = 'usage: app.js <port>';

var port = process.ARGV[2];

if (!port) {
console.log(usage);
process.exit(1);
}

// postgis table
var table = 'points9';
Expand All @@ -27,6 +34,8 @@ var s = '<Map srs="' + merc + '">';
s += '<Style name="style">';
s += '<Rule>';
s += '<PointSymbolizer file="google_point_8.png" allow_overlap="true" />';
//s += '<PointSymbolizer file="point.svg" allow_overlap="true" />';
//s += '<MarkersSymbolizer type="ellipse" fill="red" allow_overlap="true" placement="point"/>';
s += '</Rule>';
s += '</Style>';

Expand Down Expand Up @@ -83,7 +92,7 @@ http.createServer(function (request, response) {
response.writeHead(200, {
'Content-Type':'text/plain'
});
response.end("No BBOX provided!");
response.end("no x,y,z provided");
}
}).listen(port);

Expand Down
1 change: 1 addition & 0 deletions examples/tile/launch_nodes
@@ -1,3 +1,4 @@
echo 'now launch: nginx `pwd`/nginx.conf'
CMD="./app.js "
$CMD 8091 &
$CMD 8092

0 comments on commit 7d1f49c

Please sign in to comment.