<?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: cannot construct a PeUnit, no constructor in IDL in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-construct-a-peunit-no-constructor-in-idl/m-p/1072492#M73621</link>
    <description>&lt;P&gt;You also have to clone the spatial reference for the geometry object you want to project. Referencing to the map's spatial reference for the geometry object will cause the same error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jun 2021 09:50:40 GMT</pubDate>
    <dc:creator>HaraldLund</dc:creator>
    <dc:date>2021-06-25T09:50:40Z</dc:date>
    <item>
      <title>cannot construct a PeUnit, no constructor in IDL</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-construct-a-peunit-no-constructor-in-idl/m-p/77750#M7059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using client side projection utility I was getting this error "cannot construct a PeUnit, no constructor in IDL". Google gave no results so I thought I'd log the solution here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This causes the issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #000000;"&gt;&lt;SPAN style="color: #0000ff;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;extprj&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;projection&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #795e26;"&gt;project&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;Extent&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;ext&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;map&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;spatialReference&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;);&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;// project ext&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000;"&gt;&lt;SPAN style="color: #0000ff;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;map&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #795e26;"&gt;setExtent&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;extprj&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution is to create a new extent/clone it to pass into the projection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #000000; background-color: #ffffff; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;extprj&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;projection&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #795e26;"&gt;project&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;Extent&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;ext&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;),&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;SpatialReference&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;map&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;spatialReference&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;wkid&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;));&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #008000;"&gt;// project&amp;nbsp;&lt;SPAN&gt;ext&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;map&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #795e26;"&gt;setExtent&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #001080;"&gt;extprj&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;If you don't any time attempts are made to clone the map spatial reference it causes errors.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;I was using an older version of the API (3.24) so may have been resolved&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2020 03:10:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-construct-a-peunit-no-constructor-in-idl/m-p/77750#M7059</guid>
      <dc:creator>DavidWilton</dc:creator>
      <dc:date>2020-08-19T03:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: cannot construct a PeUnit, no constructor in IDL</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-construct-a-peunit-no-constructor-in-idl/m-p/77751#M7060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solution is to clone the map spatial reference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #000000; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #001080; border: 0px; font-weight: inherit; font-size: 14px;"&gt;extprj&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #001080; border: 0px; font-weight: inherit; font-size: 14px;"&gt;projection&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #795e26; border: 0px; font-weight: inherit; font-size: 14px;"&gt;project&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #001080; border: 0px; font-weight: inherit; font-size: 14px;"&gt;Extent&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #001080; border: 0px; font-weight: inherit; font-size: 14px;"&gt;ext&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;),&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #001080; border: 0px; font-weight: inherit; font-size: 14px;"&gt;SpatialReference&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #001080; border: 0px; font-weight: inherit; font-size: 14px;"&gt;map&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #001080; border: 0px; font-weight: inherit; font-size: 14px;"&gt;spatialReference&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #001080; border: 0px; font-weight: inherit; font-size: 14px;"&gt;wkid&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;));&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;// project&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;ext&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; border: 0px; font-size: 14px;"&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #001080; border: 0px; font-weight: inherit; font-size: 14px;"&gt;map&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #795e26; border: 0px; font-weight: inherit; font-size: 14px;"&gt;setExtent&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #001080; border: 0px; font-weight: inherit; font-size: 14px;"&gt;extprj&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2020 03:10:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-construct-a-peunit-no-constructor-in-idl/m-p/77751#M7060</guid>
      <dc:creator>DavidWilton</dc:creator>
      <dc:date>2020-08-19T03:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: cannot construct a PeUnit, no constructor in IDL</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-construct-a-peunit-no-constructor-in-idl/m-p/1072492#M73621</link>
      <description>&lt;P&gt;You also have to clone the spatial reference for the geometry object you want to project. Referencing to the map's spatial reference for the geometry object will cause the same error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 09:50:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/cannot-construct-a-peunit-no-constructor-in-idl/m-p/1072492#M73621</guid>
      <dc:creator>HaraldLund</dc:creator>
      <dc:date>2021-06-25T09:50:40Z</dc:date>
    </item>
  </channel>
</rss>

