Adding many layers to a map but only visible those on demand #4277
kikocorreoso
started this conversation in
General
Replies: 1 comment 3 replies
-
Layers tell the client what to render, source is the data. When you define s source you get all the data in the tiles and decide what to render using the layers. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
It is my first time working with maplibre/mapbox and maybe this is something stupid but I can't find a good answer in the docs/discussions/internet/etc.
Imagine I want a map and I want to offer tens of layers to the user but only very few of them shall be requested, loaded and visible when page is ready.
Most of the examples I see follow this pattern:
My questions:
map.on('load'...
, would all layers be requested to the server when the page is accessed?visibility: none
, would be the non visible layers loaded but only non visible when the page is accessed?Thank you very much for any hint on this.
Kind regards.
Beta Was this translation helpful? Give feedback.
All reactions