Jump to content
Sign in to follow this  
Peter1990

How to add API weather on my google maps>

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!

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...