<?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 Constrained Map Extent in Flex in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/constrained-map-extent-in-flex/m-p/17528#M368</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know how to apply constrained Map Extent in Flex Viewer 2.1. I found one implemented on Sample Flex Viewer 1.3. &lt;/SPAN&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2421&amp;amp;t=295234&amp;amp;mc=0"&gt;http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2421&amp;amp;t=295234&amp;amp;mc=0&lt;/A&gt;&lt;SPAN&gt;. But not sure how to apply in 2.1, getting so many errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Oct 2010 22:05:12 GMT</pubDate>
    <dc:creator>SandeepTalasila</dc:creator>
    <dc:date>2010-10-25T22:05:12Z</dc:date>
    <item>
      <title>Constrained Map Extent in Flex</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/constrained-map-extent-in-flex/m-p/17528#M368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know how to apply constrained Map Extent in Flex Viewer 2.1. I found one implemented on Sample Flex Viewer 1.3. &lt;/SPAN&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2421&amp;amp;t=295234&amp;amp;mc=0"&gt;http://forums.esri.com/Thread.asp?c=158&amp;amp;f=2421&amp;amp;t=295234&amp;amp;mc=0&lt;/A&gt;&lt;SPAN&gt;. But not sure how to apply in 2.1, getting so many errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Oct 2010 22:05:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/constrained-map-extent-in-flex/m-p/17528#M368</guid>
      <dc:creator>SandeepTalasila</dc:creator>
      <dc:date>2010-10-25T22:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Constrained Map Extent in Flex</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/constrained-map-extent-in-flex/m-p/17529#M369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure if this will help you or not. This is the sample code on Mansour's blog, before it was modified for the FSV 1.3.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://thunderheadxpler.blogspot.com/2009/01/constraining-map-extent.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://thunderheadxpler.blogspot.com/2009/01/constraining-map-extent.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only change I had to make to the SampleMap.as file was on line 65...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;WAS: if( extent.containsExtent( m_initialExtent ))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NOW: if( extent.contains( m_initialExtent ))&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then the mxml looks something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:s="library://ns.adobe.com/flex/spark"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:mx="library://ns.adobe.com/flex/mx"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:esri="http://www.esri.com/2008/ags"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:sample="com.esri.sample.*"&amp;gt;

 &amp;lt;sample:SampleMap&amp;gt;
&amp;nbsp; &amp;lt;sample:extent&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;esri:Extent xmin="-92.957" ymin="37.674" xmax="-84.729" ymax="42.541" id="myMapExtent"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;esri:SpatialReference wkid="4326"/&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;/esri:Extent&amp;gt;
&amp;nbsp; &amp;lt;/sample:extent&amp;gt;
&amp;nbsp; &amp;lt;esri:ArcGISTiledMapServiceLayer&amp;nbsp; 
&amp;nbsp;&amp;nbsp; url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/&amp;gt;
 &amp;lt;/sample:SampleMap&amp;gt;
 
&amp;lt;/s:Application&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Like I said, not sure if this will help you or not... Good Luck!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:42:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/constrained-map-extent-in-flex/m-p/17529#M369</guid>
      <dc:creator>MattWilliams</dc:creator>
      <dc:date>2021-12-10T20:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Constrained Map Extent in Flex</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/constrained-map-extent-in-flex/m-p/17530#M370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would like this in my Flex Viewer 2.1 too, I actually tried rewriting Roberts implemetation for the SFV 1.3 to the Flex Viewer 2.1. I managed to get rid of all errors, but when I ran the application there wasn't a map at all, all was blank, that's were I gave up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It will need a lot more modifications than changing extent.containsExtent to extent.contains, to apply this to the FlexViewer 2.1 that's for sure &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 12:22:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/constrained-map-extent-in-flex/m-p/17530#M370</guid>
      <dc:creator>MattiasEkström</dc:creator>
      <dc:date>2010-10-28T12:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Constrained Map Extent in Flex</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/constrained-map-extent-in-flex/m-p/17531#M371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Mattias,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I did those changes too... and I am having the same problem as you do... nothing shows up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@Matt Williams: Thanks for your response.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Oct 2010 14:31:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/constrained-map-extent-in-flex/m-p/17531#M371</guid>
      <dc:creator>SandeepTalasila</dc:creator>
      <dc:date>2010-10-28T14:31:51Z</dc:date>
    </item>
  </channel>
</rss>

