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

How not to preload #28

Open
trakais opened this issue Mar 23, 2015 · 1 comment
Open

How not to preload #28

trakais opened this issue Mar 23, 2015 · 1 comment

Comments

@trakais
Copy link

trakais commented Mar 23, 2015

About this: "Note that data starts to download when the layer is created NOT when it’s added to the map in order to get a head start."

Is there any way not to do this? My GeoJSON is quite large. I would prefer it to be loaded only when Leaflet Control checkbox is clicked and layer is added to the map.

@calvinmetcalf
Copy link
Owner

So this is built around the idea that that the layer should show up when
the box is checked.

What you could do is make an empty geojson layer and add a listener for it
being added to the map and use that to trigger the download

On Mon, Mar 23, 2015, 3:57 PM Normunds R. [email protected] wrote:

About this: "Note that data starts to download when the layer is created
NOT when it’s added to the map in order to get a head start."

Is there any way not to do this? My GeoJSON is quite large. I would prefer
it to be loaded only when Leaflet Control checkbox is clicked and layer is
added to the map.


Reply to this email directly or view it on GitHub
#28.

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

No branches or pull requests

2 participants