Search the Community
Showing results for tags 'geolocation'.
-
Hello frns, i learnt how to get the gps coordinates from w3school tutorials but a small question how to alter the user if he blocks the gps access request through code <script> var x = document.getElementById("gpsloc"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition, showError); } else { x.value = "Geolocation is not supported by this device."; } } function showPosition(position) { x.value = position.coords.latitude + "," + position.coords.longitude; } function showError(error) { switch(error.
- 3 replies
-
- html
- geolocation
-
(and 1 more)
Tagged with:
-
My weather function works when I enter the coordinates myself. I'm trying to use a get location function to find and enter them in but it's not working. Please help. //////////////////////////////////////////////////////////////////////////////////////////////// var x = document.getElementById("demo"); function showLocation(position) { var latitude = position.coords.latitude; var longitude = position.coords.longitude; x.innerHTML = latitude + "," + longitude; } function errorHandler(err) { if(err.code === 1) { alert("Error:
-
Hi, So it seems that since the Chrome updated to version 50 They have removed HTML 5 Geo location on HTTP due to security. Now they do however say that it shall all work fine using a localhost for testing as it is being seen as a secure host yet it seems this does not work using a virtual host. If i do a test on "test.local" i will get the same deprecation messages as on a HTTP server but when i change it to "localhost" and run it again it all seems fine. Does anyone know a workaround to still be able to use Geo location using a virtual host or am i now stuck using localhost? Thanks
- 1 reply
-
- Geolocation
- HTTP
-
(and 1 more)
Tagged with:
-
The geolocation code gives an error Location information is unavailable. Here is the link to the code http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation_error I don't know why the error is coming. Please help me out I am heavily stuck at this point..
- 1 reply
-
- Geolocation
- Html5
-
(and 1 more)
Tagged with:
-
Hi,I am building a classifieds WordPress website and I would like to know does there exist any plugin or method that allow posts to be shown based on the country/region/city of the visitor (ip based listing)? There should be an option to add the location of the post somehow in the admin panel so that the plugin can use the information and show the nearest posts. I ve been shown these two links but i dont know how to do it: http://html5demos.com/geo, http://www.w3schools.com/html/html5_geolocation.asp Thanks
-
I can't use the function of geolocation in my desktop. Browsers are Firefox and Google Chrome. OS is window xp. I click the button to get positon and also click "share position info" The result: Firefox alert "Unknown error acquiring position" Google Chrome alert "Javascript notice: User denied Geolocation" <!doctype html><html> <head> <meta charset="utf-8"> <title>Geolocation test</title> </head> <body> <p>Your latitude:<span id = "latitude">000</span></p>
- 6 replies
-
- geolocation
- error
-
(and 2 more)
Tagged with:
-
I am using chrome. why the geolocation wont showing getLocation i checked on my advance setting there is no necessarily checkbox "Send a "Do Not Track" request with your browsing traffic" I am not sure what excalty the file will go through from the document.getElementById("demo"). I checked at http://www.w3schools.com/html/html5_geolocation.asp it does not help me please help me to success what did i wrong anyone who have experienced this problem before thanks! btw, I am using IDE note++ here the code is <!DOCTYPE html> <html> <body> <p>
- 4 replies
-
- geolocation
- html5
-
(and 4 more)
Tagged with:
-
Hi folks, as the lovely HTML5 coming and proving that it's an unbelievable language , I found the new technique "Geolocation" very helpful to my project. as a part of my project, I have a simple form gathering info from the user such as name , email andthe latitude and longitude of the user's position. In w3schools's example , the latitude and longitude are returned as normal text above each other :Latitude: 00.0000Longitude: 00.0000 ( not really zeros ) my question is: after clicking on a button (say get location) , the latitude and longitude coords will be automatically inserted (fille
-
- Geolocation
- html5
-
(and 1 more)
Tagged with:
-
I am using a web service called Geo I/O which lets me locate an IP address and get their Country, State, City and Latitudinal and Longitudinal status.The request that is sent is something like:http://api.geoio.com/q.php?key=YOUR TOKEN&qt=&d=comma&q=IP ADDRESS The above request sent gives a string like:Calcutta,West Bengal,India,Bcl East,22.5697,88.3697,IN Now I want the above string arranged something like this in the webpage:City: CalcuttaState: West BengalCountry: IndiaLatitude: 22.5697Longitude: 88.3697 Please help me out.