konradkalemba / korona.ws

🗺 Coronavirus interactive map of Poland
https://korona.ws
73 stars 29 forks source link

Background map #26

Closed kasmar00 closed 4 years ago

kasmar00 commented 4 years ago

It appears that you are using Openstreetmap tiles directly from [a/b/c].tile.openstreetmap.org which is (at least) discouraged by Tile Usage Policy. OSM Foundation tile servers are under heavy load recently (twitter post).

I would suggest manually downloading tiles (only for Poland, there are some ways to limit displaying other regions) for required zoom levels (6-11, according to Tile Calculator by Geofabrik, it shouldn't be more than 100 MB, or 35 MB if you limit to 6-10) and providing them on your own server (simple web server should be enough). These low zoom tiles aren't generated by OSM servers often, so there should be no major differences between catched-offline tiles and those from tile.osm.org

It was also pointed by one Openstreetmap contributor that on mobile chrome, the attribution is hidden and one has to scroll the page to see it. It appears that there is a problem with hiding top address bar or the webpage is too long.

image image

konradkalemba commented 4 years ago

@kasmar00 I see. I wasn't aware of such rules. I will try to host the tiles on my own.

kasmar00 commented 4 years ago

@konradkalemba I forgot to mention yesterday, there are many tile providers independent from OSM Foundation, some are paid with some free credit (like mapbox) and some only require tokens, you can find them on switch2osm.org.

konradkalemba commented 4 years ago

@kasmar00 Okay, thanks. I managed to start a tile server, I don't know though if will it be able to withstand the traffic. I will test it tonight when the traffic will be lower.

konradkalemba commented 4 years ago

@kasmar00 I managed to connect to my own tile server but as you can see the city names are not displayed. Do you know what can be the cause?

https://korona-ws-9up6iftmn.now.sh/

mhajder commented 4 years ago

@kasmar00 Okay, thanks. I managed to start a tile server, I don't know though if will it be able to withstand the traffic. I will test it tonight when the traffic will be lower.

If the queries are less than 50k, I would prefer to use MapBox.

konradkalemba commented 4 years ago

@mhajder Unfortunately it would cost a lot of money. Our own tile server is now handling all the traffic.

mhajder commented 4 years ago

@mhajder Unfortunately it would cost a lot of money. Our own tile server is now handling all the traffic.

In that case, you can now also pass traffic through CloudFlare with the cache all rule.

konradkalemba commented 4 years ago

@mhajder At the moment there is no need for that, but thanks for tip. :)