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

get user's coordinates from navigator

parent f5050bf4
......@@ -51,4 +51,13 @@
</div>
</form>
</div>
<script>
window.addEventListener('load', function(){
if (!navigator.geolocation) { return; }
navigator.geolocation.getCurrentPosition(function(position) {
console.log(position.coords.latitude, position.coords.longitude);
});
});
</script>
{% endblock %}
\ 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