<?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: Search Widget Zoom Issue with Feature Layer Esri JS API 4.x in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-zoom-issue-with-feature-layer-esri/m-p/54032#M4792</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response.&amp;nbsp;I ended up using the &lt;STRONG&gt;goTo()&lt;/STRONG&gt; method for the map view object within the &lt;STRONG&gt;search-complete&lt;/STRONG&gt; event of the Search widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// set map view during search complete event&lt;BR /&gt;searchWidget.on('search-complete', function(response) {&lt;BR /&gt; // latitude of result&lt;BR /&gt; const latitude = response.results[0].results[0].extent.center.latitude;&lt;BR /&gt; // longitude to result&lt;BR /&gt; const longitude = response.results[0].results[0].extent.center.longitude;&lt;BR /&gt; &lt;BR /&gt; // set map view to result coordinates&lt;BR /&gt; mapView.goTo({&lt;BR /&gt; center: [longitude, latitude],&lt;BR /&gt; zoom: 17 &lt;BR /&gt; });&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Mar 2020 12:30:37 GMT</pubDate>
    <dc:creator>PatrickMcKinney1</dc:creator>
    <dc:date>2020-03-30T12:30:37Z</dc:date>
    <item>
      <title>Search Widget Zoom Issue with Feature Layer Esri JS API 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-zoom-issue-with-feature-layer-esri/m-p/54030#M4790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am encountering a quirk or potential issue with the Search widget using the JS API 4.x&amp;nbsp; My search widget includes a geocoding service and feature layer source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have set a zoomScale property for both sources.&amp;nbsp; When searching against the geocoding service, the scale is being honored (I believe).&amp;nbsp; But when searching against the feature layer, it is not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am aware that I could use the&amp;nbsp;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;goToOverride method to resolve this.&amp;nbsp; However, it is my opinion that the widget is not working properly.&amp;nbsp; Any help is appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;I have a demo at&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/pmckinney/pen/MWYLggN" title="https://codepen.io/pmckinney/pen/MWYLggN"&gt;https://codepen.io/pmckinney/pen/MWYLggN&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;Sample searches:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;15 W High Street, Carlisle&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;New Courthouse&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;321 Gettysburg Pike, Mechanicsburg&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;DIV class="" style="color: #000000; text-decoration: none; font-size: 16px;"&gt;&lt;DIV class="" style="border: medium none currentColor;"&gt;&lt;DIV class="" style="font-size: 14px;"&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class="" style="color: #323232;"&gt;&lt;DIV&gt;&lt;DIV class="" style="color: #323232;"&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class="" style="color: #323232;"&gt;&lt;DIV class=""&gt;&lt;DIV class="" style="margin-bottom: 10px;"&gt;MDJ 09-3-01&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2020 16:09:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-zoom-issue-with-feature-layer-esri/m-p/54030#M4790</guid>
      <dc:creator>PatrickMcKinney1</dc:creator>
      <dc:date>2020-01-22T16:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Search Widget Zoom Issue with Feature Layer Esri JS API 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-zoom-issue-with-feature-layer-esri/m-p/54031#M4791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Hi Patrick,&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I was able to reproduce the issue so I went ahead and logged a defect.&lt;/P&gt;&lt;UL style="background-color: #ffffff; border: 0px; padding: 0px 0px 0px 30px;"&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;BUG-000129390: The ZoomScale property fails to set zoom scale for the selected search result from LayerSearchSource.&lt;/LI&gt;&lt;/UL&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #0e101a; background: transparent; border: 0px; margin: 0pt 0px;"&gt;As you have probably already found, a possible workaround would be to set view.scale in a &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html#event-select-result"&gt;select-result&lt;/A&gt; event. For example:&lt;/P&gt;&lt;P style="color: #0e101a; background: transparent; border: 0px; margin: 0pt 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV style="color: #000000; background-color: #ffffff; border: 0px; font-weight: normal; font-size: 14px;"&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px; padding: 0px 0px 0px 120px;"&gt;&lt;SPAN style="color: #001080; border: 0px; font-weight: inherit; font-size: 14px;"&gt;searchWidget&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;on&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515; border: 0px; font-weight: inherit; font-size: 14px;"&gt;"select-result"&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: #0000ff; border: 0px; font-weight: inherit; font-size: 14px;"&gt;function&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;/DIV&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px; padding: 0px 0px 0px 120px;"&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #001080; border: 0px; font-weight: inherit; font-size: 14px;"&gt;view&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;goTo&lt;/SPAN&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px; padding: 0px 0px 0px 120px;"&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #001080; border: 0px; font-weight: inherit; font-size: 14px;"&gt;scale:&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: #098658; border: 0px; font-weight: inherit; font-size: 14px;"&gt;500000&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px; padding: 0px 0px 0px 120px;"&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px; padding: 0px 0px 0px 120px;"&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P style="color: #0e101a; background: transparent; border: 0px; margin: 0pt 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Apologies for the inconvenience!&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Lingtao&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Esri Support Services&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2020 20:40:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-zoom-issue-with-feature-layer-esri/m-p/54031#M4791</guid>
      <dc:creator>xlt208</dc:creator>
      <dc:date>2020-03-13T20:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Search Widget Zoom Issue with Feature Layer Esri JS API 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-zoom-issue-with-feature-layer-esri/m-p/54032#M4792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response.&amp;nbsp;I ended up using the &lt;STRONG&gt;goTo()&lt;/STRONG&gt; method for the map view object within the &lt;STRONG&gt;search-complete&lt;/STRONG&gt; event of the Search widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// set map view during search complete event&lt;BR /&gt;searchWidget.on('search-complete', function(response) {&lt;BR /&gt; // latitude of result&lt;BR /&gt; const latitude = response.results[0].results[0].extent.center.latitude;&lt;BR /&gt; // longitude to result&lt;BR /&gt; const longitude = response.results[0].results[0].extent.center.longitude;&lt;BR /&gt; &lt;BR /&gt; // set map view to result coordinates&lt;BR /&gt; mapView.goTo({&lt;BR /&gt; center: [longitude, latitude],&lt;BR /&gt; zoom: 17 &lt;BR /&gt; });&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2020 12:30:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-zoom-issue-with-feature-layer-esri/m-p/54032#M4792</guid>
      <dc:creator>PatrickMcKinney1</dc:creator>
      <dc:date>2020-03-30T12:30:37Z</dc:date>
    </item>
  </channel>
</rss>

