Jump to content

How to add API weather on my google maps>


Peter1990

Recommended Posts

Hi everyone,

These days I am working on my new project. The idea is the following: I want to insert google maps in my project. When the user click on some city, to display the table with the weather information for the city. For now I implemented google maps on my project. Also I set markers for specific places. Now I want to implement weather API, so when the user click on some specific city to display weather information.

This is the tutorial I followed in order to implement google maps in my project:

https://www.youtube.com/watch?v=Zxf1mnP5zcw&list=LLy8VbuH9TRk0RyLzTMcgqCg

This is how my idea should works:

https://openweathermap.org/weathermap?basemap=map&cities=true&layer=temperature&lat=46.3166&lon=18.9844&zoom=5

You can see from the second link that when you click on some city, the weather info appears.

Can someone please tell me how to do this?

I was searching on youtube, google, stackoverflow for days, but with no result.

Thanks!

Link to comment
Share on other sites

First of all, do you have code that can read when you click on the markers? Which markers? LongLat coordinates?

After you get that information, you need to find a service which gives you weather information based on given Longitude and Latitude coordinates. Or whichever data you've received from Google Maps.

Then you need to learn how to access the service you've found, and process any output accordingly.

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...