<?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: api 4.x geometry fromJson in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-4-x-geometry-fromjson/m-p/171331#M15883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hector,&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Do I have to convert it to the CRS of the view beforehand? If so, what is fromJSON for?&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes. What it is for is exactly what the method suggests you are creating a Polygon class object directly from a JSON string instead of using the standard constructor method and having to parse the string yourself. The fromJSON does not handle re-projection for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 May 2018 14:20:06 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2018-05-29T14:20:06Z</dc:date>
    <item>
      <title>api 4.x geometry fromJson</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-4-x-geometry-fromjson/m-p/171330#M15882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, there.&lt;/P&gt;&lt;P&gt;I'm having a problem representing a polygon with a different system spatial&amp;nbsp;reference than the view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a polygon in ESRI JSON format and when I try to paint it on the map I can't get it to appear, I do so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let&amp;nbsp;&lt;SPAN&gt;laSimbologia = ...;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;let&amp;nbsp;migeom = Polygon.fromJSON(esriJSON);&lt;/P&gt;&lt;P&gt;let elGrafico = new Graphic({&lt;BR /&gt; geometry: &lt;SPAN style="background-color: #f6f6f6;"&gt;migeom&lt;/SPAN&gt;,&lt;BR /&gt; symbol: laSimbologia&lt;BR /&gt; });&lt;BR /&gt;view.graphics.add(elGrafico);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;When debugging the polygon looks well created and the spatialReference is the same as the one the ESRI JSON had, the execution ends correctly but does not paint the polygon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I have to convert it to the CRS of the view beforehand? If so, what is fromJSON for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;Greetings, Hector.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 May 2018 10:47:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-4-x-geometry-fromjson/m-p/171330#M15882</guid>
      <dc:creator>HectorSanchez3</dc:creator>
      <dc:date>2018-05-28T10:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: api 4.x geometry fromJson</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-4-x-geometry-fromjson/m-p/171331#M15883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hector,&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Do I have to convert it to the CRS of the view beforehand? If so, what is fromJSON for?&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes. What it is for is exactly what the method suggests you are creating a Polygon class object directly from a JSON string instead of using the standard constructor method and having to parse the string yourself. The fromJSON does not handle re-projection for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 14:20:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-4-x-geometry-fromjson/m-p/171331#M15883</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-05-29T14:20:06Z</dc:date>
    </item>
  </channel>
</rss>

