<?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: map.graphics.add can not identify the graphic object in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-graphics-add-can-not-identify-the-graphic/m-p/542670#M50527</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If the geometry you are passing into that function is a valid json object, you probably need to convert it to a Geometry object to create the graphic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/namespace_geometry.htm#fromJson"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/namespace_geometry.htm#fromJson&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 May 2012 10:54:11 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2012-05-23T10:54:11Z</dc:date>
    <item>
      <title>map.graphics.add can not identify the graphic object</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-graphics-add-can-not-identify-the-graphic/m-p/542669#M50526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Mates,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am populating rings for a Geometry json object and creating a Graphic object to add for the map. Code is looks like below, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;function addGraphicToMap(geometry,ordernum,infoTemplate) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; var new_extent = null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; var symbol = symbols[ordernum-1];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; var graphicObj = new esri.Graphic(geometry, symbol);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; graphicObj.setGeometry(geometry);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; graphicObj.setSymbol(symbol);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; graphicObj.setAttributes( {"ORDER_NUM":ordernum});&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; graphicObj.setInfoTemplate(infoTemplate);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; map.graphics.add(graphicObj);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; var old_extent = geometry.getExtent();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; if(i == 0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new_extent = old_extent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new_extent = new_extent.union(old_extent);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when I try to add graphicObj to map it gives me a error saying, : TypeError: 'graphicObj' is undefined&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my geometry object I have only rings as attribute and I guess that enough to create a Graphic know?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 07:48:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-graphics-add-can-not-identify-the-graphic/m-p/542669#M50526</guid>
      <dc:creator>HarshanaDias</dc:creator>
      <dc:date>2012-05-23T07:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: map.graphics.add can not identify the graphic object</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-graphics-add-can-not-identify-the-graphic/m-p/542670#M50527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If the geometry you are passing into that function is a valid json object, you probably need to convert it to a Geometry object to create the graphic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/namespace_geometry.htm#fromJson"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/namespace_geometry.htm#fromJson&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 10:54:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-graphics-add-can-not-identify-the-graphic/m-p/542670#M50527</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2012-05-23T10:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: map.graphics.add can not identify the graphic object</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-graphics-add-can-not-identify-the-graphic/m-p/542671#M50528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for you answer. It works. There is a another issue I came across, there are two situations where i populate this map. One is when click on edit for a saved geography and other one is populating map in the middle of a work flow of creating geography (this is the one i just figure to do correctly by this post)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So when i click on edit it execute a query with executeQueryTask and add the necessary objects to the map.graphics.add() which in other approach when i need to populate the map middle of the work flow (and i don't have saved Features in arc gis at this point to query against), I get the rings for the selected ZIPs/States and construct the necessary objects needed to map.graphics.add() as I listed in my initial post. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But when populating the map with latter approach I see the borders (differencing States etc) are not showing but with executeQueryTask&amp;nbsp; approach it shows them successfully. Initially i thought its because with executeQueryTask i set query.spatialRelationship and with other approach I didn't. But seems like its also not the problem. Can you please suggest how can i get those borders in the map?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i have attached two screen shots also how it see with and with out border in map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 May 2012 13:17:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-graphics-add-can-not-identify-the-graphic/m-p/542671#M50528</guid>
      <dc:creator>HarshanaDias</dc:creator>
      <dc:date>2012-05-26T13:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: map.graphics.add can not identify the graphic object</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-graphics-add-can-not-identify-the-graphic/m-p/542672#M50529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have create a new thread for latter question since its a new scenario&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 May 2012 15:40:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-graphics-add-can-not-identify-the-graphic/m-p/542672#M50529</guid>
      <dc:creator>HarshanaDias</dc:creator>
      <dc:date>2012-05-27T15:40:16Z</dc:date>
    </item>
  </channel>
</rss>

