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
1 answer

I'm trying to store the geolocation in some variables outside of the functions scope, js

I want to store the geolocation but when I go and store the latitude and longitude in variables outside the scope they won't store. Does anybody know why this is the case? I've tried with undefined variables too but that hasn't worked either. Here's…
agutier2
  • 35
  • 1
  • 7
0
votes
1 answer

javascript object variable and method scope problems using navigator.geolocation.watchPosition

I'm trying to move from my old procedural approach to javascript coding to a more object based approach. One of the pieces of code I'm trying to migrate is my location tracker as shown here: var gps = new geolocation(); function geolocation() { …
ppetree
  • 826
  • 3
  • 15
  • 31
0
votes
2 answers

Cannot pass JS variable to PHP using AJAX

I am trying to get current location of user. I have JS script to get current Latitude and Longitude with AJAX to send js variables to index.php. $(document).ready(function() { if ("geolocation" in navigator){ …
Valentin M
  • 61
  • 2
  • 11
0
votes
2 answers

How to work with Google geolocation API?

I'm working on a web development project where I need to get user's exact location information (like Region, City, State, and Country). How do I do that?
0
votes
0 answers

https over LAN? Just for HTML5 geolocation api

I am developing a webapp that will run on a small computer in a bus which doesn't necessarily have connection to the world wide web. Passengers on the buss will be able to connect bus' wifi to use the webapp (router will automatically redirect user…
Inrego
  • 1,524
  • 1
  • 15
  • 25
0
votes
0 answers

Can't find lat long Brazil country

I used navigator.geolocation.getCurrentPosition() for geo location and i got lat long. But when i try to access Brazil country lat long using this method can't give me lat long. Suggest me how to get lat long values in Brazil country. Code:

Click…

0
votes
0 answers

navigator.geolocation.getCurrentPosition caching response despite user enabling location setting

We're using navigator.geolocation.getCurrentPosition() to get the user's current location. That function takes three parameters: a callback function to execute if it successfully gets the user's position an optional callback function to execute…
duncan
  • 31,401
  • 13
  • 78
  • 99
0
votes
0 answers

Delphi: How to active geolocation allow's dialog on TChromium on html5

I'm trying to load a page like this example, below, in a TChromium, but when I click the component don't show dialog asking to allow my geolocation, does have TChromium support do geolocation? By the way, TWebBrowser says that don't have support…
Artur_Indio
  • 736
  • 18
  • 35
0
votes
0 answers

Creating a geofence around a single lat and lng

I'm using html5 geolocation to check if people are in a certain location before opening up an app to them however, I was wondering if it's possible to add a radius that allows people to be within say 200m of that particular point?
Sam Mason
  • 1,037
  • 1
  • 8
  • 29
0
votes
2 answers

Cordova GPS application timeout error

I am writing an application that needs the user's current location coordinates. I use the Cordova Geolocation API and am developing in an Intel XDK environment. In some cellphones (e.g. Samsung S3 and S4), the API cannot obtain the location and…
halkoy
  • 1
0
votes
1 answer

How can I, locally - on my own machine, get my location?

I know that Android has a way to get location, and W3C has a location API for web browsers, but is there a way to get my location progromatically on my own machine? I'm running Ubuntu 14.10 Edit: Removed ruby tag. Opening up to any language.
NullVoxPopuli
  • 61,906
  • 73
  • 206
  • 352
0
votes
0 answers

Map loading and vanishing in JSP page

I have written a sample code in jsp using google api to display Indian map on a jsp page. Problem is, once the page loads, the map is displayed but it vanishes after a few seconds. I'm not able to find the error. Please help <%@ page language="java"…
0
votes
1 answer

Is there any function in geolocation api like isGeolocationAllowed or isGeolocationAllowedForever?

Is there a way to check from javascript if user already allowed geolocation in current page for once or forever? Maybe browsers stores somewhere we can read it from i don't know. Also is there any function that listens the allow or deny buttons…
yturgun
  • 183
  • 1
  • 2
  • 10
0
votes
1 answer

Error "Failed to Start Geolocation service code: 2" on Android phone

I am new to IBM Worklight.While using google map I need to get the current position of the device using gps. I am not getting any error on emulator but in the phone getting the following alert {"message":."Failed to start Geolocation service ","…
ByteCruncher
  • 133
  • 1
  • 3
  • 12
0
votes
0 answers

Tracking Positions in Windows Phone

I try use tracking with WP8 using html5, to get my location and show it this the code, but no problem