<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Phantom, Persistent, Duplicate Graphics in GraphicsLayer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/1116145#M75262</link>
    <description>&lt;P&gt;The only way to overcome this behavior was by adding an event handler for zooming that creates a new graphic from the existing one, clear the layer and then adds the new graphic. It works but hey, it's workaround for unexplainable behavior.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Nov 2021 22:45:23 GMT</pubDate>
    <dc:creator>Arne_Gelfert</dc:creator>
    <dc:date>2021-11-11T22:45:23Z</dc:date>
    <item>
      <title>Phantom, Persistent, Duplicate Graphics in GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/212997#M19748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;This is definitely strange. I am selecting features from a point, a polyline and a polygon featurelayer by distance&amp;nbsp;from a point. I'm creating a graphics layer for each featuretype and highlighting the graphics&amp;nbsp;in the map. All feature types but the points display properly.&amp;nbsp;The points however, maintain a set of phantom graphics that persist at the zoomscale at which they were created. So when you zoom in, there appear to be a second set of point graphics with the same geometry relationship but at the scale at which the graphics layer was first drawn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The interesting this is that if I add the graphics to the graphicsLayer and do not refresh programmatically, then when the graphics layer redraws when the zoom scale is changed there is no issue. However, if I redraw&amp;nbsp;the graphics layer programmatically then the issue presents.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've dug in a little to try to debug this situation. I created a mouseover event on the graphics in the graphicsLayer but the phantom graphics do not respond. The length of the graphics in the graphics layer does not include the phantom graphics either.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone ever seen this? Also, what method does a zoom change call on the graphicsLayer? I had assumed that redraw was called on the graphicsLayer but redraw also causes the issue to present.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the image&amp;nbsp;that I have included. The 'Phantom Graphics' are outlined in black. I have zoomed in and drawn black lines to the points that these phantom graphics correspond with at the initial scale that graphics layer was drawn at.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/363602_pastedImage_1.png" style="width: 620px; height: 557px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any information or tips will be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Tyler&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2017 16:06:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/212997#M19748</guid>
      <dc:creator>TylerWaring</dc:creator>
      <dc:date>2017-07-20T16:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Phantom, Persistent, Duplicate Graphics in GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/212998#M19749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've run into a similar issue that may or may not be related&amp;nbsp;(in my case I didn't notice any relation to zoom scale). &amp;nbsp;I was&amp;nbsp;creating a graphics layer, adding graphics to it, clearing it, and adding more graphics all within a very small timespan. &amp;nbsp;The result was that some graphics would get "stuck" nondeterministically (from my perspective anyway) i.e. they'd be visible in the view but were nowhere to be found in any graphics collection, and calling graphicsLayer.clear() did nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I fixed this by ensuring that the graphics were not cleared and added within the same&amp;nbsp;fraction of a second (about 100 ms).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The thing to do is probably to try to reproduce this in a sandbox:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. &amp;nbsp;You're using&amp;nbsp;the 4.4 API, correct? &amp;nbsp;Map View or Scene View?&lt;BR /&gt;2. &amp;nbsp;What method are you using to search for nearest graphics?&lt;/P&gt;&lt;P&gt;3. &amp;nbsp;What method are you using to highlight graphics?&lt;/P&gt;&lt;P&gt;4. &amp;nbsp;The graphics layer in question holds the highlights, correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any sample code or pseudocode would also be helpful to replicate this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jul 2017 17:16:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/212998#M19749</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-07-20T17:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Phantom, Persistent, Duplicate Graphics in GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/212999#M19750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thomas, Thanks for your comments. &amp;nbsp;This application is in 3.21 I am using a plain ol' featureLayer.queryFeatures() query using a distance and geometry(point) option. I am applying a SimpleRenderer to the GraphicsLayer using a&amp;nbsp;SimpleMarkerSymbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the generalized breakdown of the code I am using for this operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;First, I create a circle graphic and add it to a GraphicsLayer:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;circle = new Circle({&lt;/P&gt;&lt;P&gt;center: mapGlobals.bufferPoint&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, geodesic: true&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, radius:&amp;nbsp;distMiles&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;, radiusUnit: "esriMiles"&lt;BR /&gt; });&lt;BR /&gt; var graphic = new Graphic(circle, bufferSymbol);&lt;BR /&gt; var bufferGraphicsLayer = map.getLayer("bufferGraphicsLayer");&lt;BR /&gt; bufferGraphicsLayer.clear();&lt;BR /&gt; bufferGraphicsLayer.add(graphic);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Next, I create a query on my feature layer:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;var query = new Query();&lt;/P&gt;&lt;P&gt;query.returnGeometry = true;&lt;BR /&gt; query.outFields = ["*"];&lt;BR /&gt; query.geometry = mapGlobals.bufferPoint;&lt;BR /&gt; query.distance = distMiles;&lt;BR /&gt; query.units = "miles";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Next, I create or clear my point line or polygon graphicsLayers:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if (!map.getLayer("pointCIP_GL")) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;renderer = new SimpleRenderer(markerSymbol);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;graphicsLayerId = "pointCIP_GL";&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var point_GL = new GraphicsLayer();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;point_GL.id = graphicsLayerId;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;point_GL.renderer = renderer;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;map.addLayer(point_GL);&lt;BR /&gt; }&lt;BR /&gt; else {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;map.getLayer("pointCIP_GL").clear();&lt;BR /&gt; }&lt;BR /&gt; if (!map.getLayer("polylineCIP_GL")) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;renderer = new SimpleRenderer(lineSymbol);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;graphicsLayerId = "polylineCIP_GL";&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var polyline_GL = new GraphicsLayer();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;polyline_GL.id = graphicsLayerId;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;polyline_GL.renderer = renderer;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;map.addLayer(polyline_GL);&lt;BR /&gt; }&lt;BR /&gt; else {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;map.getLayer("polylineCIP_GL").clear();&lt;BR /&gt; }&lt;BR /&gt; if (!map.getLayer("polygonCIP_GL")) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;renderer = new SimpleRenderer(fillSymbol);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;graphicsLayerId = "polygonCIP_GL";&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var polygon_GL = new GraphicsLayer();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;polygon_GL.id = graphicsLayerId;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;polygon_GL.renderer = renderer;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;map.addLayer(polygon_GL);&lt;BR /&gt; }&lt;BR /&gt; else {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;map.getLayer("polygonCIP_GL").clear();&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I then query each of the featureLayers in a Theme JSON object (CIPTheme):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;for (i in CIPTheme.layers) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var layer = CIPTheme.layers&lt;I&gt;;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(JSON.stringify(layer.id))&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var featureLayer = map.getLayer(layer.id);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;outerLayerCount++;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;featureLayer.queryFeatures(query, function (featureSet) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var feature;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var features = featureSet.features;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var featureType;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var graphicsLayerId;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var renderer;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var infoTemplate;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;innerLayerCount++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (features.length &amp;gt; 0) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;featureType = features[0].geometry.type&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;switch (featureType) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case "point":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;map.getLayer("pointCIP_GL").graphics = features;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;//if I don't call .redraw() method on these layers the graphicsLayer does not draw in until &lt;/STRONG&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//the map zooms but the 'phantom graphics' do not show up. However if I call redraw here the&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//graphicsLayer draws initially&amp;nbsp;but after zoom change the 'phantom graphics' show&amp;nbsp;up&lt;/STRONG&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// point_GL.redraw(); &lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case "polyline":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN&gt;polyline_GL&lt;/SPAN&gt;.graphics = features;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// polyline_GL.redraw();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;case "polygon":&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;map.getLayer("polygonCIP_GL").graphics = features;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// polygon_GL.redraw();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From here I go on to create custom JSON objects from the graphics attributes for use in visualizations outside the map.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if I may provide additional details or snipits.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Tyler&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 12:24:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/212999#M19750</guid>
      <dc:creator>TylerWaring</dc:creator>
      <dc:date>2017-07-21T12:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Phantom, Persistent, Duplicate Graphics in GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213000#M19751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the information, I'll try to reproduce this later today.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 14:11:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213000#M19751</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-07-21T14:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Phantom, Persistent, Duplicate Graphics in GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213001#M19752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is awesome of you! Thanks, Tyler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 14:55:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213001#M19752</guid>
      <dc:creator>TylerWaring</dc:creator>
      <dc:date>2017-07-21T14:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Phantom, Persistent, Duplicate Graphics in GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213002#M19753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's my attempt to reproduce:&amp;nbsp;&lt;A class="link-titled" href="https://jsbin.com/vuravalozo/edit?html,output" title="https://jsbin.com/vuravalozo/edit?html,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&amp;nbsp;- click map to perform a search. &amp;nbsp;Everything seems to be working normally. &amp;nbsp;I'm only doing this for a single point feature service though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would try calling graphicsLayer.add() for each graphic in the returned featureSet rather than setting the .graphics property equal to featureSet.features. &amp;nbsp;I couldn't get the "highlight" graphics to show up at all, even with a redraw,&amp;nbsp;using the method you posted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 20:45:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213002#M19753</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2017-07-21T20:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Phantom, Persistent, Duplicate Graphics in GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213003#M19754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the suggestion. I tried the features.forEach() method and the problem still persists. Let me&amp;nbsp;know if you have any other thoughts or suggestions and I'll give them a try. Thanks again.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Jul 2017 13:57:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213003#M19754</guid>
      <dc:creator>TylerWaring</dc:creator>
      <dc:date>2017-07-24T13:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Phantom, Persistent, Duplicate Graphics in GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213004#M19755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/193995"&gt;Thomas Solow,&lt;/A&gt; I created a HTML/ESRI JavaScript API 3.21 that I created for ESRI support. I thought I'd share it here too. To reproduce the 'phantom graphic' issue follow these steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Preview the attached html file.&lt;/P&gt;&lt;P&gt;2. Click on the map near some trees to reverse geocode a point.&lt;/P&gt;&lt;P&gt;3. Click on the 'Buffer &amp;amp; Find nearby trees' button in the resultant popup window to create a graphics layer that shows the selection set of trees within 0.1 miles of your click point.&lt;/P&gt;&lt;P&gt;4. With the light blue selection set added to the map as a graphics layer, zoom in one step and the 'phantom-graphics' will appear.&lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Aug 2017 14:14:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213004#M19755</guid>
      <dc:creator>TylerWaring</dc:creator>
      <dc:date>2017-08-01T14:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Phantom, Persistent, Duplicate Graphics in GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213005#M19756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the sample. &amp;nbsp;I spent a while looking at this because it wasn't clear to me how it differed from the sample I made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I finally came up with was that removing the outFields: ['*'] from the feature layer constructor fixes this problem in your sample and adding outFields: ['*'] causes the problem to appear in my sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure why this is the case. &amp;nbsp;It may be because the features returned by queryFeatures have their layer set to the existing feature layer and the layer is trying to optimize at some level and use the queried graphics in the feature layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way around this is to make a new graphic from each result in the queryFeatures call:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;queryFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;query&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; featureSet &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; features &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; featureSet&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; graphicsLyr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"pointCIP_GL"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; features&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;forEach&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;f &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// create new graphic from feature geometry&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// we don't need a symbol, the renderer on the graphics layer&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;// will take care of that&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; g &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Graphic&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;f&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsLyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;g&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:27:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213005#M19756</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2021-12-11T10:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Phantom, Persistent, Duplicate Graphics in GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213006#M19757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/193995"&gt;Thomas Solow&lt;/A&gt;, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I wasn't able to get this exact example to work in my production environment. However,&amp;nbsp; ended up getting something similar to your example to work.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for(var i =0; i &amp;lt; features.length ; i++){&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var g = new Graphic(features&lt;I&gt;.geometry, markerSymbol);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicsLyr.add(g) ;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all of your help on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tyler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Aug 2017 12:59:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/213006#M19757</guid>
      <dc:creator>TylerWaring</dc:creator>
      <dc:date>2017-08-02T12:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Phantom, Persistent, Duplicate Graphics in GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/1115873#M75242</link>
      <description>&lt;P&gt;Just came across this myself... never seen it before. Adding a single polyline graphic to a graphics layer and than zooming in and out creates a cascading series of smaller and/or larger siblings of that graphic. Not sure how else to describe this. I've tried all above suggested fixes. No luck yet. if anyone else has seen this in the last 4 year since the original post, please holler. Using JSAPI 3.31, AGS10.9, WAB2.21.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="siblings.png" style="width: 533px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27191iFBABB95FBDE3636A/image-size/large?v=v2&amp;amp;px=999" role="button" title="siblings.png" alt="siblings.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Nov 2021 23:10:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/1115873#M75242</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2021-11-10T23:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Phantom, Persistent, Duplicate Graphics in GraphicsLayer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/1116145#M75262</link>
      <description>&lt;P&gt;The only way to overcome this behavior was by adding an event handler for zooming that creates a new graphic from the existing one, clear the layer and then adds the new graphic. It works but hey, it's workaround for unexplainable behavior.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 22:45:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/phantom-persistent-duplicate-graphics-in/m-p/1116145#M75262</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2021-11-11T22:45:23Z</dc:date>
    </item>
  </channel>
</rss>

