Geolocating in HTML5 with a single line of code? “It Could Work!”
Some infos about geolocation API from http://dev.w3.org/:
The Geolocation API defines a high-level interface to location information associated only with the device hosting the implementation, such as latitude and longitude. The API itself is agnostic of the underlying location information sources. Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs, as well as user input. No guarantee is given that the API returns the device’s actual location.
The API is designed to enable both “one-shot” position requests and repeated position updates, as well as the ability to explicitly query the cached positions. Location information is represented by latitude and longitude coordinates.
And here the code:
Obviously, the functions for error and success events could be externally declared for better readability.
- Capture network traffic on a VirtualBox VM
- Apache Hadoop: an introduction and a Cheat Sheet
- Rooting and installing Xposed Framework on Vodafone Smart Prime 6 (VF-895N)
- Wordpress tips: bulk update of permalinks and image paths
- Import a Windows physical machine into a VirtualBox virtual machine
- A huge list of cheat sheets for programmers