<?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: Graphic Moves in Graphic Layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-moves-in-graphic-layer/m-p/365333#M33890</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think I finally figured this out.&amp;nbsp; Apparently with the graphics layers,unlike most layers, you have to wait for the map to load before adding a new GraphicsLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you can't just have &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var NewGraphics&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NewGraphics = new esri.layers.GraphicsLayer({});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.addLayer(NewGraphics);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead you have to have&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NewGraphics = new esri.layers.GraphicsLayer({});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; dojo.connect(map, "onLoad", function() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(NewGraphics);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; });&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Feb 2011 20:31:50 GMT</pubDate>
    <dc:creator>JaclynGorman</dc:creator>
    <dc:date>2011-02-09T20:31:50Z</dc:date>
    <item>
      <title>Graphic Moves in Graphic Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-moves-in-graphic-layer/m-p/365332#M33889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have 2 graphic layers in my code.&amp;nbsp; They are both created by drawing on the map.&amp;nbsp; Basically there are 2 drawing toolbars.&amp;nbsp; I wanted users to be able to clear one graphics layer or the other independently.&amp;nbsp; The code works, but the graphics in the layer move when I pan around the map.&amp;nbsp; If I take away the graphics layers, the graphics do not move when I pan.&amp;nbsp; Are there any ideas on what would cause this?&amp;nbsp; Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jaclyn&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 21:06:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-moves-in-graphic-layer/m-p/365332#M33889</guid>
      <dc:creator>JaclynGorman</dc:creator>
      <dc:date>2011-02-03T21:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Graphic Moves in Graphic Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-moves-in-graphic-layer/m-p/365333#M33890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think I finally figured this out.&amp;nbsp; Apparently with the graphics layers,unlike most layers, you have to wait for the map to load before adding a new GraphicsLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you can't just have &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var NewGraphics&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NewGraphics = new esri.layers.GraphicsLayer({});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.addLayer(NewGraphics);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Instead you have to have&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NewGraphics = new esri.layers.GraphicsLayer({});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; dojo.connect(map, "onLoad", function() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.addLayer(NewGraphics);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; });&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Feb 2011 20:31:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphic-moves-in-graphic-layer/m-p/365333#M33890</guid>
      <dc:creator>JaclynGorman</dc:creator>
      <dc:date>2011-02-09T20:31:50Z</dc:date>
    </item>
  </channel>
</rss>

