straup / js-geolocation

A very simple wrapper library to test for and use a variety of third-party APIs to try and geolocate a client.

This URL has Read+Write access

name age message
file README Loading commit data...
file geolocation.js
file geolocation.src.js
file jsbuild.cfg
README
This is a very simple wrapper library to test for and use a variety of
third-party APIs to try and geolocate a client.

# EXAMPLE

 args = {
  'enable_logging' : true,
 };

 doThisOnSuccess = function(lat, lon){ ... };
 doThisIfNot = function(error_msg){ ... };

 var loc = new info.aaronland.geo.Location(args);
 loc.findMyLocation(doThisOnSuccess, doThisIfNot);

# PRECEDENCE

The order of precedence for positioning is:

    * Loki/Skyhook API

      Loki is first on the assumption that if you've passed a Loki API key then
      it's probably what you want to use; this may not hold true if you're using
      a browser/device with a built-in GPS unit but one step at a time.

    * Geode API (Firefox, only)

    * Google Gears Geolocation API

    * Google ClientLocation API (IP lookups)