Select to view content in your preferred language

LabelOptions refreshing when zooming in?

613
2
06-18-2013 06:26 PM
JoeHewitt
Regular Contributor
This is my dynamic LabelOptions:
<esri:LabelOptions 

alpha="{alphaTransparency.value}"
color="{color.selectedColor}"
fontFamily="{fontFamily.selectedItem}"
 fontSize="{fontSize.value}"
fontStyle="{fontStyle.selectedItem}"
fontWeight="{fontWeight.selectedItem}"
haloAlpha="{haloAlpha.value}"
 haloColor="{haloColor.selectedColor}"
haloSize="{haloSize.value}"
/>



Which gets set by a user from my form I present in a widget: e.g

<s:FormItem label="Alpha:">

<s:HSlider id="alphaTransparency"
 width="100%"
 change="setLabelOptions()"
 liveDragging="true"
maximum="1"
minimum="0"
stepSize="0.1"
 value="1"/>
</s:FormItem>
      
<s:FormItem label="Colour:">

<mx:ColorPicker id="color"
change="setLabelOptions()"
selectedColor="0x333333"/>
</s:FormItem>


when I zoom in it grabs all of the LabelOptions again, meaning my form is only useful for one layer, as changing the form options for a second layer will change it for my first layer too when I zoom.

I would like to be able to set the LabelOptions for one layer and make them final, and choose a second layer LabelOptions which will not alter my first?

Can anyone think of any solutions?
- A dynamic form?
-Zooming only changing the labelsize and not all of labeloptions?
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Joe,

   This sample shows how label options are applied to one specific layer:

http://resources.arcgis.com/en/help/flex-api/samples/01nq/01nq00000080000000.htm
0 Kudos
JoeHewitt
Regular Contributor
Joe,

   This sample shows how label options are applied to one specific layer:

http://resources.arcgis.com/en/help/flex-api/samples/01nq/01nq00000080000000.htm


That sample is a good example of what I'm trying to avoid. As you can see when the user changes the label placement options from the drop down list, it alters the label placement options for all three fields. I'm hoping I could use the same drop down list to change one fields label options and then, display a second layer/field and change the label options again with the same form, but not alter my first layer/field label options.

like an instanced form I guesse?
0 Kudos