1.0.2 • Published 8 years ago

gtran-topojson v1.0.2

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

gtran-topojson

A simple wrap of Mike Bostock's topojson for the consistence with gtran.

Installation

npm install gtran-topojson

Functions

  • setPromiseLib(object)

    Specify the promise library. If not, the library will use the native Promise.

  • fromGeoJson(geojson)

    Convert the geojson to topojson.

Use Example

var topo = require('gtran-topojson');

// if specific promise library is needed
topo.setPromiseLib(require('bluebird'));

// Save geojson into KMZ file
topo.fromGeoJson(geojson).then(function(object) {
    var topojson = object;
});