Web Development & Design Foundations with HTML5

Skip to Content 9th Edition

Geolocation Example

NOTE: This example no longer functions because Google is now charging websites for the use of this feature

The Geolocation API allows your web page visitors to share their geographic location. Your visitor's location may be determined by their IP address, wireless network connection, local cell tower, or GPS hardware depending on the type of device and browser.