_________________________
1-HTML5 geolocation and the Google Maps API
The Geolocation API provides the best estimate of the user’s position using a number of sources (called location providers).
_________________________
2- Geolocation Position mechanism
Be used several ways to find and identify places by HTML5 to ensure the greatest degree of accuracy in determining the place: -
IP GSM/CDMA Bluetooth GPS
_________________________
3- Browser geolocation
_________________________
4- Determine position and Caching
- Obtain the user’s current position, using the getCurrentPosition method
- Watch the user’s position as it changes over time, using the watchPosition method
- Quickly and cheaply obtain the user’s last known position, using the lastPosition property
<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8″ />
<title>DevMix Geolocation Api</title>
<script type=”text/javascript” src=”geo.js”></script>
</head>
<body>
<script type=”text/javascript”
src=”http://maps.google.com/maps/api/js?sensor=false”></script>
<article>
<h1>DevMix geolocation </h1>
<p>My Page</p>
<div id=”map”></div>
</article>
</body>
</html>
Caching
You can summon a copy is stored and not to account for the place again to ease your application and increase the speed of implementation
navigator.geolocation.getCurrentPosition(showMap , showError,{maximumAge:60000});
_________________________
5- Follow-up Location
If you want to continue to place the visitor if the visitor is moving in a vehicle, for example you can use another function and is
var watchHandler = navigator.geolocation.watchPosition(scrollMap,showError);
And to stop it :-
navigator.geolocation.clearWatch(watchHandler);
_________________________
6- Privacy
More secure , Can not access the site or application of any information on the location of the user without his permission.
_________________________
7- Mobile and Geolocation
- iOS
- Android
- IPhones
- Blackberry OS
- Browsers with Google Gears support (Android, Windows Mobile)
- Nokia Web Run-Time (Nokia N97,…)
- webOS Application Platform (Palm Pre)
- Torch Mobile Iris Browser
- Mozilla Geode
_________________________
8- To read …..
- http://web.drsni.com/html5-geolocation/
- http://mobile.tutsplus.com/tutorials/mobile-web-apps/html5-geolocation/
- http://aiminstitute.org/blog/2010/07/basic-geolocation-in-html5/
- http://www.mozilla.com/en-US/firefox/geolocation/
I hope that this tutorial has given you a head start into the world of geolocation APIs. Good luck and try to make your next project take advantage of geolocation benefits!




