routing-arcgis

0.0.3 • Public • Published

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:

Response

All methods return a promise.

Dependencies (2)

Dev Dependencies (3)

Package Sidebar

Install

npm i routing-arcgis

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • stephangeorg