The Google Gears Geolocation API allows you to display your current position data by obtaining it from your WiFi antenna. The Google Gears Geolocation API is able to obtain the exact location of the user’s current location, in terms of latitude, longitude and even the address etc. User browsers such as Internet Explorer, Firefox must have Google Gears installed excepts Google Chrome, in order to have the Google Gears API to work on your browser.
1. Initialize the Gears API, by including the gears_init.js, download the gears_init.js to your web server.
2. Include the Google Map API, (Obtain your own Google Map API key)
5. And the two DIVs, with dom IDs, “err_stat” and “gmap_container” which are for showing the error message of Geolocation position and displaying the Google Map respectively.
6. Voila! The working example is as follows: (Please note you must have Google Gears installed for browsers excepts Chrome)