Skip to content

Instantly share code, notes, and snippets.

@here-devblog-gists
Created October 13, 2016 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save here-devblog-gists/8a647ff84dd523ed4695aea087902ef0 to your computer and use it in GitHub Desktop.
Save here-devblog-gists/8a647ff84dd523ed4695aea087902ef0 to your computer and use it in GitHub Desktop.
router.calculateRoute({
// calculateRouteParams object
'mode': 'fastest;car',
// Start and end point
'waypoint0': 'geo!52.530974,13.384944', // HERE HQ in Berlin, Germany
'waypoint1': 'geo!52.5206,13.3862', // Friedrichstraße Railway Station in Berlin, Germany
// response formatting
'representation': 'display'
},
// onSuccess callback
function(result) {
console.log('Route found!', result);
},
// onError callback
function(error) {
console.error('Oh no! There was some communication error!', error);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment