Geolocation APIGeolocation API in HTML5 gets the geographical position of a user. The position on a device, smartphone or desktop is only available as long as the user approves it, because it can compromise privacy. With Chrome 50 and above, it only works with HTTPS. If you want the result shown with a Google map too, the newest smartphones as well as the newest browsers only support maps with an API-key. The conclusion is that Geolocation API works with both HTTPS and an API-Key.
How is it working?Websites in the old days used the IP address to find your location. With HTML5 Geolocation API, browsers can find your location using data from GPS, Wi-Fi networks, cell towers, Bluetooth as well as the IP address. There is a way to fake your Geolocation coordinates. Here’s how (Agarwal, 2015):
Quote:While in Google Chrome, press Ctrl+Shift+I on Windows, or Cmd+Opt+I on Mac, to open the Chrome Developer Tools. Now press the Esc (escape) key to open the Console window. Switch to the Emulation tab and choose the Sensors option in the left sidebar.
This assumes that you're using Google Chrome!SourcesAmit Agarwal (2015-03-30).
How to Set your Location Manually in Google Chrome - Fake Geolocation. [ONLINE] Available at:
http://www.labnol.org/internet/geo-location/27878/ (Accessed 10 October 2016)
Google Developers (2016-10-05).
Geolocation | Google Maps JavaScript API | Google Developers. [ONLINE] Available at:
https://developers.google.com/maps/documentation/javascript/examples/map-geolocation (Accessed 10 October 2016)