Comparison of Different Geolocation Methods

Comparing the following geolocation api's and services: 1. HTML Geolocation API 2. Google Loader Client Location API 3. FreeGeoIP service 4. HostIP.info service

HTML

<div id="map"></div>


<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>

JavaScript

$(document).ready(function(){

// LOCATION IN LATITUDE AND LONGITUDE.
    var center = new google.maps.LatLng(19.0822507, 72.8812041);     

    function initialize() {
      
        // MAP ATTRIBUTES.
        var mapAttr = {
            center: center,
            zoom: 10,
            mapTypeId: google.maps.MapTypeId.TERRAIN
        };

        // THE MAP TO DISPLAY.
        var map = new google.maps.Map(document.getElementById("map"), mapAttr);

        var circle = new google.maps.Circle({
            center: center,
            map: map,
            radius: 10000,          // IN METERS.
            fillColor: '#FF6600',
            fillOpacity: 0.3,
            strokeColor: "#FFF",
            strokeWeight: 0         // DON'T SHOW CIRCLE BORDER.
        });
    }

    google.maps.event.addDomListener(window, 'load', initialize);
    
     }); // End of ready