Skip to content

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

Notifications You must be signed in to change notification settings

mapping/node-pgtiles

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 52.0%
  • PLpgSQL 48.0%