<?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: JSON to Graphic to Map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-to-graphic-to-map/m-p/763510#M70740</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply. It's good to see some working sample of a graphic created by JSON. But your point about projection might be the solution to my problem. I still can't seem to render the graphic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;will calling &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;point.setSaptialReference({ "wkid": 4326 });&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;resolve the spatial reference issue and update my x and y coordinates?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Apr 2014 04:25:53 GMT</pubDate>
    <dc:creator>NathanDorman</dc:creator>
    <dc:date>2014-04-18T04:25:53Z</dc:date>
    <item>
      <title>JSON to Graphic to Map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-to-graphic-to-map/m-p/763508#M70738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was wondering if the documentation on website API is up to date or if I'm just missing something. I'm trying to add a graphic to my map by creating a graphic using JSON by the format and parameters stated in the API. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;validation checked w/ jsonlint.com&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var json = {"geometry":{"points":[[608647.8,2368271.8],[608252.7,2368339.2],[600298.56,2384759.5],[598867.1,2384862],[597231.44,2384743.2],[599478.1,2384728.8],[598811.1,2384355.5],[599798.75,2384646.2],[600041.44,2384662.5],[598171.25,2389613.5],[598431.3,2389301],[595302.94,2388870],[600176.1,2375361.8],[599342.7,2382036.5],[594301.56,2382029.8],[603859.9,2381974],[594440.3,2382028.8],[602758.9,2381808.2],[594808.5,2381696.8],[599076.9,2377178.8]],"spatialReference":{"wkid":26904,"latestWkid":26904}},"symbol":{"color":[120,255,120,64],"size":20,"angle":0,"xoffset":0,"yoffset":0,"type":"esriSMS","style":"esriSMSX","outline":{"color":[0,0,0,255],"width":5,"type":"esriSLS","style":"esriSLSSolid"}}}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var graphic = new Graphic(json);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// This doesn't work&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.getLayers("graphicsLayer").add(graphic);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;/* this also doesn't work&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.graphics.add(graphic);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;*/&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// I also call graphic.toJson() and console.log(map) to check their validity&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I inspect the HTML, I do see that the graphics layer element under "#content_layers &amp;gt; svg &amp;gt;" g does exist and just contains:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;g id="series_layer" transform="matrix(1.00000000,0.00000000,0.00000000,1.00000000,25.00000000,85.00000000)" style="display: block;"&amp;gt;&amp;lt;g&amp;gt;&amp;lt;/g&amp;gt;&amp;lt;/g&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought it might be an ordering issue, but I made my only dynamic map layer transparent, which had no effect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also checked to make sure that map was not undefined, and I'm sure that all my references do exist.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm on JS API v3.8 and did try 3.9.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions? I feel like I'm close, but can't figure it out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 20:39:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-to-graphic-to-map/m-p/763508#M70738</guid>
      <dc:creator>NathanDorman</dc:creator>
      <dc:date>2014-04-17T20:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to Graphic to Map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-to-graphic-to-map/m-p/763509#M70739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are close!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's a sample using different points, but the same symbol.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/tE4A3/8/" rel="nofollow" target="_blank"&gt;http://jsfiddle.net/tE4A3/8/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your graphic still doesn't draw, you may end up having to convert those points to wkid 102100 or 4326.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Apr 2014 21:00:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-to-graphic-to-map/m-p/763509#M70739</guid>
      <dc:creator>JonathanUihlein</dc:creator>
      <dc:date>2014-04-17T21:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to Graphic to Map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-to-graphic-to-map/m-p/763510#M70740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply. It's good to see some working sample of a graphic created by JSON. But your point about projection might be the solution to my problem. I still can't seem to render the graphic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;will calling &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;point.setSaptialReference({ "wkid": 4326 });&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;resolve the spatial reference issue and update my x and y coordinates?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 04:25:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-to-graphic-to-map/m-p/763510#M70740</guid>
      <dc:creator>NathanDorman</dc:creator>
      <dc:date>2014-04-18T04:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: JSON to Graphic to Map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-to-graphic-to-map/m-p/763511#M70741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Jon, I ended up having to change the spatialreference of all my data (I was thinking of reprojecting using JS).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Apr 2014 02:49:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/json-to-graphic-to-map/m-p/763511#M70741</guid>
      <dc:creator>NathanDorman</dc:creator>
      <dc:date>2014-04-19T02:49:06Z</dc:date>
    </item>
  </channel>
</rss>

