Table of Content
Getting weather from location
We are going to get the weather status by geolocation – latitude and longtitude.
http://api.openweathermap.org/data/2.5/weather?lat=22.19567&lon=113.549194
How to get location on a map?
- We will use Google map.
- Be sure to use the classic version. The new Google map removed the feature.
- Move the map to you destination.
- right click on the map where you want the geolocation.
- Choose “What’s here” and you will see a lat/lon on the search bar.
- Showing the process, in GIF animation:
With the ability of getting weather from geolacation, we can make the app further by grabbing user’s geolocation and use it to fetch the weather.
What’s next? We’re going to take a look at “Getting user location”.