Questions tagged [w3c-geolocation]

The W3C Geolocation API provides scripted access to geographical location information associated with a hosting device.

See also:

123 questions
6
votes
1 answer

W3C geolocation returns cached coordinates

I have a Chrome extension which uses the W3C Geolocation API to get the user's location. The extension is mostly used on Chromebooks. I have noticed that the API seems to return the same coordinates (cached ?) most of the time, even though I have…
rok
  • 507
  • 4
  • 13
5
votes
1 answer

HTML5 Geolocation doesn't ask for permission and doesn't work on Samsung S3

Using the standard HTML5 geolocation code, I am able to access the geolocation on desktop browsers (Chrome, Firefox), but not on my Samsung Galaxy S3 (default browser, Chrome). In the default browser, nothing at all happens. In Chrome, the yellow…
ross
  • 792
  • 8
  • 12
4
votes
1 answer

How accurate is the W3C Geolocation API?

I have been reading the W3C Geolocation API specification and I was wondering if anyone has found any information on how accurate the location returned is. I found the accuracy attribute: The accuracy attribute denotes the accuracy level of the…
Abe Miessler
  • 75,910
  • 89
  • 276
  • 451
4
votes
0 answers

Geolocation on Chrome browser timeouts waiting for user permission

On my Chrome browser (66.0.3359.181 on win 7 64 bits), if I call a geolocation with a timeout, Chrome asks for permission and sends a PositionError "Timeout expired" after the timeout even if I didn't reply for the permission, whereas the W3C…
BenC
  • 1,468
  • 16
  • 23
4
votes
1 answer

react native ios: geoloc has poor accuracy by default

I'm implementing a fitness tracker with navigator.geolocation.watchPosition and getCurrentPosition . It works fine on android and on ios emulator, have 5/10m accuracy, but on iphone 5s, I have a terrible accuracy (50/65). I found out that when I was…
Jeremie
  • 1,097
  • 11
  • 27
4
votes
1 answer

HTML5 Device Orientation - reliable compass implementation?

I am working on a mobile web project that needs to know the compass direction the user's device is pointing. It's incredibly simple right now, but here's what I have: var updateDirection = function (evt) { …
4
votes
1 answer

What is an optimal pattern for retrieving a geolocation from JavaScript with high accuracy?

I have been playing with the JavaScript Geolocation API (mostly in iOS 6 and Android Jellybean devices), and despite passing: { enableHighAccuracy: true, maximumAge: 0 } as PositionOptions, the pattern seems to be that on the first response I…
Jason Sperske
  • 27,420
  • 8
  • 63
  • 116
4
votes
2 answers

I am getting (lat,long) coordinates in phonegap geolocation without using internet or GPS ?

When i tried out a sample program in phonegap geolocation. I am getting the latitude and longitude of my current location without internet or GPS in my samsung pop. I don't know how it is getting the coordinates, altitude and timestamp of the…
Firnaz
  • 553
  • 6
  • 29
3
votes
2 answers

geoLocation enabling without page-refresh?

Currently, we have to refresh the web-page (actually PhoneGap app) if the GPS was off and (after notifying the user) then turned-on. How can we update the GeoLocation status without the need to refresh the page/app ?
Tar
  • 7,277
  • 7
  • 45
  • 101
3
votes
0 answers

How can a user reset permissions settings after declining the JS Geolocation request? (iOS Safari)

After a request is to made for the user's geolocation, using either navigator.geolocation.getCurrentPosition or watchPosition, the user is shown a native permission dialog. If the user selects "Don't Allow" to the request to share their location,…
Lachlan McD.
  • 1,672
  • 1
  • 16
  • 23
3
votes
0 answers

HTML5 Geolocation Timeout option not working in Angular

I have implemented HTML Geolocation with a 10 second timeout. However, the 'failure' callback is not being triggered after 10 seconds. (The 'failure' callback is called if the user rejects permission to share his position). What is wrong with my…
3
votes
1 answer

Geolocation API and AJAX requests

I'm working on a personal project that uses the W3C Geolocation API to retrieve the user's location and then load the weather forecast of that location using Wunderground's API by making an AJAX request. The process is this: The user loads the…
Ketchuz
  • 45
  • 1
  • 5
3
votes
2 answers

Is there a way to know if geolocation is enabled for the current domain?

The website I'm working on uses HTML5 geolocation api. It works fine, but I need to know if the feature has been authorized. navigator.geolocation only tells if the feature is available. What I want to know is whether the user has enabled it…
Antoine
  • 4,597
  • 10
  • 47
  • 80
3
votes
3 answers

Can we use Google Analytics API to retrieve location in code?

can i use Google Analytics API in my php or javascript code to find the location of visitor of my website ? this link talks about API, but nothing about location of…
3
votes
0 answers

Why doesn't GeoLocation work on android?

To this date my android phone (and googles android emulator AVD/SDK) doesn't work with w3c geolocation API from web pages ex. the example at : http://www.w3schools.com/html/html5_geolocation.asp or alternative : http://ocupado.eu/info " The W3C…
1
2
3
8 9