Using geolocation with guarantees to obtain a good approximation.
npm install parrot-module-geolocation


> Using geolocation with guarantees to obtain a good approximation.

``bash`
bower install parrot-module-geolocation --save
For use browser geolocation feature we will use parrot.geolocation namespace.
#### .position([Object], <Function>)
Use this method to get your current position.
The method return a callback with Position Object or Error.
Also yo can provide a specific options. default options are:
`coffee`
enableHighAccuracy : true # precision first
maximumAge : 0 # not cache
timeout : 600 # 10s timeout
And example of use:
`coffee`
parrot.geolocation.position (position, err) ->
return error if err?
position
# => {accuracy:848, latitude:37, longitude:-1, timestamp:1418986533158}
#### .watch([Object], <Function>, <Function>)
It registers a method handler that will be called when the position changed.
And again you can provide your options, but the default options are:
`coffee`
enableHighAccuracy : false # not necessary precision
timeout : 600 # 10s timeout
maximumAge : 0 # not cache
This method return a uid that you need to store for clear the handler later.
#### .clear(<Integer>)
It simply clear a method handler. You need to provide the uid` for do the operation.
MIT © ParrotJS