<?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 Zoom to extent error in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-to-extent-error/m-p/430104#M39546</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created logic by this example in my Angular 8 app:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-queryextent/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-queryextent/index.html"&gt;Zoom to extent of all features | ArcGIS API for JavaScript 4.15&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/493405_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;But in method the method goTo throws exception: Cannot read property 'targetGeometry' of null. I can't understand the reason of exception. I found some solution to move scene&amp;nbsp;to point and it works:&lt;BR /&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/493416_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;But I would like to use&amp;nbsp;view.goTo(response.extent) it is more native and clear.&lt;BR /&gt;One more thing: coordinates in&amp;nbsp;&lt;SPAN style="color: #1d1c1d; background-color: #f8f8f8;"&gt;sweref 99 format. Could it be a reason of the&amp;nbsp;&amp;nbsp;issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 May 2020 07:32:53 GMT</pubDate>
    <dc:creator>EvryIndustries_Sweden</dc:creator>
    <dc:date>2020-05-26T07:32:53Z</dc:date>
    <item>
      <title>Zoom to extent error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-to-extent-error/m-p/430104#M39546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created logic by this example in my Angular 8 app:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-queryextent/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-queryextent/index.html"&gt;Zoom to extent of all features | ArcGIS API for JavaScript 4.15&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/493405_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;But in method the method goTo throws exception: Cannot read property 'targetGeometry' of null. I can't understand the reason of exception. I found some solution to move scene&amp;nbsp;to point and it works:&lt;BR /&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/493416_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;But I would like to use&amp;nbsp;view.goTo(response.extent) it is more native and clear.&lt;BR /&gt;One more thing: coordinates in&amp;nbsp;&lt;SPAN style="color: #1d1c1d; background-color: #f8f8f8;"&gt;sweref 99 format. Could it be a reason of the&amp;nbsp;&amp;nbsp;issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2020 07:32:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-to-extent-error/m-p/430104#M39546</guid>
      <dc:creator>EvryIndustries_Sweden</dc:creator>
      <dc:date>2020-05-26T07:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to extent error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-to-extent-error/m-p/430105#M39547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;&lt;SPAN style="-webkit-text-size-adjust: auto; background-color: rgba(255, 255, 255, 0);"&gt;The geometry that you are zooming to needs to be in the same spatial reference as the view. In your queryExtent you can provide a query class and set the outSpatialReference to the view.spatialReference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2020 14:45:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-to-extent-error/m-p/430105#M39547</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-05-26T14:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to extent error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-to-extent-error/m-p/430106#M39548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Thank you for your help. It makes sense. &lt;BR /&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/493490_pastedImage_1.png" /&gt;&lt;BR /&gt;But I got another error:&lt;BR /&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/493491_pastedImage_2.png" /&gt;&lt;BR /&gt;Difficult to understand the reason. I found temporary solution with zoom. It is&amp;nbsp;not so clear but works quite well.&amp;nbsp;Coefficient 8 is selected approximately &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;&amp;nbsp;Maybe this will help someone.&lt;BR /&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/493492_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2020 18:21:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-to-extent-error/m-p/430106#M39548</guid>
      <dc:creator>EvryIndustries_Sweden</dc:creator>
      <dc:date>2020-05-26T18:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to extent error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-to-extent-error/m-p/430107#M39549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue with your&amp;nbsp;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;queryExtent&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;outSpatialReference&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;then&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is that you are passing a simple Object and not an actual &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-Query.html"&gt;Query Class&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2020 22:04:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-to-extent-error/m-p/430107#M39549</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-05-26T22:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to extent error</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-to-extent-error/m-p/430108#M39550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works! Thank you!&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;      &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;zoomToExtentFunc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; function &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; query &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;createQuery&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        query&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;outSpatialReference &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;spatialReference 
        &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;queryExtent&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;query&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;then&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;response &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;goTo&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;response&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;catch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;function &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;error&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
             console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;error&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;error&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:20:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zoom-to-extent-error/m-p/430108#M39550</guid>
      <dc:creator>EvryIndustries_Sweden</dc:creator>
      <dc:date>2021-12-11T19:20:34Z</dc:date>
    </item>
  </channel>
</rss>

