Created
November 7, 2016 09:26
-
-
Save here-devblog-gists/077ec38adf1bdab402384103096eb184 to your computer and use it in GitHub Desktop.
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
HERERouter.prototype.getRouteLine = function(route) { | |
var routeShape = route.shape; | |
// Create a strip to use as a point source for the route line | |
var strip = new H.geo.Strip(); | |
// Push all the points in the shape into the strip: | |
routeShape.forEach(function(point) { | |
var parts = point.split(','); | |
strip.pushLatLngAlt(parts[0], parts[1]); | |
}); | |
// Create a polyline to display the route: | |
var routeLine = new H.map.Polyline(strip, | |
{ style: this.routeLineStyles.normal } | |
); | |
return routeLine; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment