Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
CBeloch committed Feb 22, 2010
1 parent 1ea221f commit e8a2c90
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Locate
===========
======

With Locate you can easily access a visitors geolocation if his browser supports this feature.
The basic geolocation API is a bit complicated (check http://www.w3.org/TR/geolocation-API/ for more info) in my oppinion.
The basic geolocation API is a bit complicated (check [W3C Geolocation API Specification](http://www.w3.org/TR/geolocation-API/) for more info) in my oppinion.
I hope I can make it easier to handle with all the data by using this little MooTools class.
There are so many possibilities by using location based information in your webapp.

Expand All @@ -21,17 +21,17 @@ Use Code like this:
#JS
var location = new Locate({
onLocate: function(position){
// Do stuff with the data position.lat and position.long
// Do stuff with the position data
}
});

Want to frequently get the position (watch you visitor move)?
Want to frequently get the position (watch your visitor move)?

#JS
var location = new Locate({
loiType: 'watch',
onLocate: function(position){
// Do stuff with the data position.lat and position.long
// Do stuff with the position data
}
});

Expand All @@ -44,4 +44,20 @@ Don't want to locate directly on initializing the Class? No problem!

// start locating later in your code using this line
// you can also use location.watcher();
location.locate();
location.locate();

position data
-------------

The position data given with the event 'locate' looks like this:

* position.latitude
* position.longitude
* position.altitude
- null if not supported, meters above the WGS84 ellipsoid
* position.accuracy
- specified in meters
* position.heading
- null if not supported, specified in degrees counting clockwise to true north
* position.speed
- null if not supported, specified in meters per second

0 comments on commit e8a2c90

Please sign in to comment.