-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Reload an image source #3037
Comments
@areichman You have two options for implementing this
We could theoretically add an |
@lucaswoj Option 1 is what I'm currently doing and it works well enough for my use case. It does add a bit of flicker though as the layer is removed and re-added, so I wanted to check if there were other ideas. If the flicker becomes an issue (e.g. for weather time-lapse loops) I can go down the Option 2 path again like I have done with Leaflet in the past. |
I wonder if the flicker could be addressed within the scope of #1989 💭 |
I would like to add some time-based raster layers to a map (e.g. radar weather overlays). To do this in Leaflet, I've generally created a LayerGroup with a TileLayer for each timestamp I have available. Then some code (in response to either a user interaction or setInterval timer) would show/hide each layer in the group using CSS.
I'm wondering if there's a way to do this using a single source/layer in GL (version 0.21.0). Is there a set of methods that would allow something similar to GeoJSONSource#setData that would reload and redraw the layer if the image URL changed, etc.?
The text was updated successfully, but these errors were encountered: