AnsweredAssumed Answered

Updating geometry (position) of graphics in 4.4 doesn't visually update the layer.

Question asked by linkedpixel on Aug 10, 2017
Latest reply on Aug 11, 2017 by linkedpixel

I have found that when I try updating the location of a given graphic that has already been placed on a layer in 4.4 (graphic.geometry), the changes do not visually update on the layer and the marker remains at the position it was when instantiated (or at the location from the very first call to update geometry). I did not experience this in 3.2.


For instance, if you create a Point graphic with marker symbol, and add it to the layer at particular coordinates and then create a timer to programmatically update its location every 5 seconds using a bank of coordinates, it will only update visually on the screen the first time that method is called. By contrast, if you change the marker color etc. each frame it is updated to reflect accordingly.


If you delete the graphic and remove it from the layer, then define a new one with the updated geometry position, it updates successfully. But I feel this shouldn't be necessary. Does anyone have any thoughts on why we cannot reassign graphic.geometry to new values more than once in 4.4? Does any sample exist to illustrate how to dynamically update the position of a graphic without deleting it each call, and without resorting to using the track widget?