Friday, January 3, 2014

GeoLocation API

This Page would provide the geolocation of the machine on which it is running.Geolocation API would be able to track the location based on the IPAddress, Wi-Fi, Blue Tooth MAC Addresses etc.

Current location can be tracked using the following API:


navigator.geolocation.getCurrentPosition(PositionCallBack successCallBack,
     optional PositionErrorCallback errorCallBack, 
     optional PositionOptions options)

The first parameter to the API is a call back event, which means on identifying the location, this particular event would be called.
Similarly on error, PositionErrorCallback function would be executed. Also, we can configure this API by setting the position Options.


GeoLocation API Documentation gives more insight on tracking the location Note: Tracking location is a security concern. On chrome, you may need to disable the web security for the code to run.