A.kadir olmez
A.kadir olmez

Reputation: 321

how get current position with Here map js 3 api?

how can getCurrentPosition with here map 3 api?

var positioning = new nokia.maps.positioning.Manager(); // this code v2 positioning.getCurrentPosition();

Upvotes: 2

Views: 1629

Answers (1)

echom
echom

Reputation: 932

You can easily replace it with the standard Geolocation API (https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation). You will find that the signatures match pretty much.

Just make sure you check whether there actually is a geolocation object in navigator.

navigator.geolocation.getCurrentPosition(function(position) {
  console.log(position);
});

Upvotes: 2

Related Questions