<?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 Auto zoom from larger extent into initial extent in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233507#M5481</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it possible on opening a flex app to an extent showing a wide area, pause ,then zoom into the initial extent? An example would be to show a State for a second then zoom into a city which would be the area of interest for the flex map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 May 2011 01:55:12 GMT</pubDate>
    <dc:creator>RobertMyers</dc:creator>
    <dc:date>2011-05-06T01:55:12Z</dc:date>
    <item>
      <title>Auto zoom from larger extent into initial extent</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233507#M5481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it possible on opening a flex app to an extent showing a wide area, pause ,then zoom into the initial extent? An example would be to show a State for a second then zoom into a city which would be the area of interest for the flex map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 01:55:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233507#M5481</guid>
      <dc:creator>RobertMyers</dc:creator>
      <dc:date>2011-05-06T01:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Auto zoom from larger extent into initial extent</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233508#M5482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Sure just set the map's inital extent to the state value and then have a zoom function like this called using setTimeout:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
//2000 is milliseconds and equals 2 seconds.
setTimeout(zoomNext, 2000, [ new Extent(xmin, ymin, xmax, ymax) ]);
private function zoomNext(ext:Extent):void
{
&amp;nbsp;&amp;nbsp; map.extent = ext;
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 11:48:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233508#M5482</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T11:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Auto zoom from larger extent into initial extent</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233509#M5483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can not figure out how I would call setTimeout automatically as the flex app opens.&amp;nbsp; I have tried creationComplete with a handler to call a funtcion with doQuery and the setTimeout as a fuction. No luck. I'm really not familiar how this is done beyond doing it with click event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Robert,&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Sure just set the map's inital extent to the state value and then have a zoom function like this called using setTimeout:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
//2000 is milliseconds and equals 2 seconds.
setTimeout(zoomNext, 2000, [ new Extent(xmin, ymin, xmax, ymax) ]);
private function zoomNext(ext:Extent):void
{
&amp;nbsp;&amp;nbsp; map.extent = ext;
}&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 11:48:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233509#M5483</guid>
      <dc:creator>RobertMyers</dc:creator>
      <dc:date>2021-12-11T11:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Auto zoom from larger extent into initial extent</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233510#M5484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Try calling it from a map load event listener.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 14:47:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233510#M5484</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-05-06T14:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Auto zoom from larger extent into initial extent</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233511#M5485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not quite experienced enough to know how to do the map load event listener. I did find however some code on a layerLoadHandler().&amp;nbsp; I created the below function and added load="layerLoadHandler()" to each of the layers being loaded - Bing Maps, ArcGISDynamicMapServiceLayer and the GraphicsLayer. I found that the function executed buy the Alert.show message but the zooming affect did not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any addition help with the map load event listener or the code below would be appreciated. Thank you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; private function layerLoadHandler():void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var allLayersLoaded:Boolean = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each (var id:String in myMap.layerIds)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var layer:Layer = myMap.getLayer(id);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!layer.loaded)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; allLayersLoaded = false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (allLayersLoaded)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show("All Layers Have Loaded!");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&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; setTimeout(zoomNext, 2000, [ new Extent(-9811265, 5111444, -9791850, 5130706)]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 13:44:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233511#M5485</guid>
      <dc:creator>RobertMyers</dc:creator>
      <dc:date>2011-05-09T13:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Auto zoom from larger extent into initial extent</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233512#M5486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; It is probably going to be best if you attach your code or a sample application and I can show you where to put the code to do this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 20:46:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233512#M5486</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-05-09T20:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Auto zoom from larger extent into initial extent</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233513#M5487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have attached a version of the code. It's a zipped text file. Thinking this through, I would also need to reset the initial extent in the case when the Initial Extents button is clicked it doesn't go to the opening extent. Basically, at the app opening it would pause, giving an opening reference to the local with respect to the City of Chicago then zooms into the suburb. I really appreciate your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 02:23:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233513#M5487</guid>
      <dc:creator>RobertMyers</dc:creator>
      <dc:date>2011-05-10T02:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Auto zoom from larger extent into initial extent</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233514#M5488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Here is the code working.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 22:04:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233514#M5488</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-05-10T22:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Auto zoom from larger extent into initial extent</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233515#M5489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Perfect. Now I understand it. I am fairly new to flex and seeking help in this forum.&amp;nbsp; I am getting an understanding why you are MVP! Thank you, again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can see my full app here with the zooming function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://gis.vil.woodridge.il.us/availablesites/"&gt;http://gis.vil.woodridge.il.us/availablesites/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 15:23:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233515#M5489</guid>
      <dc:creator>RobertMyers</dc:creator>
      <dc:date>2011-05-11T15:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Auto zoom from larger extent into initial extent</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233516#M5490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Only problem I see is that when you click an available property on the list to the right it zooms to Africa.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 15:31:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233516#M5490</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-05-11T15:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Auto zoom from larger extent into initial extent</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233517#M5491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have another post about this problem. &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/30003-Bind-Maps-and-query-results-glitch"&gt;http://forums.arcgis.com/threads/30003-Bind-Maps-and-query-results-glitch&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; If you hit refresh it should correct the problem. Or sometimes clearing the browser cache will fix it.&amp;nbsp; The points "in Africa" are being reprojected to the web mercator. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code that I attached previously is the same as the web link code. The query result include outSpatialReference="{myMap.spatialReference}.&amp;nbsp; myMap has &amp;lt;esri:SpatialReference wkid="102100"/&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am wondering if it's an issue with the newer Flex API 2.3.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 17:20:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/auto-zoom-from-larger-extent-into-initial-extent/m-p/233517#M5491</guid>
      <dc:creator>RobertMyers</dc:creator>
      <dc:date>2011-05-11T17:20:39Z</dc:date>
    </item>
  </channel>
</rss>

