<?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: setting home widget extent at runtime. in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/setting-home-widget-extent-at-runtime/m-p/265839#M7037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tao, Thank you!!!&lt;/P&gt;&lt;P&gt;Great!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jun 2016 08:51:01 GMT</pubDate>
    <dc:creator>NatashaManzuiga</dc:creator>
    <dc:date>2016-06-30T08:51:01Z</dc:date>
    <item>
      <title>setting home widget extent at runtime.</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/setting-home-widget-extent-at-runtime/m-p/265837#M7035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, I changed my map extent using:&lt;/P&gt;&lt;P&gt;var extent = graphicsUtils.graphicsExtent(featureSet.features).expand(1); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; extent.spatialReference = spatialRef;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.map.setExtent(extent, true);&lt;/P&gt;&lt;P&gt;Now I'm trying to set home widget button extent...&lt;/P&gt;&lt;P&gt;Anyone knows how to do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2016 14:56:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/setting-home-widget-extent-at-runtime/m-p/265837#M7035</guid>
      <dc:creator>NatashaManzuiga</dc:creator>
      <dc:date>2016-06-29T14:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: setting home widget extent at runtime.</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/setting-home-widget-extent-at-runtime/m-p/265838#M7036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Naty,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The extent property of homeButtonWidget can be set, for details: &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/homebutton-amd.html" title="https://developers.arcgis.com/javascript/3/jsapi/homebutton-amd.html" rel="nofollow noopener noreferrer" target="_blank"&gt;HomeButton | API Reference | ArcGIS API for JavaScript 3.17&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In WAB, you could write your code like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//get the reference of HomeButtonWidget
var homeButtonWidget = window._widgetManager.getWidgetsByName("HomeButton");
if(homeButtonWidget){
&amp;nbsp; //the extent you want
&amp;nbsp; var extent = window._widgetManager.map.extent;
&amp;nbsp; //set extent
&amp;nbsp; homeButtonWidget[0].homeDijit.extent = extent;
}
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:03:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/setting-home-widget-extent-at-runtime/m-p/265838#M7036</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T13:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: setting home widget extent at runtime.</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/setting-home-widget-extent-at-runtime/m-p/265839#M7037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tao, Thank you!!!&lt;/P&gt;&lt;P&gt;Great!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Naty&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jun 2016 08:51:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/setting-home-widget-extent-at-runtime/m-p/265839#M7037</guid>
      <dc:creator>NatashaManzuiga</dc:creator>
      <dc:date>2016-06-30T08:51:01Z</dc:date>
    </item>
  </channel>
</rss>

