Skip to content

Instantly share code, notes, and snippets.

@here-devblog-gists
Created October 7, 2016 10:07
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/8da303c7d9fe3323268879140c9394e8 to your computer and use it in GitHub Desktop.
Save here-devblog-gists/8da303c7d9fe3323268879140c9394e8 to your computer and use it in GitHub Desktop.
function updatePosition (event) {
var HEREHQcoordinates = {
lat: event.coords.latitude,
lng: event.coords.longitude
};
var marker = new H.map.Marker(HEREHQcoordinates);
map.addObject(marker);
map.setCenter(HEREHQcoordinates);
}
navigator.geolocation.watchPosition(updatePosition);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment