Reputation: 321
how can getCurrentPosition with here map 3 api?
var positioning = new nokia.maps.positioning.Manager(); // this code v2 positioning.getCurrentPosition();
Upvotes: 2
Views: 1629
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