anyboxer
v0.4.9
Published
npm routeboxer
Downloads
1
Readme
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