<?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: changing extent dynamically in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/changing-extent-dynamically/m-p/130541#M4346</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Guys,I think I got it. Below is the code....I have my three extents in a combobox instead of Buttons. Below is the snippet &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

//changeView is the event listener for combo box's change property

private function changeView(event:Event):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var viewExtent:Extent=new Extent(Number(bboxArray[0]), Number(bboxArray[1]), Number(bboxArray[2]), Number(bboxArray[3]), null);
&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedExtent = viewExtent;
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.extent=selectedExtent;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //mx.controls.Alert.show(selectedView);
&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;bboxArray has xmin,ymin,xmax and ymax values respectively which I get from the database.Please don't forget to write &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;&lt;STRONG&gt;if statements&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt; depending on you case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 07:20:42 GMT</pubDate>
    <dc:creator>SaugatJoshi</dc:creator>
    <dc:date>2021-12-11T07:20:42Z</dc:date>
    <item>
      <title>changing extent dynamically</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/changing-extent-dynamically/m-p/130540#M4345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have 3 buttons in viewer.I have extents for each of these from the database..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Button 1- zooms to football field&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;button 2- zooms to university building, and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;button 3- zooms to nearby police station.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Where can I change the code to achieve something like this in the same map? The initial extent will be the extent from button 1. What about other two extents. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 18:48:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/changing-extent-dynamically/m-p/130540#M4345</guid>
      <dc:creator>SaugatJoshi</dc:creator>
      <dc:date>2011-05-19T18:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: changing extent dynamically</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/changing-extent-dynamically/m-p/130541#M4346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Guys,I think I got it. Below is the code....I have my three extents in a combobox instead of Buttons. Below is the snippet &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

//changeView is the event listener for combo box's change property

private function changeView(event:Event):void
&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var viewExtent:Extent=new Extent(Number(bboxArray[0]), Number(bboxArray[1]), Number(bboxArray[2]), Number(bboxArray[3]), null);
&amp;nbsp;&amp;nbsp;&amp;nbsp; selectedExtent = viewExtent;
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.extent=selectedExtent;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //mx.controls.Alert.show(selectedView);
&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;bboxArray has xmin,ymin,xmax and ymax values respectively which I get from the database.Please don't forget to write &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;&lt;STRONG&gt;if statements&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt; depending on you case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:20:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/changing-extent-dynamically/m-p/130541#M4346</guid>
      <dc:creator>SaugatJoshi</dc:creator>
      <dc:date>2021-12-11T07:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: changing extent dynamically</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/changing-extent-dynamically/m-p/130542#M4347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello all &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I try same code but &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;got this error &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1046: Type was not found or was not a compile-time constant: Extent.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 02:54:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/changing-extent-dynamically/m-p/130542#M4347</guid>
      <dc:creator>MohdShah</dc:creator>
      <dc:date>2011-07-21T02:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: changing extent dynamically</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/changing-extent-dynamically/m-p/130543#M4348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mohd,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; That is a really BASIC programming concept... You need to import the extent type.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;import com.esri.ags.geometry.Extent;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2011 10:40:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/changing-extent-dynamically/m-p/130543#M4348</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-07-21T10:40:41Z</dc:date>
    </item>
  </channel>
</rss>

