buche / leaflet-openweathermap

A JavaScript library for including OpenWeatherMap's layers and OWM's current city/station data in leaflet based maps without hassle.
259 stars 132 forks source link

Failed to load resource #21

Closed IsaacHub closed 6 years ago

IsaacHub commented 7 years ago

@buche I just downloaded and viewed it through localhost, I checked the Temperature checkbox, and console throws errors more than 100 errors, saying that Failed to load resource: net::ERR_CONNECTION_TIMED_OUT from http://b.tile.openweathermap.org/map/temp/11/1481/947.png

I opened up the url in new tab and it keeps spinning. Is there a bug or a temporary server problem?

Also the loading of overlay tiles is really very slow.

chrome_2017-03-03_18-12-55

buche commented 7 years ago

Thanks for reporting. The tiles are from OpenWeatherMap.org (OWM) and my work is completely independend from OWM. I've never got any response from OWM on my questions so I cannot say if or when OWM will deliver these tiles as fast as it once was.

ramiglez30 commented 7 years ago

Hey Buche,

I'm trying to use your library but I'm getting the same error... same on the sample page.

So, I've added a tile layer manually to Leaflet map, and it works... using openweathermap's url that looks a bit different than yours:

http://tile.openweathermap.org/map/{layername}/{z}/{x}/{y}.png?appid=xxxx

I would love to use your work, I've been trying to figure out inside your code, but having been able to... Are you still working on this?.. Do you plan to solve it any time soon?

Thanks

buche commented 7 years ago

Thanks for your investigation! Hadn't much time and won't have much time for the next two weeks. Your last post showed me: now it is obligatory to send the AppId even with the tile requests. I've just tested a small hack and it works.

Maybe tomorrow I'll submit a commit allowing to pass an AppId to the tile layers.

ramiglez30 commented 7 years ago

Hi Buche,

Yes, I did the hack myself and it works just like you said. Sadly, I need to move to darksky.net due to HTTPS limitation on OWM.

I'll keep an eye on your repo...

Thanks for your answer!

Rami.

2017-04-21 14:48 GMT-04:00 buche notifications@github.com:

Thanks for your investigation! Hadn't much time and won't have much time for the next two weeks. Your last post showed me: now it is obligatory to send the AppId even with the tile requests. I've just tested a small hack and it works.

Maybe tomorrow I'll submit a commit allowing to pass an AppId to the tile layers.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/buche/leaflet-openweathermap/issues/21#issuecomment-296273669, or mute the thread https://github.com/notifications/unsubscribe-auth/AD7W-hzQte4GNXsVcb19yoiBWBJKyFP2ks5ryPoagaJpZM4MSN29 .

buche commented 7 years ago

Just released v1.0.3 It lets you add an AppId on tile layer creation and it fixes creating layers of current weather.

Sadly it is out of my scope to remove the HTTPS limitations of OWM. If OWM introduces HTTPS for all elements I'll add an option to adapt the default tile url.

buche commented 6 years ago

OWM now supports https. I'll change all references to OWM from http to https.