So I'm trying to create a weather app, that will tell me the weather. How do I make a JSON request to get the coordinates of where I currently am?
You can use Geolocation API.
navigator.geolocation.getCurrentPosition(function(position) {
console.log(position.coords.latitude, position.coords.longitude);
});
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments