Adding a loading message to a leaflet js map using overpass api data

Hi,

I am new to this forum and hope I am posting this in the right place. I use

Leaflet 1.7 with the following
https://github.com/plepe/overpass-frontend
https://github.com/plepe/overpass-layer

To display data from OSM on my website pages.

Here is a example for the Chiswick Postcode W4 in west London

https://londinium.com/W4

I am looking for help adding a loading message as the overpass data takes a few seconds to load.

Does anyone else use these leaflet plugins?

I am wondering if anyone else has advice how to add a loading page, and react to errors.

Kind regards

Andy

Seems like (at least the) Development forum seems kind of dead…

Your loading times are way too high. And probably even a “loading message” will not help that much as while you keep zooming and panning I’m pretty sure that requests will pile up to make stuff even slower.

Is there any reason why you don’t just download the whole region via overpass and serve this information directly from your server? I do something like this here:
https://karte.hgv-steinfeld.de/
Once a day a cron job updates my local data and all requests are served directly from my server.

wow, your site is almost instant!

interesting idea

what do i need to do host it myself?

Andy