<?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: MapView.goTo() not working when target is extent (even when extent is of same spatial reference as view) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-goto-not-working-when-target-is-extent/m-p/1205826#M78416</link>
    <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should work! It is hard to tell why it is not working without a reproducible case. In any case, I tested the following code snippet in 4.24 and it works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.when(()=&amp;gt;{
  const extXY = new Extent({
    xmin: -9177811,
    ymin: 4247000,
    xmax: -9176791,
    ymax: 4247784,
    spatialReference: {
      wkid: 102100
    }
  });
  view.goTo({ target: extXY.expand(1.33) }, { duration: 2000 });
});&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 24 Aug 2022 14:40:53 GMT</pubDate>
    <dc:creator>UndralBatsukh</dc:creator>
    <dc:date>2022-08-24T14:40:53Z</dc:date>
    <item>
      <title>MapView.goTo() not working when target is extent (even when extent is of same spatial reference as view)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-goto-not-working-when-target-is-extent/m-p/1205673#M78410</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/587155"&gt;@Rene&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/311750"&gt;@ReneP&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const extXY = new Extent({
    xmin: topLeftXY[0],
    xmax: bottomRightXY[0],
    ymin: bottomRightXY[1],
    ymax: topLeftXY[1],
    spatialReference: {
       wkid: 102100,
       latestWkid: 3857,
    },
});

//Not working
view.goTo({ target: extXY.extent.expand(1.33) }, { duration: 2000 });

//Working
view.extent = extXY.expand(1.33);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 02:23:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-goto-not-working-when-target-is-extent/m-p/1205673#M78410</guid>
      <dc:creator>naveenanne</dc:creator>
      <dc:date>2022-08-24T02:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: MapView.goTo() not working when target is extent (even when extent is of same spatial reference as view)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-goto-not-working-when-target-is-extent/m-p/1205826#M78416</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should work! It is hard to tell why it is not working without a reproducible case. In any case, I tested the following code snippet in 4.24 and it works.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.when(()=&amp;gt;{
  const extXY = new Extent({
    xmin: -9177811,
    ymin: 4247000,
    xmax: -9176791,
    ymax: 4247784,
    spatialReference: {
      wkid: 102100
    }
  });
  view.goTo({ target: extXY.expand(1.33) }, { duration: 2000 });
});&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 24 Aug 2022 14:40:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/mapview-goto-not-working-when-target-is-extent/m-p/1205826#M78416</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2022-08-24T14:40:53Z</dc:date>
    </item>
  </channel>
</rss>

