Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rasterizer is not defined #1

Closed
BHare1985 opened this issue Jun 8, 2015 · 1 comment
Closed

rasterizer is not defined #1

BHare1985 opened this issue Jun 8, 2015 · 1 comment

Comments

@BHare1985
Copy link

Seems like everytime I find a new feature that I want to utilize, you seem to be about 1 week ahead of me in implementing it, it's really coincidental! I found out that vector tiles may be a good fit for me yesterday, and after about 2 hours of googling I find out you have this. This also happened with jsonp utfgrids too.

Anyways, I am getting an error: rasterizer is not defined. I have npm-installed both tilestrata-vtile-raster and ilestrata-vtile - couldnt find the function anywhere. Here is my server.js

var tilestrata = require('tilestrata');
var server = tilestrata.createServer();

var args = process.argv.slice(2);

var vtile = require('tilestrata-vtile');
var vtileraster = require('tilestrata-vtile-raster');

var common = {
    xml: 'C:/projects/misc/node-mapnik2/' + args[0],
    tileSize: 256,
    metatile: 1,
    bufferSize: 128
};

server.layer('basemap')
    .route('t.pbf').use(vtile(common))
    .route('t.png').use(vtileraster(common, {
        tilesource: ['basemap', 't.pbf']
    }))
    .route('i.json').use(rasterizer(common, {
        tilesource: ['basemap', 't.pbf'],
        interactivity: true
    }));

// start accepting requests
server.listen(8000, function(err) {
    if (err) console.log(err); 
    }
);

On a unrelated note, you may be interested in my fork of Windshaft and getting dynamic mapnik style rendering based on SQL/Requests: https://github.com/BHare1985/Windshaft (The readme is not updated) I know we talked about this before naturalatlas/tilestrata#2

I have it working with Windows for PostGIS and MSSQL (using VC2015RC and mssql plugin). It's using a special VC2015 node_mapnik but the benefit is that it runs newest node-mapnik and newest tilelive and tilelive-mapnik but with grainstore/millstone for creating styles on the fly.

@brianreavis
Copy link
Member

Hah, awesome! This is another case of a typo in the readme :) Switch that to vtileraster and it should work. If you notice anything else janky, I'd love to hear about it – it's a little in the experimental stage.

On a unrelated note, you may be interested in my fork of Windshaft and getting dynamic mapnik style rendering based on SQL/Requests: https://github.com/BHare1985/Windshaft (The readme is not updated) I know we talked about this before naturalatlas/tilestrata#2

Slick. It'd be really cool to have a dedicated plugin for it one of these days!

brianreavis added a commit that referenced this issue Jun 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants