Last Updated: February 25, 2016
·
787
· rickcarlino

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.

Have a fresh tip? Share with Coderwall community!

Post
Post a tip