Refactored geolocation API interaction and implemented issue #51

Function already in mapContext but doesn't work when geolocation is disabled in the beginning. Please review and when possible, finish the FIXME's, if you can.