question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Location not available in getUserLocation method

See original GitHub issue

I use showUserLocation="true" in the markup (Angular template) but it doesn’t show my location. Also when I call the method as following:

this.map.getUserLocation();

I get the following error:

ERROR Error: Uncaught (in promise): Location not available

Using nativescript 6.1

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
zhitomir-oreshenski-mmcommented, Dec 18, 2019

Hello all,

It seems that I’ve found same issue on Android version 9+. On IOS devices everything is working properly. Can someone confirm if he manage to fix it without installing additional external plugin in order to resolve getUserLocation issue?

Br, Zhi

1reaction
vahidvdncommented, Oct 26, 2019

@EddyVerbruggen Actually I have 2 events, locationPermissionGranted and locationPermissionDenied. And when I open the app, the second one gets fired.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Location not available in getUserLocation method #333 - GitHub
I found out this works in some android devices. I installed nativescript-geolocation plugin. It worked on my phone (with android 7).
Read more >
Get the user's location - UWP applications - Microsoft Learn
The RequestAccessAsync method prompts the user for permission to access ... NotifyUser("Location is not available on this version of the OS.
Read more >
Location - Expo Documentation
expo-location allows reading geolocation information from the device. ... Gets the last known position of the device or null if it's not available...
Read more >
Using the Geolocation API - MDN Web Docs
To obtain the user's current location, you can call the getCurrentPosition() method. This initiates an asynchronous request to detect the user's ...
Read more >
How to Fix “Location Not Available” on iPhone - MakeUseOf
Sometimes, the Messages or the Find My app can bug out and result in the "Location Not Available" error. The quickest way to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found