<?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: maxAllowableOffset on operationalLayers in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600948#M17949</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; What are you trying to do here?...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Feb 2012 17:04:41 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2012-02-06T17:04:41Z</dc:date>
    <item>
      <title>maxAllowableOffset on operationalLayers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600947#M17948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am working with flex viewer 2.1.&amp;nbsp; I am trying to recalculate the maxAllowableOffset for each feature layer that I have listed as an operational layer on the zoom_end event and I'm having an issue.&amp;nbsp; I can set the maxAllowableOffset for the feature layer on load, just not on the zoom_end event.&amp;nbsp; I know it has to be something simple.&amp;nbsp; Can anyone point me in the right direction? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private function map_zoomEndHandler(event:ZoomEvent):void&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureLayer.maxAllowableOffset = getMaxAllowableOffset();&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; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;private function getMaxAllowableOffset(pixelTolerance:int = 1):int&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return Math.floor(map.extent.width / map.width) * pixelTolerance;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 16:46:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600947#M17948</guid>
      <dc:creator>DonCaviness</dc:creator>
      <dc:date>2012-02-06T16:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: maxAllowableOffset on operationalLayers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600948#M17949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; What are you trying to do here?...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 17:04:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600948#M17949</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2012-02-06T17:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: maxAllowableOffset on operationalLayers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600949#M17950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to recalculate the maxAllowableOffset for each feature layer that it is loaded as an operational layer when the map zoom_end event is fired.&amp;nbsp; Currently I am on able to recalculate the maxAllowableOffset for the last feature layer that is added to the map.&amp;nbsp; I'm needing to be able to recalculate any of the feature layers that are added.&amp;nbsp; I have around 10 feature layers that are being added to the map.&amp;nbsp; The functions that I posted have been placed in the MapManager.mxml file.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 17:09:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600949#M17950</guid>
      <dc:creator>DonCaviness</dc:creator>
      <dc:date>2012-02-06T17:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: maxAllowableOffset on operationalLayers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600950#M17951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; OK, I still don't understand what you are attempting here and for what reason. The maxAllowableOffset is a attribute that allow generalizing of a layer when it is queried, so you are trying to recalculate it at the end of every map zoom for what reason?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The maximum allowable offset used for generalizing geometries returned by the Query operation.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;The units are the same as the returned features&lt;/STRONG&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Only applicable for layers that are not editable.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So based on the info above why would recalculating it each time the map zooms do you any good?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 17:19:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600950#M17951</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2012-02-06T17:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: maxAllowableOffset on operationalLayers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600951#M17952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What this does is considerably speeds up the draw time of complex polygons.&amp;nbsp; At a statewide level the polygons will be generalized on the fly, removing vertices allowing the features to be drawn faster yet maintaining the integrity of the polygon.&amp;nbsp; If the maxAllowableOffset is not recalculated on map zoom, then you will end up with extremely jagged polygons.&amp;nbsp; An example of this can be found here &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/samples/index.html#/Generalized_data/01nq0000006s000000/"&gt;http://help.arcgis.com/en/webapi/flex/samples/index.html#/Generalized_data/01nq0000006s000000/&lt;/A&gt;&lt;SPAN&gt;. I'm just needing to apply the zoom_end eventListener to all of the layers listed in the Operational Layers not just the last one added to the map.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 17:27:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600951#M17952</guid>
      <dc:creator>DonCaviness</dc:creator>
      <dc:date>2012-02-06T17:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: maxAllowableOffset on operationalLayers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600952#M17953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; OK. Then try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;private function map_zoomEndHandler(event:ZoomEvent):void
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; var opLayers:Array = m_configData.opLayers;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i:int = 0; i &amp;lt; opLayers.length; i++){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.getLayer(opLayers&lt;I&gt;.label).maxAllowableOffset = getMaxAllowableOffset();
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;IMG src="http://gis.calhouncounty.org/FlexViewer2.5/Answer.jpg" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:46:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600952#M17953</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T01:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: maxAllowableOffset on operationalLayers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600953#M17954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Robert.&amp;nbsp; That seems like it should work but it throws a compile error at this line: &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;map.getLayer(opLayers&lt;I&gt;.label).maxAllowableOffset = getMaxAllowableOffset();&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the error it gives: Access of possibly undefined property maxAllowableOffset through a reference with static type com.esri.ags.layers:Layer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 18:14:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600953#M17954</guid>
      <dc:creator>DonCaviness</dc:creator>
      <dc:date>2012-02-06T18:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: maxAllowableOffset on operationalLayers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600954#M17955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; OK, then this should work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;(map.getLayer(opLayers&lt;I&gt;.label) as FeatureLayer).maxAllowableOffset = getMaxAllowableOffset();&lt;/I&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://gis.calhouncounty.org/FlexViewer2.5/Answer.jpg"&gt;&lt;IMG src="http://gis.calhouncounty.org/FlexViewer2.5/Answer.jpg" /&gt;&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 18:18:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600954#M17955</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2012-02-06T18:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: maxAllowableOffset on operationalLayers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600955#M17956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Robert! That did the trick.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Feb 2012 18:32:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/maxallowableoffset-on-operationallayers/m-p/600955#M17956</guid>
      <dc:creator>DonCaviness</dc:creator>
      <dc:date>2012-02-06T18:32:52Z</dc:date>
    </item>
  </channel>
</rss>

