Select to view content in your preferred language

Can Plot 3 Different Graphic Layers, but they will vanish if I pan to another area. Is there a way to make them stick at all times?

1650
3
Jump to solution
12-06-2016 07:20 PM
IanPeebles
Frequent Contributor

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.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

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?

View solution in original post

3 Replies
FC_Basson
MVP Regular Contributor

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?

RobertScheitlin__GISP
MVP Emeritus

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?

IanPeebles
Frequent Contributor

Robert,

You are correct.  Going to re-work this a bit and just work with the graphics layer.

0 Kudos