Category Archives: HTML5

HTML5: Geolocation API

Geolocation API return geographical location information including latitude and longitude of current visitor’s location.  GPS and IP adrress are common source of the location.

Geolocation API is supported on these browsers; Google Chrome, Firefox 3.5 and higher, Opera 10.6 and higher, Internet Explorer 9 and higher and Safari 5.

Sample Code

The sample code shows your current location.

http://playground.eca.ed.ac.uk/~s1359526/finalproject/geotest.html

References

Geolocation API Specification
http://dev.w3.org/geo/api/spec-source.html

How To Use HTML5 GeoLocation API With Google Maps
http://www.paulund.co.uk/how-to-use-geolocation-api-with-google-maps

Geolocation.getCurrentPosition()
https://developer.mozilla.org/ja/docs/Web/API/Geolocation.getCurrentPosition

Using geolocation
https://developer.mozilla.org/en-US/docs/WebAPI/Using_geolocation

You Are Here (And So Is Everybody Else)
http://diveintohtml5.info/geolocation.html