<?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 Change the map extent of the fly in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-map-extent-of-the-fly/m-p/695025#M64669</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would like to have a button on my web page that when a user clicks on button it automatically resets teh map's extents to the default extent when map was initially loaded. Has any one done this before?&amp;nbsp; I think I will need to create a function that calls the map.setExtent. Can someone provide me some sample code?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Oct 2011 14:45:11 GMT</pubDate>
    <dc:creator>LeoKing</dc:creator>
    <dc:date>2011-10-31T14:45:11Z</dc:date>
    <item>
      <title>Change the map extent of the fly</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-map-extent-of-the-fly/m-p/695025#M64669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would like to have a button on my web page that when a user clicks on button it automatically resets teh map's extents to the default extent when map was initially loaded. Has any one done this before?&amp;nbsp; I think I will need to create a function that calls the map.setExtent. Can someone provide me some sample code?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2011 14:45:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-map-extent-of-the-fly/m-p/695025#M64669</guid>
      <dc:creator>LeoKing</dc:creator>
      <dc:date>2011-10-31T14:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Change the map extent of the fly</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-map-extent-of-the-fly/m-p/695026#M64670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You have the exact right idea.&amp;nbsp; When the page loads, you will want to capture the initial extent of the map in a variable (call it initExtent or something).&amp;nbsp; In a lot of cases, this is set when the map loads and is passed into the map constructor.&amp;nbsp; This is the case with a lot of the sample apps, including this one:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/demos/map/map_topo.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/demos/map/map_topo.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To wire up your button just have the button's onClick() event fire some code that calls map.setExtent and uses the extent that you saved to the variable earlier (initExtent).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry I don't have a code sample, but this should be very straightforward.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2011 18:42:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-the-map-extent-of-the-fly/m-p/695026#M64670</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-10-31T18:42:19Z</dc:date>
    </item>
  </channel>
</rss>

