Last active
April 9, 2017 22:10
-
-
Save jonathanwork/2e5772e7a3b46a50bf00221899f84501 to your computer and use it in GitHub Desktop.
geolocation in javascript ;)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
navigator | |
.geolocation | |
.getCurrentPosition(position=> { | |
var lat = position.coords['latitude']; | |
var lng = position.coords['longitude']; | |
console.log(`your current location is ${lat}, ${lng}`); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment