From 4adb13a16a84af3523b20e83ffd546145549c8f3 Mon Sep 17 00:00:00 2001 From: Hartmut Holzgraefe Date: Sun, 23 Oct 2022 14:13:53 +0000 Subject: [PATCH] show tile load spinner after slight delay only --- www/maposmatic/templates/maposmatic/base.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/www/maposmatic/templates/maposmatic/base.html b/www/maposmatic/templates/maposmatic/base.html index 4fd55b3e..82b61e27 100644 --- a/www/maposmatic/templates/maposmatic/base.html +++ b/www/maposmatic/templates/maposmatic/base.html @@ -166,10 +166,17 @@ // TODO: attribution (shows on all zoom levels ...) }); - var map = L.map(elt.attr('id'), { loadingControl: true } ); + var map = L.map(elt.attr('id')); map.addLayer(osmLayer); map.addLayer(treeLayer); + var loadingControl = L.Control.loading({ +// separate: true, +// position: 'bottomleft', + delayIndicator: 100, + }); + map.addControl(loadingControl); + /* {% if OUTER_BOUNDS_JSON and OUTER_BOUNDS_JSON|length > 0%} var boundsStyle = {