Commit ba98a206 authored by Moreau Elise's avatar Moreau Elise
Browse files

get location from navigator

parent 0ee83e1e
......@@ -56,4 +56,12 @@ window.onload = function () {
}
})
;
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
$('#latitude-input').val(position.coords.latitude);
$('#longitude-input').val(position.coords.longitude);
$('#location-button').toggleClass('disabled');
});
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment