HTML5 – Geolocation

 
1-HTML5 geolocation and the Google Maps API
2- Geolocation Position mechanism
3- Browser geolocation
4- Determine position and Caching
5- Follow-up Location
6- Privacy
7- Mobile and Geolocation
8- To read …..

_________________________

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&gt;

<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 …..

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!

,

  1. 10 Articles Introduction to HTML5 is Done ! « DevelopersMix's Blog
  2. pret implant dentar

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: