routing-arcgis
v0.0.3
Published
Leightweight node.js wrapper for the ESRI ArcGIS Online Routing Services
Downloads
1
Maintainers
Readme
RountingArcGIS
A leightweight promises based node.js wrapper for the ArcGIS Online Routing Services.
Installation
Installing using npm:
npm i routing-arcgis --save
Usage
Initialization
var RoutingArcGIS = require('routing-arcgis'),
routing = new RoutingArcGIS({
client_id: 'YOUR CLIENT ID',
client_secret: 'YOUR CLIENT SECRET'
});
The constructor function also takes an optional configuration object:
- client_id: id for OAuth
- client_secret: secret for OAuth
- endpoint: custom ArcGIS endpoint
Route
routing.route('13.428426,52.504102','13.437481,52.493651'],{})
.then(function(response){
console.log(response);
})
.catch(function(error){
console.log(error);
});
Optional parameters:
- you can pass all request parameters
Response
All methods return a promise.