nativescript-mapbox
nativescript-mapbox copied to clipboard
Location not available in getUserLocation method
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
@EddyVerbruggen Actually I have 2 events, locationPermissionGranted
and locationPermissionDenied
. And when I open the app, the second one gets fired.
I found out this works in some android devices. I installed nativescript-geolocation
plugin. It worked on my phone (with android 7). And doesn't work in another phone (with android 5)
The getUserLocation
method doesn't work on my phone and works on the other phone mentioned above.
@vahidvdn see #326
@EdvaldoLima Thanks, I'm going to take a quick look at it. But even if it fixes the bug, the issue should be still open.
Same problem here, showUserLocation="true"
as well as getUserLocation()
don't work at all. The "solution" in #326 looks too complex and temporary, and I don't understand why #326 is even closed.
@DenisNP the issue #326 is still open, and also the solution proposed by mikkelmoerchkv has resolved the problem of user location for my app, with his changes now I can see the user pointer location
EDIT : finally the solution of mikkelmoerchkv is not working with android >= 9, so do not use it
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