0.0.2 • Published 6 years ago

here-maps-node v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Build Status

Here Maps API for Node.js

Inspired by the Google Maps API wrapper for Node.js

Forked from node-heremaps

This library implements the following Here Maps APIs.

Installation

npm install here-maps-node

What does it cover

Maps API REST SERVICES:

Usage

var HereMapsAPI = require('here-maps-node').default; // es5
import HereMapsAPI from 'here-maps-node'; // es6

var config = {
  app_id:   '<YOUR-APP-ID>',
  app_code: '<YOUR-APP-CODE>'
};
var hmAPI = new HereMapsAPI(config);

// geocode API
var geocodeParams = {
  "searchtext":    "121, Curtain Road, EC2A 3AD, London UK"
};

hmAPI.geocode(geocodeParams, function(err, result){
  console.log(result);
});

// matrix routing API
var matrixRoutingParams = {
  start0: "25.6586716,-100.3583278",
  destination0: "25.6522234,-100.2942806",
  mode: "fastest;car;traffic:enabled;" // this mode is set by default
};

hmAPI.matrixRouting(matrixRoutingParams, function(err, result){
  console.log(result);
});
0.0.2

6 years ago

0.0.1

6 years ago