Simplified HTML5 Geodata API.
I needed a simple way to get geodata from the HTML5 geolocation API. I created this class in Coffeescript which, when instantiated, gives access to simple functions such as lat(), lng() and stop() without the need for excessive configuration options.
https://gist.github.com/rickcarlino/5924362
The advantage to this is that you don't need to worry about configuring anything (it uses sane defaults that you can override if need be). Furthermore, it has built in error handling that you can access via .error()
I needed this for a project I am working on. I hope others find it useful. Feel free to use it in yours under the MIT License.
Written by Rick Carlino
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Coffeescript
Authors
iam4x
94.17K
ericdfields
63.02K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#