pgtiles

0.0.3 • Public • Published

node-pgtiles

PostgreSQL schema for vector tiles. Modeled from Mapbox mbtiles and CartoDB postgresql extensions

Dependencies

Install

$ npm install pgtiles

Use

var pgtiles = require('pgtiles');
var connectionString = 'postgres://username:password@host:dbname/5432';
 
var tileSchema = pgtiles(connectionString);
 
// Add the table schema and functions to the designated PostgreSQL database
tileSchema.create(function(err, result) {
  if (err) {
   // handle error
  }
 
  console.log(result);
  // Result show the tables and functions created
});
 
// Remove the tables and functions to rollback the database
tileSchema.rollback(function(err, result) {
  if (err) {
    // handle error
  }
 
  console.log(result);
  // Result show the tables and functions dropped
});

Andy B

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.31latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.31
0.0.20
0.0.10

Package Sidebar

Install

npm i pgtiles

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • apburnes