Select to view content in your preferred language

How to turn off a feature layer on print widget

1736
4
Jump to solution
08-20-2013 12:46 PM
weeyeo
by
Emerging Contributor
I need to turn off a feature layer with label name for "parcelline" from config.xml when print widget is opened or print button is clicked.  Not sure how to call LayerName so can set LayerName.visible=false on print widget.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
wee y,

   That would depend, the layer named "parcelline" is it a sublayer of a map service or is that the name of the whole map service? Basically you need to get the 'map' object and use getLayer to get the Map Service (layer) based on the Map Services id and then if parcelline is the name of a layer in that map service then you need to set the visibleLayers property for the ArcGISDynamicMapServiceLayer (i.e. remove the id number that represents your parcelline from the  visibleLayers ilist).

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
wee y,

   That would depend, the layer named "parcelline" is it a sublayer of a map service or is that the name of the whole map service? Basically you need to get the 'map' object and use getLayer to get the Map Service (layer) based on the Map Services id and then if parcelline is the name of a layer in that map service then you need to set the visibleLayers property for the ArcGISDynamicMapServiceLayer (i.e. remove the id number that represents your parcelline from the  visibleLayers ilist).
0 Kudos
weeyeo
by
Emerging Contributor
Thank you.
0 Kudos
HeatherGonzago
Esri Contributor
I'm guessing the reason you are asking for this is because of the bug logged with printing secured featurelayers from a secured custom print task not working correctly? This problem is not specific to Flex. We've done some testing though and have determined that the problem occurs only in 10.1. I don't know if 10.2 is an option for you at this time, if so this would take care of it.

Not sure if this helps you, but wanted to let you know.
0 Kudos
weeyeo
by
Emerging Contributor
You are right Heather.  Because of the BUG and I have find a workaround.  Just keep me update if 10.2 will solve the problem.  Thank you.
0 Kudos