<?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: home widget extent - how to set? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258716#M23965</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm looping through the features in all my layers to find the xmin, ymin&amp;nbsp; &amp;amp; xmax, ymax values in that collection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The notion of and extent replacing the centerpoint + zoom makes total sense to me.&amp;nbsp; I'm struggling to&amp;nbsp;understand how the concept of viewpoint replaces replaces extent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These seem like fundamental mapping concepts that I need a better understanding of.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jan 2018 01:40:53 GMT</pubDate>
    <dc:creator>yangwen</dc:creator>
    <dc:date>2018-01-04T01:40:53Z</dc:date>
    <item>
      <title>home widget extent - how to set?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258710#M23959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So for my mapview, I'm doing runtime calculation of extent and setting it to view.extent property.&lt;/P&gt;&lt;P&gt;Our requirement calls for the home button to restore the default view which is equal to the derived extent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our map also needs to be responsive, so once a browser dimension changes, the home button needs to re-calculate the extent that is applicable to the current browser viewport dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the 4.6 Doc, it appears we can define a Viewpoint that augments how the home behaves.&amp;nbsp; However it's not obvious how viewpoint relates to extent.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've custom logic that calculates the new extent upon a widthBreakpoint and heightBreakpoint change. However, I don't see how that new extent can be used to derive a new viewpoint, which the home button requires.&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Home.html"&gt;Home | API Reference | ArcGIS API for JavaScript 4.6&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 18:55:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258710#M23959</guid>
      <dc:creator>yangwen</dc:creator>
      <dc:date>2018-01-03T18:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: home widget extent - how to set?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258711#M23960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;A &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html"&gt;ViewPoint&lt;/A&gt; is based off a point and a scale, not an extent. You can get the views scale and center and create a ViewPoint from that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 19:04:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258711#M23960</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-01-03T19:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: home widget extent - how to set?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258712#M23961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So that sounds like I would need to update the view extent upon a browser resize via view.extent.&amp;nbsp; Then I can have the updated scale and center values to instantiate the new viewpoint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue with this approach is each browser resize will reposition the map per the new extent.&amp;nbsp; The desired behavior is to not to change the extent upon browser resize - Only update the viewpoint for the home button so that when the user clicks home, the&amp;nbsp;view he sees&amp;nbsp;is equivalent to the&amp;nbsp;extent for the current browser size.&amp;nbsp; Does this make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 19:18:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258712#M23961</guid>
      <dc:creator>yangwen</dc:creator>
      <dc:date>2018-01-03T19:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: home widget extent - how to set?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258713#M23962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The method you are using currently to calculate the extent needs to be updated to calculate the center and scale then is the only advice I have.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 19:46:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258713#M23962</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-01-03T19:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: home widget extent - how to set?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258714#M23963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I've been searching for some 101 articles that articulates the concepts of scale, zoom, extent, viewpoint, especially how they relate.&amp;nbsp;&amp;nbsp;Haven't had any luck. Do you know of any such articles? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 23:24:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258714#M23963</guid>
      <dc:creator>yangwen</dc:creator>
      <dc:date>2018-01-03T23:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: home widget extent - how to set?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258715#M23964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;None that I know of. &amp;nbsp;By what means are you calculating the extent now?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 00:26:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258715#M23964</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-01-04T00:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: home widget extent - how to set?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258716#M23965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm looping through the features in all my layers to find the xmin, ymin&amp;nbsp; &amp;amp; xmax, ymax values in that collection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The notion of and extent replacing the centerpoint + zoom makes total sense to me.&amp;nbsp; I'm struggling to&amp;nbsp;understand how the concept of viewpoint replaces replaces extent.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These seem like fundamental mapping concepts that I need a better understanding of.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 01:40:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258716#M23965</guid>
      <dc:creator>yangwen</dc:creator>
      <dc:date>2018-01-04T01:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: home widget extent - how to set?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258717#M23966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see why you are asking about my extent algorithm.&amp;nbsp; Upon further reading, it looks like I can derive the extent via setting the combination of centerpoint and zoom value.&amp;nbsp; Does the latter provide a more seamless pattern to deriving the Viewpoint? I believe the viewpoint needs the scale value.&amp;nbsp; I still need to understand how does zoom map to scale.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this approach, the new challenge I see if being able set a zoom level that provides sufficient buffer/padding around my map features.&amp;nbsp; With my current extent algorithm, I can expand the extent by a ratio amount like 20%.&amp;nbsp; &amp;nbsp; By using the zoom value to control the size of the bounding box, I don't see a programmatic way to control the amount of padding around my features.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jan 2018 18:43:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/258717#M23966</guid>
      <dc:creator>yangwen</dc:creator>
      <dc:date>2018-01-04T18:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: home widget extent - how to set?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/1025747#M71731</link>
      <description>&lt;P&gt;The target extent of the Home widget can be set using&lt;/P&gt;&lt;P&gt;homeWidget.viewpoint = new Viewpoint({&lt;BR /&gt;&amp;nbsp;&amp;nbsp; targetGeometry: extent&lt;BR /&gt;});&lt;/P&gt;</description>
      <pubDate>Thu, 11 Feb 2021 08:08:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/home-widget-extent-how-to-set/m-p/1025747#M71731</guid>
      <dc:creator>StefanUseldinger</dc:creator>
      <dc:date>2021-02-11T08:08:03Z</dc:date>
    </item>
  </channel>
</rss>

