Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript get users location

if ("geolocation" in navigator) {
	navigator.geolocation.getCurrentPosition(function(position) {
		console.log("Longitude:", position.coords.longitude, "Latitude:", position.coords.latitude);
	});
}
 
PREVIOUS NEXT
Tagged: #javascript #users #location
ADD COMMENT
Topic
Name
5+1 =