Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Weather Map Layer Tile Caching

Brian Apr 10, 2018 06:44PM MSK

Hi,

We are interesting in using your API to overlay weather data on top of Google maps in our application. We have noticed, however, that many requests are made over and over again for the same overlay tile.

There is no cache-control header being returned in the response from the OpenWatherMap API causing the map tile to be fetched through an HTTP request every time it is needed. In contrast the Google map tiles make use of the browser cache which improves performance and reduces our load on their servers (and the load on our wallets!).

Is there any way we can specify in our request that we would like to cache the map overlay tiles? If so, how can we make use of it? Also if this is possible, how can we make sure that the cache is properly invalidated when new overlay tiles are available?

Thanks.

Up 0 rated Down
Maxim Gushcho Apr 11, 2018 07:15PM MSK OpenWeatherMap Agent

Hello,

The weather layers are actually cached.

When you download the map it makes a request to specific number of tiles on specific zoom.

When you change zoom other ser of tiles are requested. This is a leaflet approach.

http://openweathermap.org/api/weathermaps

Please check.

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
9eda11838f597e7a95b6a1c991dcae0a@openweathermap.desk-mail.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete