Hacker News new | ask | show | jobs
by anvaka 2339 days ago
To fetch the roads I use overpass turbo API. They are sometimes slow and timeout and sometimes limit amount of requests that we can send. So I found three endpoints of overpass turbo and rotate between them: in case when one fails I go to the next one. If none was able to handle the request, I bail out and show the error.

That said, I also cached 3,000 cities with population over 100k citizens and try the cache first, before going to overpass. That may be the reason why it is fast in some cases and slow in others.

By the way if someone has more stable/fast overpass endpoints - I will be happy to add them to the list!