nativescript-geolocation icon indicating copy to clipboard operation
nativescript-geolocation copied to clipboard

Calling enableLocationRequest too early does not trigger popup

Open jamesward opened this issue 8 years ago • 1 comments

Which platform(s) does your issue occur on?

iOS emulator and physical device

Please, provide the following version numbers that your issue occurs with:

  • CLI: 3.2.1
  • Cross-platform modules: 3.2.0
  • Runtime(s): tns-ios
  • Plugin(s): "nativescript-geolocation": "4.1.0"

Please, tell us how to recreate the issue in as much detail as possible.

Call geolocation.enableLocationRequest() on navigatingTo causes an error Location service is disabled and does not trigger the request location access popup. Switching to a loaded event solves this.

Not sure if this just needs to be documented or if there is a fix possible.

jamesward avatar Oct 15 '17 17:10 jamesward

In angular, I call enableLocationRequest() from a setTimeout function in ngOnInit().

indianazhao avatar Oct 17 '17 07:10 indianazhao