<?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: Javascript 4.11 - Hightlight and zoom to feature extent in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/javascript-4-11-hightlight-and-zoom-to-feature/m-p/780549#M5271</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kate,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the highlighting I am confused because if you have a popup on that feature it should be highlighted by default, perhaps you can look into highlightOptions, or looking at this Esri sample code on highlighting:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=highlight-features-by-geometry" title="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=highlight-features-by-geometry"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the extent view.goTo() accepts an Extent:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo"&gt;MapView | ArcGIS API for JavaScript 4.11&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be able to pass the extent of the feature through view.goTo().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take note that if you pass in an Extent as the target geometry, the .goTo() method will zoom to the nearest LOD of the basemap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Extent also has an expand() method:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#expand" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#expand"&gt;Extent | ArcGIS API for JavaScript 4.11&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Jun 2019 18:05:21 GMT</pubDate>
    <dc:creator>DavidWilson3</dc:creator>
    <dc:date>2019-06-14T18:05:21Z</dc:date>
    <item>
      <title>Javascript 4.11 - Hightlight and zoom to feature extent</title>
      <link>https://community.esri.com/t5/developers-questions/javascript-4-11-hightlight-and-zoom-to-feature/m-p/780548#M5270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello-&amp;nbsp; Looking for some expertise on the Javascript API.&amp;nbsp; As of now my application uses the address search widget to find a location, if the location intersects the feature layer (polygons) a pop-up will appear with information.&amp;nbsp; I would also like that feature to be highlighted and zoom to extent. I feel like this should be obvious, I have been looking through the help documentation and perhaps I am not asking the right questions.&amp;nbsp; Anyone have ideas on&amp;nbsp;how to achieve this, what functions and methods to use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Kate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2019 20:28:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/javascript-4-11-hightlight-and-zoom-to-feature/m-p/780548#M5270</guid>
      <dc:creator>KateCarlson</dc:creator>
      <dc:date>2019-06-06T20:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript 4.11 - Hightlight and zoom to feature extent</title>
      <link>https://community.esri.com/t5/developers-questions/javascript-4-11-hightlight-and-zoom-to-feature/m-p/780549#M5271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kate,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the highlighting I am confused because if you have a popup on that feature it should be highlighted by default, perhaps you can look into highlightOptions, or looking at this Esri sample code on highlighting:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=highlight-features-by-geometry" title="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=highlight-features-by-geometry"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the extent view.goTo() accepts an Extent:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo"&gt;MapView | ArcGIS API for JavaScript 4.11&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should be able to pass the extent of the feature through view.goTo().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take note that if you pass in an Extent as the target geometry, the .goTo() method will zoom to the nearest LOD of the basemap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Extent also has an expand() method:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#expand" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html#expand"&gt;Extent | ArcGIS API for JavaScript 4.11&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2019 18:05:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/javascript-4-11-hightlight-and-zoom-to-feature/m-p/780549#M5271</guid>
      <dc:creator>DavidWilson3</dc:creator>
      <dc:date>2019-06-14T18:05:21Z</dc:date>
    </item>
  </channel>
</rss>

