Geolocation timeout issue

Hi guys i’m facing an little issue with geolocation module.
timeout for geolocation doesn’t work as expected, sometimes the geolocation take some time before retrieving a geolocation (+ 25 secondes)
so i need to use a timeout to cut this.
i used a timeout to just wait 5s before rendering a geolocation, the timeout end , but i dont have any geolocation retrieved.

Phones that i’m using for testing:

Lg Bello width android 4.4.2
Lg G4 stylus with android 6.0

code:

function getLoc(){
   var timeout = 5000;
  geoLocation.getLocation(timeout).then(function(location){
    console.log(JSON.stringify(location))
  })
}

Many thanks

I don’t understand exactly what you’re asking here. Are you saying that it sometimes takes >25 seconds to get the geolocation, and if you set the timeout lower than that, you sometimes don’t get a result? If so, that sounds like expected behaviour to me.