Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

geolocation.getCurrentPosition(...) on Ionic doesn't work

ANSWERED

The function call of geolocation.getCurrentPosition(...) of the device Geolocation API always runs into the error handler which says "POSITION_UNAVAILABLE". Does anybody now how to enable the GPS support of the device API?

Best Answer
1 BEST ANSWER

Accepted Solutions

Have you tried it outside? The device GPS doesn't like being indoors.

View best answer in original post

Best Answer
3 REPLIES 3

Have you tried it outside? The device GPS doesn't like being indoors.

Best Answer

That makes sense. Now it works. Thanks!

Best Answer

I tried putting the watch on the window. Launching an exercise, the GPS takes few seconds and then connects. But if I run the function, gives me Error 2, position unavailable. Am I doing something wrong?

 

Best Answer
0 Votes