Select to view content in your preferred language

Can the maxAllowableOffset parameter be changed for an existing layer?

780
1
02-22-2011 08:13 PM
StephenLead
Honored Contributor
The documentation at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/featurelayer.htm shows the maxAllowableOffset property as an option under esri.layers.FeatureLayer(url, options?)

In all the example, this property is set when the new object is created. My question is whether the maxAllowableOffset property can be changed after the featureLayer has been created.

Specifically, I wish to recalculate the value when the zoom level changes - I'm having mixed results trying to do so.

Thanks for any advice,
Steve
0 Kudos
1 Reply
StephenLead
Honored Contributor
A colleague found the answer for me - there is a method on the Layer class called setMaxAllowableOffset.

Calling this from the onZoomEnd function did what I needed - hope this helps someone in the future.
0 Kudos