anyboxer
npm routeboxer
Last updated 5 years ago by olenin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install anyboxer 
SYNC missed versions from official npm registry.

anyboxer

server-side routeboxer

Installation

npm install anyboxer --save

Usage

var anyBoxer = require('anyboxer');

var options = {
    split: false,
    reverse: true
}

anyBoxer(data, options, function(err, boxes) {
    //
});

Where data has a FeatureCollection format.

If split is true the result will be divided. Default split is false.

If reverse is true then each [lat, lon] coordinates will become [lon, lat].

data example

var data = { 
    "type": "FeatureCollection",
    "features": [
        {
           "type": "Feature",
           "geometry": {
               "type": "LineString",
               "coordinates": [ [0,0], [1,1] ] // [ [lat, lon], [lat, lon] ]
           },
           "properties": {
              "fat": 5
           }
        },
    ]
};

License

MIT

Current Tags

  • 0.4.9                                ...           latest (5 years ago)

1 Versions

  • 0.4.9                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |