Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
onury committed Apr 28, 2013
1 parent 37ffa1b commit 1e779d2
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Geolocator Javascript Lib v.0.92
Author: Onur Yildirim © 2012, MIT License.
## Geolocator Javascript Lib
Version: 0.92, Author: Onur Yildirim © 2012, MIT License.

###Features:

Expand All @@ -12,6 +12,9 @@ Author: Onur Yildirim © 2012, MIT License.
- Supports Google Loader (loads Google Maps dynamically)
- Dynamically creates Google Maps (with marker, info window, auto-adjusted zoom)
- Non-blocking script loading (external sources are loaded on the fly without interrupting page load)
- No library/framework dependencies (such as jQuery, MooTools, etc...)

![Geolocator Example Screenshot](https://raw.github.com/onury/geolocator/master/screenshots/geolocator-example.jpg)

###Usage:

Expand Down Expand Up @@ -50,15 +53,15 @@ Use this method to get the location via HTML5 geolocation.

**Parameters:**

> **`successCallback`** *Function*
> - `successCallback` *Function*
>   A callback function to be executed when the location is successfully fetched.
>   The recent `geolocator.location` object is passed to this callback, as the only argument.
> **`errorCallback`** *Function (optional, default: `null`)*
> - `errorCallback` *Function (optional, default: `null`)*
>   A callback function to be executed when the location could not be fetched due to an error.
>   The recent error message `String` is passed to this callback, as the only argument.
> **`fallbackToIP`** *Boolean|Integer (optional, default: `false`)*
> - `fallbackToIP` *Boolean|Integer (optional, default: `false`)*
>   Specifies whether geolocator should fallback to IP geo-lookup when HTML5 geolocation is not
>   supported or rejected by the user. A positive `Integer` value will indicate the index of the source
>   ip-geo service (if the value is in range). Boolean `true` will set the default ip-geo service index
Expand All @@ -67,10 +70,10 @@ Use this method to get the location via HTML5 geolocation.
>   `2` (use GeoPlugin for ip-geo fallback), `3` (use Wikimedia for ip-geo fallback), `false` or `-1` or
>   `null` or any other value (will disable ip-geo fallback)*
> **`html5Options`** *Object (optional, default: `null`)*
> - `html5Options` *Object (optional, default: `null`)*
>   HTML5 geolocation options.
> **`mapCanvasId`** *String (optional, default: `null`)*
> - `mapCanvasId` *String (optional, default: `null`)*
>   HTML element ID for the Google Maps canvas. If set to null, no map is drawn.
**Example:**
Expand All @@ -85,19 +88,19 @@ Use this method to get the location from the user's IP.

**Parameters:**

> **`successCallback`** *Function*
> - `successCallback` *Function*
>   A callback function to be executed when the location is successfully fetched.
>   The recent `geolocator.location` object is passed to this callback, as the only argument.
> **`errorCallback`** *Function (optional, default: `null`)*
> - `errorCallback` *Function (optional, default: `null`)*
>   A callback function to be executed when the location could not be fetched due to an error.
>   The recent error message `String` is passed to this callback, as the only argument.
> **`ipGeoSourceIndex`** *Integer (optional, default: `0`)*
> - `ipGeoSourceIndex` *Integer (optional, default: `0`)*
>   Indicates the index of the IP geo-lookup service.
>   Valid values: *`0` (Google), `1` (FreeGeoIP), `2` (GeoPlugin), `3` (Wikimedia)*
> **`mapCanvasId`** *String (optional, default: `null`)*
> - `mapCanvasId` *String (optional, default: `null`)*
>   HTML element ID for the Google Maps canvas. If set to null, no map is drawn.
**Example:**
Expand Down

0 comments on commit 1e779d2

Please sign in to comment.