Error: Location not available
See original GitHub issueI have the following code snippets:
In NativeScript-Vue.
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<Mapbox
accessToken="TOKEN"
mapStyle="streets"
latitude="-5.852365494"
longitude="-35.36503315"
hideCompass="false"
zoomLevel="12"
showUserLocation="true" <!-- Not Working -->
disableZoom="false"
disableRotation="false"
disableScroll="false"
disableTilt="false"
@mapReady="onMapReady($event)">
</Mapbox>
onMapReady(args) {
args.map.addMarkers([
{
lat: -5.852365494,
lng: -35.36503315,
title: "U S F JOSE COELHO",
subtitle: "Rua José Coelho - CENTRO",
onCalloutTap: () => {
utils.openUrl("https://www.thepolyglotdeveloper.com");
}
}
]);
args.map.getUserLocation().then(
function(userLocation) {
alert(userLocation.location.lat + ", " + userLocation.location.lng)
console.log("Current user location: " + userLocation.location.lat + ", " + userLocation.location.lng);
console.log("Current user speed: " + userLocation.speed);
alert()
}
).catch(e => {
alert("Error: " + e) //Error: Location not available
})
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
6 Ways to Fix Location Is Not Available Error in Windows 11 ...
Step 1: Open “Task Manager.” You can do it by pressing Shift, Ctrl, and Enter altogether. Step 2: Go to the tab named...
Read more >How to fix Location is not available Windows 10 error?
How to fix Location is not available Windows 10 error? · Option 1. Access Safe Mode with Networking · Option 2. Reset user...
Read more >[Solved] Location Is Not Available Access Is Denied Windows 10
4 Effective Fixes for Location Is Not Available Windows 10 · Fix 1. Enable the User and Administrator Permissions (Authenticated Users) · Fix...
Read more >Fixes to Location is Not Available in Windows 11/10
Fixes to Location is Not Available in Windows 11/10 · Method 1: Enable Full Control for the File or Folder · Method 2:...
Read more >How to Fix Error “Location is Not Available” in Windows 10, 8, 7?
Why does computer say "location is not available"? ... “Location is available” can be cause by various reasons, like corrupted file system, bad ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
I’ve found a possible workaround using nativescript-geolocation. Hopefully, I will let you know once I have a good news.
Br, Zhi
@zhitomir-oreshenski-mm Yes, this is a viable solution to solve this problem right now.