-
-
Save andreafortuna/4cf3dd2e2808c9a3d0814e375f6ac03a to your computer and use it in GitHub Desktop.
Geolocating with a single javascript line
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
if( navigator.geolocation ) navigator.geolocation.getCurrentPosition( function( location ) {console.log( location.coords.latitude, location.coords.longitude );}, function( message ) { console.log( message );}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment