Update position of Graphic point API v4.0-beta3

2793
1
04-17-2016 04:21 PM
PeterDavis3
New Contributor II


I have placed graphics on the map using sample code from here:

Get started with graphics | ArcGIS API for JavaScript

However I am looking to update the position of a point on the map at regular intervals and move the symbol. Is there a way to do this yet with v4.0-beta3 API?

I notice that there is no redraw method on the GraphicsLayer yet.

GraphicsLayer | API Reference | ArcGIS API for JavaScript

0 Kudos
1 Reply
KristianEkenes
Esri Regular Contributor

Yes you can update the location of a graphic in the 4.0 release of the API. You accomplish this by simply setting the new geometry on the graphic. redraw() is not required.

You can also create a FeatureLayer from graphics, which we recommend so you can take full advantage of the capabilities offered by FeatureLayer. See the description for FeatureLayer | API Reference | ArcGIS API for JavaScript 4.0 ​ for more details.

0 Kudos