Geolocation API - getCurrentPosition() does not resolve when watchPosition() is activated on Chrome

32 Views Asked by At

Is it normal that navigator.geolocation.getCurrentPosition() does not resolve on Chrome if navigator.geolocation.watchPosition() was called before.

For instance the issue can be reproduced with this:

navigator.geolocation.watchPosition(function(position) { console.log("watchPosition", position); }, console.error);

//this wont resolve on Chrome
navigator.geolocation.getCurrentPosition(function(position) { console.log("getCurrentPosition", position); }, console.error)

This issue was already observed in this question: navigator.geolocation.getCurrentPosition and navigator.geolocation.watchPosition are not working if used in same Page

0

There are 0 best solutions below