You are not logged in.

#1 2022-01-14 11:51:29

andushki
Member
Registered: 2021-12-23
Posts: 3

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

Offline

#2 2022-01-16 14:59:07

M-Reimer
Member
Registered: 2020-06-03
Posts: 5

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

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.

Offline

#3 2022-01-16 15:04:54

andushki
Member
Registered: 2021-12-23
Posts: 3

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

wow, your site is almost instant!

interesting idea

what do i need to do host it myself?

Andy

Offline

Board footer

Powered by FluxBB