MVTLayer URL change causes flicker on tile replace #5502
Unanswered
reececasey
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Without testing my expectation is that if you change the URL, the layer will clear out the loaded tiles and start loading new ones. If the new ones load fast there would just be some flicker, if they load slow it could be blank for a while. Keeping loaded tiles from previous URL until the new ones are loaded could be a feature request. It is probably not very hard to do, though there are many requirements going into the TileLayer so the logic is increasingly more complex. You might be able to fork the TileLayer and implement such changes yourself but it may require digging into the code. |
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
-
I am using the MVTLayer which I load a url from our own tile server. We allow the user to change query parameters that in turn update the tile url. During this transition there is a slight flicker as the new layer comes in. Often this is quite noticeable as the original points will still be there so will flicker as they replace again.
Is there anything I can do to combat this possibly? I had the thought of setting up a new layer and doing a cheap show hide transition but wondered if that should be delt with anyway?
I assume as the URL is changed the layer is binned and a new one is added so it has no concept of knowing the tile with data gain ready for example? As when the new params are selected I see from debug logs
invalidated
happen on the layer then the new oneInitializing
Any tips would be great.
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions