Single MVT for multiple layers #5552
-
Hello there! Firstly thank you to all the contributors in this repo, we have found great success using DeckGL and even extending it for certain use cases. Most of the layers we consume inside our application are MVT's and currently each data source has a separate data URL (e.g. We just recently updated our tile server to support returning multiple layers (e.g.
This works better IMO than the first solution, no flickering & doesn't require all layers to update for each
I have put together a reproducible example which doesn't happen 100% of the time but if you pan around you should see it. In short: Is this a bug, or am I not using it as intended? Or maybe I'm just digging myself a hole and shouldn't worry about the total number of requests? Our main goal is to reduce the total number of network requests, mainly because of chrome's limit on the number of connections for http/1.1. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I recommend you use
You should avoid changing the data URL if possible. It is recommended to turn layers off/on with the
Not sure what you are doing to cause this, but in your |
Beta Was this translation helpful? Give feedback.
I recommend you use
renderSubLayers
(the first option).onViewportLoad
is called very frequently and changingdata
prop value can be expensive.You should avoid changing the data URL if possible. It is recommended to turn layers off/on with the
visible
prop, see https://deck.gl/docs/developer-guide/performance#favor-layer-visibility-over-addition-and-removalNot sure what you are doing to cause this, but in your
renderSubLayers
you can specifyupdateTriggers
for each sub layer separately.