+ Reply to Thread
Results 1 to 5 of 5

Thread: Setting transparency on sublayers of an ArcGISDynamicMapServiceLayer?

  1. #1

    Join Date
    Mar 2012
    Posts
    1
    Points
    0
    Answers Provided
    0


    0

    Default Setting transparency on sublayers of an ArcGISDynamicMapServiceLayer?

    I am working on a Flex component to allow users to change a layer's transparency. This component gets what layer to use from another component that is a TOC. I want to be able to change the transparency of a sublayer in an ArcGISDynamicMapServiceLayer, but I see that the item type I get is LayerInfo (no alpha...).

    Is this possible at all, or can I only change transparency on the entire map service layer (thus affecting all the sublayers)?

    Any insight would be appreciated!

    (Note: I am using Flex API 2.4).

    Thanks,
    -Luiza
    Last edited by lhdasilva; 03-27-2012 at 06:16 AM.

  2. #2
    Faizan Tayyab
    Join Date
    Nov 2010
    Posts
    168
    Points
    3
    Answers Provided
    4


    0

    Default Re: Setting transparency on sublayers of an ArcGISDynamicMapServiceLayer?

    I think at the moment it only works with the map service itself and not the sublayers.

  3. #3
    Ivan Bespalov
    Join Date
    Apr 2010
    Posts
    329
    Points
    286
    Answers Provided
    48


    0

    Default Re: Setting transparency on sublayers of an ArcGISDynamicMapServiceLayer?

    ihdasilva,

    no, it is not possible. (The only way, if you initialize each sub layer as ArcGISDynamicMapServiceLayer )

    Here is important to understand how is it works.

    1 - ArcGISDynamicMapServiceLayer is container for IMAGE exported from server,
    parameters you set for ArcGISDynamicMapServiceLayer are IMAGE export parameters.
    Not 55 images for 55 sublayers, but 1 image exported form server for 55 sublayers.

    2 - Flex Map is container for all layers:
    static layer (navigation, scalebar, copyright, logo ...),
    map layers (each 1 is something like flex display object / container ))
    The transparency you set for ArcGISDynamicMapServiceLayer is alpha parameter for flex component (for IMAGE - 1 image for 55 sublayers)

    Right?

    Look at this discussion. May be you do not need to change transparency in flex code, but you set layers transparency in mxd file.
    Ivan

    Samples

  4. #4
    Dasa Paddock

    Join Date
    Dec 2009
    Posts
    1,083
    Points
    311
    Answers Provided
    51


    1

    Default Re: Setting transparency on sublayers of an ArcGISDynamicMapServiceLayer?

    You can control the transparency of the sublayers if you're using ArcGIS 10.1 and the 3.0 API.

    See:
    http://resourcesbeta.arcgis.com/en/h...ons.html#alpha
    Dasa Paddock
    Esri Flex Team

  5. #5
    YungKai Chin
    Join Date
    Jul 2011
    Posts
    48
    Points
    0
    Answers Provided
    0


    0

    Default Re: Setting transparency on sublayers of an ArcGISDynamicMapServiceLayer?

    One opinion (if there really is not other way) is to romove the sublayer from the mapservicelayer in code and to bring in the same mapservicelayer again with only the sublayer.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts