cordova-plugin-geolocation is not responding instantly.

  • 1
  • Problem
  • Updated 4 years ago
I used "cordova-plugin-geolocation" in my app, with static map image.
The static map is loading instantly, when I am checking on mobile browser, but gps is unable to find lat and lon values instantly, only 3 times it's successful to find coordinates in my 20 attempts, otherwise same message showing everytime" The request to get user location timed out. I set timedout period 20 seconds..
After a lots of testing on different android devices with different versions, having same problem.
I am using JQM 1.4.5. cli version(6.1.0), phonegap build.
Please help me.
Photo of Saba Rais

Saba Rais

  • 724 Posts
  • 3 Reply Likes

Posted 4 years ago

  • 1
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Saba,
are you sitting indoors? If so, go outside and try. If that does not work, make sure you can see the sky in all four directions.

Jesse
Photo of Saba Rais

Saba Rais

  • 724 Posts
  • 3 Reply Likes
Yes, mostly I checked indoors.Thanks @Jesse yes I tried outdoor It's working Instantly, but Indoors it's working sometime. Thanks for reply :)
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Saba,
Tutorial for maps.
https://github.com/jessemonroy650/goo...

Jesse
Photo of Saba Rais

Saba Rais

  • 724 Posts
  • 3 Reply Likes
@Jesse Sir,
Thanks again for tutorial. Handfull tutorial