<?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 Questions in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-questions/m-p/579782#M54099</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've had the same issue as well -- I was able to work around it using the centreAndZoom map function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s.on("select-result", function (result) {&lt;/P&gt;&lt;P&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; var pt = result.result.feature.geometry;&lt;/P&gt;&lt;P&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; globals.map.centerAndZoom(pt, 2); // Change '2' to your appropriate LOD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Edit* You'll need to set 'autoNavigate: false' on your Search object when doing this, otherwise it will attempt to zoom twice and some unexpected behavior can occur...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Apr 2015 14:42:29 GMT</pubDate>
    <dc:creator>JonathanCheung1</dc:creator>
    <dc:date>2015-04-27T14:42:29Z</dc:date>
    <item>
      <title>Search Widget Questions</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-questions/m-p/579781#M54098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two questions regarding the search widget:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) How do you change the graphic style on the result from the new search widget?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/message/489544"&gt;This thread&lt;/A&gt; describes how to set the style of the graphic when toggling the info window for the returned graphic.&lt;SPAN style="line-height: 1.5;"&gt;&amp;nbsp; I have tried this and it does work when toggling the infoWindow.&amp;nbsp; I am not clear on how to set the style of the graphic returned before clicking on the graphic to open the infoWindow.&amp;nbsp; Any ideas?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) When I return polygons using the search widget the map zooms in a little farther than I would like most of the time.&amp;nbsp; I would like to be a little further out.&amp;nbsp;&amp;nbsp; How can I correct this?&amp;nbsp; I have tried setting the map zoom on 'select-result' event handler but it seems that this event handler fires a bit too early and I wind up panned to the wrong location on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on(s,'select-result', function(e) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setZoom(8);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setting the zoomScale in the constructor for the search widget works for my point feature layers but for the polygon feature layers it does not work.&amp;nbsp; I believe this is because the polygons have a predefined extent.&amp;nbsp;&amp;nbsp; How can I override this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any guidance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2015 12:35:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-questions/m-p/579781#M54098</guid>
      <dc:creator>RichardWinkelbauer</dc:creator>
      <dc:date>2015-04-20T12:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Search Widget Questions</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-questions/m-p/579782#M54099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've had the same issue as well -- I was able to work around it using the centreAndZoom map function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s.on("select-result", function (result) {&lt;/P&gt;&lt;P&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; var pt = result.result.feature.geometry;&lt;/P&gt;&lt;P&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; globals.map.centerAndZoom(pt, 2); // Change '2' to your appropriate LOD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Edit* You'll need to set 'autoNavigate: false' on your Search object when doing this, otherwise it will attempt to zoom twice and some unexpected behavior can occur...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 14:42:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-questions/m-p/579782#M54099</guid>
      <dc:creator>JonathanCheung1</dc:creator>
      <dc:date>2015-04-27T14:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Search Widget Questions</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-questions/m-p/579783#M54100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This worked well for me.&amp;nbsp;&amp;nbsp; Since I was dealing with polygons I had to get the centroid from the polygon:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;s.on("select-result", function (result) {&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&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; var pt = result.result.feature.geometry.&lt;STRONG&gt;getCentroid()&lt;/STRONG&gt;;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&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; globals.map.centerAndZoom(pt, 2); // Change '2' to your appropriate LOD&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 15:57:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget-questions/m-p/579783#M54100</guid>
      <dc:creator>RichardWinkelbauer</dc:creator>
      <dc:date>2015-04-27T15:57:38Z</dc:date>
    </item>
  </channel>
</rss>

