Questions tagged [w3c-geolocation]

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

See also:

123 questions
3
votes
2 answers

Geolocation implementation in Opera

I'm testing HTML5 geolocation. I have some weird results in Opera and Opera Mobile. When I visit the site after some time (for example 25 minutes) after the last visit position timestamp is from some time in the past. But I pass options telling that…
Piotr Perak
  • 9,824
  • 9
  • 42
  • 75
3
votes
1 answer

Get GeoLocation using phonegap when Location services disabled in iPad

I am developing iPad application using phonegap (cordova 1.9.0). I need to get current position of the user. I used following code and it works fine when Location services are enabled. function onDeviceReady() { …
Poorna
  • 323
  • 7
  • 19
3
votes
3 answers

HTML5 geolocation won't work in Firefox, Chrome and Chromium

I'm trying to use the HTML5 geolocation API; but I have problems to make it work on Firefox Chrome and Chromium : init(); function init() {; // Get the current location getPosition(); } function getPosition() { …
Molochdaa
  • 1,958
  • 1
  • 16
  • 23
2
votes
0 answers

best practice to get user location using HTML5 geolocation

I want to get user location on my website using HTML5 Geolocation. To prevent user from getting a confirmation box when they visit my website, if the browser has Geolocation support I will show a small notification on website that ask the user to…
Masoud
  • 325
  • 1
  • 10
2
votes
3 answers

How can I access the Coordinates constructor directly in JavaScript?

Type checking in Vue requires the constructor function to be passed in as the type: props: { coords: { type: Coordinates, required: true, }, }, I can't work out how to find the Coordinates constructor. Can't use Object because it…
callumacrae
  • 7,341
  • 7
  • 28
  • 45
2
votes
1 answer

PhoneGap Geolocation is blocked in iOS10

My Phonegap app leverages the (Cordova 3.8) webviews 'W3C Geolocation API'. Since upgrading from iOS 9.x to iOS 10 (beta) however, using navigator.geolocation.getCurrentPosition(...) now returns an error: Access to geolocation was blocked over…
joepegler
  • 43
  • 1
  • 8
2
votes
0 answers

Differences in accuracy with HTML5 geolocation on PC and Android - make PC more accurate

I get my position with HTML5 geolocation and getCurrentPosition with enableHighAccuracy: true: navigator.geolocation.getCurrentPosition(function(position){ console.log(position.coords.latitude + ', ' + position.coords.longitude) }, …
2
votes
1 answer

Jquery ajax Post variables to php

my ajax.php script And my new.html page

Click the button to get your…

F.Penb
  • 101
  • 1
  • 2
  • 12
2
votes
1 answer

JavaScript - Adding a parameter to a success callback

Languages: Reactjs and vanilla JavaScript The question is more of just a general JavaScript callback question but I'll add my React code to show how I ended up in this predicament. Lets look,Tarantino style, at my confusing blunder: I'm trying to…
Nick Pineda
  • 5,464
  • 11
  • 39
  • 60
2
votes
2 answers

Google chrome geolocation not working

I'm working on cross platform application. navigator.geolocation was working fine, but since last 2 days it just giving problem in Google chrome. Is the api deprecated or some other issue for this api? I tested following code on many different…
2
votes
0 answers

Does Chrome violates the HTML5 standard for Geolocation API when position is unavailable?

While I am developing a web app, I am using HTML5 Geolocation API. I have done the following steps: I turned off my WiFi connection on my desktop computer. I triggered a position request using : var params = {enableHighAccuracy: true,…
Wael Showair
  • 3,033
  • 2
  • 18
  • 29
2
votes
3 answers

Geolocation problems when switch GPS on and off

Thanks in advance first.I build a website with an option to lead you to a specific place when you click button "Navigate". Everything works fine on desktop and everything works fine on mobile when GPS of the phone is enabled. I use the google maps…
2
votes
2 answers

Geolocation HTML5 API enableHighAccuracy:True does not force GPS to turn on om Android devices

I am building a mobile site that needs to fetch high accuracy location from the user's phone. I using the HTML5 Geolocation .watchPosition function and enableHighAccuracy: true. When tested on IOS devices, The code forces GPS to turn on and return…
user3754424
  • 21
  • 1
  • 2
2
votes
0 answers

W3C geolocation backend implementations and extensions

Could someone provide a link to a description of backend implementation(s) of the Geolocation APIs available in modern browsers? Specifically, I need to make sure that a bunch of WiFi spots are registered (and preferably promptly updated on their…
Stan
  • 8,365
  • 9
  • 53
  • 99
1
vote
2 answers

Why is this HTML5 geolocation-dependent javascript code erring?

I have some javascript code depending on geolocation. http://jsfiddle.net/8D6vz/ var myLat = 0.0; var myLng = 0.0; function setCurrentPosition(position) { myLat = position.coords.latitude; myLng = position.coords.longitude; } function…
dangerChihuahua007
  • 18,433
  • 28
  • 104
  • 190
1 2
3
8 9