Questions tagged [w3c-geolocation]

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

See also:

130 questions
0
votes
0 answers

`navigator.geolocation.watchPosition()` returns undefined

Very simple question: Why does the following code return undefined values? function GetLocation(location) { Lat = location.coords.latitude; Lon = location.coords.longitude; gCoords = "gCoords: " + Lat + "," + Lon; gLat = Lat; …
Ian Pennebaker
  • 233
  • 4
  • 15
0
votes
2 answers

Geolocation in android

My question may be irrelevant but I want to know can I use this api in android .
user3222934
0
votes
1 answer

Convert DOMTimeStamp to DATETIME in PHP

I want to convert DOMTimeStamp from Geolocation in PHP in order to save it in DATETIME in the database. How can I accomplish this?
Airikr
  • 6,258
  • 15
  • 59
  • 110
0
votes
3 answers

How to pass values from one method to another in javascript dynamically?

I am using watchPosition method get coordinates continuously. I am getting my latitude and longitude in showLocation method. now I want to store all my acquired latitude and longitude in to database so I wrote db.transcation in showLocation method.…
Vinod
  • 2,263
  • 9
  • 55
  • 104
0
votes
0 answers

How to dynamically store geolocation data in localstorage, retrieve and display

I have an app that allows a user to submit a form, saves it to local storage and afterwards displays the input in an html table. The user can update and delete their data. My question is that the form also displays the user's geolocation but I'm…
0
votes
1 answer

Geolocation data saved in a variable/localstorage

i have a problem with the Geolocation API -.-' I'm using the FirefoxOS Boilerplate App (https://github.com/robnyman/Firefox-OS-Boilerplate-App) for create a simple html5 app. The problem is simple: I would like the data (lat/lon) obtained from the…
Mte90
  • 115
  • 3
  • 13
0
votes
2 answers

How to detect the status of the element navigation in js?

I need to get users latitude and longitude from browser, but on most of browsers are some restrictions that doesn't let to do it. How to tell users that his geolocation is off or it simply doesn't support it? I tried something like this, but neither…
user1692333
  • 2,461
  • 5
  • 32
  • 64
0
votes
1 answer

Google Maps Walking Directions replace Exact Coordinates with nearest road. Is there a workaround?

Long story short, I have a HTML5 GeoPositioning enabled map on a phone. I have the current location, I want to show directions to specific coordinates. Google maps is replacing the exact coordinates with the nearest road. This is not close enough…
user1393215
0
votes
2 answers

Why is geolocate failing in safari desktop?

I trying to use geolocation and it's working for all my browsers except for safari. Here is the script that I'm running. if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function (location) { console.log('success'); …
Smeegs
  • 9,151
  • 5
  • 42
  • 78
0
votes
1 answer

How to use WatchPosition() function Geolocation to watch other coords

Hello I was wondering if there is a way to feed WatchPosition() function specific Lat/Lon that are supplied from an array of coordinates. I am having trouble creating a callback function that utilizes something like the default coords. lat coords.…
0
votes
1 answer

Identifying Geolocation of user behind proxy

I am writing an web application that requires the current geolocation of user. For identifying geolocation I have used the following code that uses HTML5 geolocation api. I have taken this code from W3schools.
Joy
  • 4,197
  • 14
  • 61
  • 131
0
votes
1 answer

How is HTML5 geolocation API implemented in browsers?

Does every browser implement geolocation API in it's own way? Or is there some standard way all browsers do it? And how do they do it? When can they fail to geolocate?
Piotr Perak
  • 10,718
  • 9
  • 49
  • 86
0
votes
1 answer

Combining google places api, and directions-map api v3

I have the following code in my page (based at the moment around the google examples. I have however hit a snag, i can't seem to make places work (the markers wont show), this is my code . . . it should show all cafes, restaurants and dars within…
0
votes
1 answer

Get directions based on geolocation, google-maps-api

Hi i'm wanting to create a map that, when a function is called, generates directions to a point based on the users current geolocation. I have tried to do this and so far my attepts have been fruitless, here is my current JS code: var…
0
votes
1 answer

what make getCurrentPosition fail?

I made a simple website with javascript on it that calls to: navigator.geolocation.getCurrentPosition(show_map, show_map_error); I have put the website on the internet. I tried to open the website from different PCs (no GPS gadget) on different…
fasisi
  • 396
  • 5
  • 23
1 2 3
8
9