Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we set a time (half a second for example) before starting the loader? #29

Open
damiendevienne opened this issue Feb 3, 2016 · 6 comments
Milestone

Comments

@damiendevienne
Copy link

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

@ebrelsford
Copy link
Owner

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 [email protected]
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
#29.

@ebrelsford ebrelsford modified the milestone: v1.0.0 Feb 9, 2016
@ebrelsford
Copy link
Owner

@damiendevienne mind checking out the latest version to see if that does what you expect?

@ebrelsford ebrelsford reopened this Feb 9, 2016
@damiendevienne
Copy link
Author

@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

@ebrelsford
Copy link
Owner

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.

@joshdickerson92
Copy link

@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?

@ebrelsford
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants