HTML5 Geolocation
Code download available at the bottom of the post In this tutorial we will use Jquery,Goople Api and HTML5 to capture geolocation Browser used:Google Chrome Step 1: Include the Jquery and Goople maps API as shown below <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js" type="text/javascript"></script> <script src="http://maps.google.com/maps/api/js?sensor=true"></script> Step 2: Add a place holder for the Map <div id="map"> </div> Using HTML5 feature we will display the latitude and longitude, so add placeholders for latitude and longitude. <div id="lat"></div> <div id="long"></div> Step 3: Start writing code to capture the Geolocation <script> //using navigator (Html 5 feature) to get the Geolocation x = navigator.geolocation; x.getCurrentPosition(sucess,failure); 'getCurrentPosition' m...