Nodetiles-PostGIS is a data source for Nodetiles that allows you to load and render geographic data from a PostGIS database (PostGIS is Postgres with geographic additions).
/* Set up the libraries */
var nodetiles = require('nodetiles-core');
var PostGIS = require('nodetiles-postgis');
/* Create your map context */
var map = new nodetiles.Map();
/* Add some data from PostGIS! */
map.addData(new PostGIS({
connectionString: "postgresql://localhost/database_name",
tableName: "countries",
geomField: "wkb_geometry",
projection: "EPSG:900913"
}));
Copyright (c) 2012-2013 Code for America. See LICENSE for details.