gtran-topojson

1.0.2 • Public • Published

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;
});
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    2
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i gtran-topojson

Weekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • haoliang