Created
September 2, 2015 13:55
-
-
Save Trshant/6f00a7660a5fa60c91bf to your computer and use it in GitHub Desktop.
To get the latitude and longitude of the place by using the browser
This file contains hidden or 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(function(position) { | |
var latitude = position.coords.latitude; | |
var longitude = position.coords.longitude; | |
console.log( latitude , longitude ); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment