Waiting for data results feedback
tassoman opened this issue ยท 5 comments
Ciao,
is there any chance to get someting scrobbling or a notification while data are being fetched and onSuccess isn't yet triggered? Sometimes it happens the query is slow, the effect is missing markers in the map.
Thank you for your time ๐
Hi,
I'm not sure to understand what you want... You would like a sort of progress callback? It's not something I can implement as the Overpass response comes in a single chunk.
You can use the beforeRequest callback though.
Do you suggest to show a tooltip on beforeRequest then hiding it onSuccess or updating onError ?
I'd like write something like Data loading... while data is being loaded, like a temporary minZoomMessage
Oh I just understand, you would like a piece of interface displaying a loader or something?
It could be great indeed, but I'm running out of time to do that currently... Can you consider to make a pull request?
Yeah! Sorry for being unclear but I was in a full immmersion, two days coding and my mind went a bit crazy... ๐
I've solved adding a <div id="wait">Loading...</div>
, its CSS is a whole transparent grey full width/height with a font-awesome scrobbler.
I managed to set its z-index
when beforeRequest is triggered: $('#wait').css('z-index',9999);
.
Then I set it back to none while afterRequest is triggered: $('#wait').css('z-index',-1);
.
Setting it >0 would prevent map dragging.
For now it's barely working, giving feedback on requesting times, with no evidence of faulty or successful results.
In the end I've found this Leaflet.Spin Plugin.
I think we can close this issue then go to the seaside ๐๏ธ
Thanks for supporting ๐