Created
November 7, 2016 09:34
-
-
Save here-devblog-gists/19cd9a7da3344a731c1399c2c1a0aa45 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
HEREMap.prototype.updateMyPosition = function(event) { | |
this.position = { | |
lat: event.coords.latitude, | |
lng: event.coords.longitude | |
}; | |
// Remove old location marker if it exists | |
this.updateMarker('myLocation', this.position) | |
// Draw the route from current location to HERE HQ if not yet drawn | |
this.drawRoute(this.position, HEREHQcoordinates); | |
this.map.setCenter(this.position); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment