<?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: Graphics not being updated on the map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-being-updated-on-the-map/m-p/1179809#M77587</link>
    <description>&lt;P&gt;Is the spatial reference correct?&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jun 2022 14:44:00 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2022-06-03T14:44:00Z</dc:date>
    <item>
      <title>Graphics not being updated on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-being-updated-on-the-map/m-p/1179735#M77582</link>
      <description>&lt;P&gt;I am trying to add and display graphics to a map post load.&lt;/P&gt;&lt;P&gt;My code is able to add it to the graphicslayer, and it advises me that it has added it.&lt;/P&gt;&lt;P&gt;Yet it doesn't show it on the map.&lt;/P&gt;&lt;P&gt;I've just spent over a day on documentation and i cannot figure it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;    watchUtils.on(this.graphicsLayer, "graphics", "change", () =&amp;gt; {console.log('Graphics added!');});


let polygon = {
      type: "polygon", // autocasts as Polygon
      rings: this.fromLATLONGtoXY(bigPolygon),
    };

    const simSymbol = {
      type: "simple-fill",
      color: [138, 43, 226, 0.5],
      style: "solid",
      outline: { 
        color: "blue",
        width: 1
      }
    }

    let graphic = new Graphic({
      geometry: polygon as Polygon,
      symbol: simSymbol
    });

    this.graphicsLayer.add(graphic);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After running the function i get a "&lt;SPAN&gt;Graphics added!" in console, but no graphic is&amp;nbsp; shown on map.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 08:30:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-being-updated-on-the-map/m-p/1179735#M77582</guid>
      <dc:creator>Aeseir</dc:creator>
      <dc:date>2022-06-03T08:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics not being updated on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-being-updated-on-the-map/m-p/1179794#M77585</link>
      <description>&lt;P&gt;You might want to post more code to give us a better context in order to see if we can help.&amp;nbsp; Also, have you tried removing the 'as Polygon' from line 20?&amp;nbsp; I have a very simple test file and it does not use that syntax.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 13:48:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-being-updated-on-the-map/m-p/1179794#M77585</guid>
      <dc:creator>TimDietz</dc:creator>
      <dc:date>2022-06-03T13:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics not being updated on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-being-updated-on-the-map/m-p/1179809#M77587</link>
      <description>&lt;P&gt;Is the spatial reference correct?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 14:44:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-being-updated-on-the-map/m-p/1179809#M77587</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2022-06-03T14:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics not being updated on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-being-updated-on-the-map/m-p/1180144#M77599</link>
      <description>&lt;P&gt;Removing polygon wasn't it.&lt;/P&gt;&lt;P&gt;There is really not much more code other than a bigPolygon that has series of LatLng that get converted to XY coordinate using the&amp;nbsp;&lt;SPAN&gt;webMercatorUtils&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;lngLatToXY. The out put for that is correct.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 09:20:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-being-updated-on-the-map/m-p/1180144#M77599</guid>
      <dc:creator>Aeseir</dc:creator>
      <dc:date>2022-06-06T09:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics not being updated on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-being-updated-on-the-map/m-p/1180145#M77600</link>
      <description>&lt;P&gt;No changes to spatial reference, they are same&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 09:21:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-being-updated-on-the-map/m-p/1180145#M77600</guid>
      <dc:creator>Aeseir</dc:creator>
      <dc:date>2022-06-06T09:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics not being updated on the map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-being-updated-on-the-map/m-p/1180146#M77601</link>
      <description>&lt;P&gt;Ended up fixing this by completely deleting the page code and starting from scratch. Essentially copy and pasting into another file and running it from that file.&lt;/P&gt;&lt;P&gt;It worked then, there must have been something funny going on in the cache that cause the issue.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 09:22:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-not-being-updated-on-the-map/m-p/1180146#M77601</guid>
      <dc:creator>Aeseir</dc:creator>
      <dc:date>2022-06-06T09:22:13Z</dc:date>
    </item>
  </channel>
</rss>

