Hello everyone. I posted in another thread, but wanted to be more specific. I have three graphic layers set up for three feature layers. The idea is to allow the user to perform a draw on the map until they are ready to post the graphic as an apply edits. The initial draw writes to the standard map.graphics layer and is cleared each time a new draw is performed. I have this working and set up where a graphic layer draws after the edits are posted.
Solved! Go to Solution.
Ian,
You seem to be adding the graphic (after the Draw toolbar is done) to the map.graphics and a GraphicsLayer and the FeatureLayer at some point. This has me pretty confused. I get that you want to add the graphic to the FeatureLayer when the user is ready to save the graphic and you want to keep the FL invisible. But why are you adding the graphic to the map.graphics and a GL? You are clearing the map.graphics each time you are adding a new graphic so what is the point in adding them there? Are the GLs added to the map and visible?
Trying a different mode might solve your problem. What happens if you refresh the feature layer (FeatureLayer | API Reference | ArcGIS API for JavaScript 3.18 ) after the map extent has changed?
Ian,
You seem to be adding the graphic (after the Draw toolbar is done) to the map.graphics and a GraphicsLayer and the FeatureLayer at some point. This has me pretty confused. I get that you want to add the graphic to the FeatureLayer when the user is ready to save the graphic and you want to keep the FL invisible. But why are you adding the graphic to the map.graphics and a GL? You are clearing the map.graphics each time you are adding a new graphic so what is the point in adding them there? Are the GLs added to the map and visible?
Robert,
You are correct. Going to re-work this a bit and just work with the graphics layer.