Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I'm trying to run through this node-mapnik tutorial:

http://build-failed.blogspot.com/2014/04/generating-server-side-tile-maps-with.html

I was able to get mapnik-v2.2.0 to install manually, and get its c++ and python demos to install, but I don't think node-mapnik uses that. Is there any way I can figure out what is wrong here? One clue my be that node-mapnik complains about not being able to load the gdap and ogr datasources when the server first starts (at the loadDataSources line), although this tutorial uses a shapefile so I don't see why that would matter.

I tried to use var bbox = mercatorO.bbox(x, y, z, false, '900913'); but i am getting below error

var bbox = mercatorO.bbox(x, y, z, false, '900913');
^
TypeError: Object function SphericalMercator(options) {
options = options || {};
this.size = options.size || 256;
if (!cache[this.size]) {
var size = this.size;
var c = cache[this.size] = {};
c.Bc = [];
c.Cc = [];
c.zc = [];
c.Ac = [];
for (var d = 0; d < 30; d++) {
c.Bc.push(size / 360);
c.Cc.push(size / (2 * Math.PI));
c.zc.push(size / 2);
c.Ac.push(size);
size *= 2;
}
}
this.Bc = cache[this.size].Bc;
this.Cc = cache[this.size].Cc;
this.zc = cache[this.size].zc;
this.Ac = cache[this.size].Ac;
} has no method 'bbox'
at C:\Program Files\nodejs\tile.js:72:22
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900