Open damiendevienne opened 8 years ago
I'm open to pull requests for this kind of thing! Would be good to make it optional.
On Wed, Feb 3, 2016, 5:27 AM damiendevienne notifications@github.com wrote:
Hello, this tool is really great, thanks! I have one simple question: Is there a way to ask the loader to wait before it is displayed? Because in my case, even when all tiles are already in the cache, the loader appears for a millisecond before disappearing when zooming or paning It would be great that when the tiles appear almost instantaneously, the loader does not show up Maybe a simple wait() or sleep() somewhere could do the trick?
Thanks a lot
— Reply to this email directly or view it on GitHub https://github.com/ebrelsford/Leaflet.loading/issues/29.
@damiendevienne mind checking out the latest version to see if that does what you expect?
@ebrelsford I cannot make this option to work... It seems to have no effect whatever value I put for delayIndicator.
I just wrote in my code:
var loadingControl = L.Control.loading({delayIndicator: 500}).addTo(map);
Any idea?
Thanks
Are you using the latest code from master? By "no effect" do you mean the loading indicator does not appear ever, or that there is no delay?
Here's an example of using it.
@damiendevienne are you using Leaflet Version 1.0? The example is using 0.7.3 which works well. I've tried it with Leaflet version 1.0-dev and it appears that the indicator appears with no delay. @ebrelsford have you tested it with this version of leaflet?
Yes I've tested it with Leaflet 1.0.0-rc1
and 1.0-dev
with no issues. If you can post a full example of it not functioning that would help.
Hello, this tool is really great, thanks! I have one simple question: Is there a way to ask the loader to wait before it is displayed? Because in my case, even when all tiles are already in the cache, the loader appears for a millisecond before disappearing when zooming or paning. It would be great that when the tiles appear almost instantaneously, the loader does not show up. Maybe a simple wait() or sleep() somewhere could do the trick?
Thanks a lot