Eleonore9/Geolocation — pull request #1 by maliciousmind (2014-02-28 14:03:14+00:00)
Title: Fixing geolocation error

Problems:

* You were defining the `geo_success` and `geo_error` functions inside the `geo_location`, that may cause some problems. I just extracted they out.
* You were defining all the functions but not calling any of them, so nothing was happening on the page. I'm calling the `getLocation()` function inside a "document ready" function, which means, when the page just loads. If you want you can change that and execute the function when the user clicks the "View distance" button.
* I've also added the javascript code that does the Ajax call and get the data back. Not sure if I was supposed to do that as well, apologies if not.