Created
October 8, 2015 10:01
-
-
Save leopectus/3342c6b334cf89f33c68 to your computer and use it in GitHub Desktop.
Maps API for JavaScript snippet generated by the HERE API Explorer (calculate route from A to B using public transport)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @param {H.service.Platform} platform | |
*/ | |
function calculateRoute(platform) { | |
var router = platform.getRoutingService(), | |
parameters = { | |
waypoint0: '52.5208,13.4093', | |
waypoint1: '52.5034,13.3295', | |
mode: 'fastest;publicTransport', | |
combineChange: 'true'}; | |
router.calculateRoute(parameters, | |
function (result) { | |
alert(result); | |
}, function (error) { | |
alert(error); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment