Closed Nedo93 closed 7 years ago
@Nedo93 - I think this may be related to the fact that deck.gl uses shallow equality on the data prop by default - and as far as I can tell, your interval mutates the data array instead of creating a new one.
You can use the dataComparator
props or an updateTriggers: {all: ...}
to trigger a vertex attribute update. See the base Layer
docs.
But where (physically in the code) should we implement the updateTriggers?
It is a property on the layers. Search the deck.gl repo for updateTriggers
, they are use in many of the examples.
Or just supply dataComparator: deepEqual
(e.g. from lodash) to the layers.
Ok thank you, we will take a look at it
Oh thank you, couldn't find that specific page, thank you very much
Hi guys, we are facing an issue using deck.gl We are trying to draw a scatterplot layer dinamically; when coordinates change the layer should update and simply move the circle on the map. The problem is that the circle won't move (aka the layer won't be redrawed) until we drag the map with mouse. We are kinda stucked here so if somebody can help us, would be really appreciated. I'm attaching the main files, if it's not enough to understand the problem, let me know it what else you need. Thank you in advance.
App.js :
deckgl-overlay.js :
index.html