+ Reply to Thread
Results 1 to 6 of 6

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
    170
    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
    334
    Points
    306
    Answers Provided
    51


    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,160
    Points
    386
    Answers Provided
    65


    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 and JavaScript Teams

  5. #5
    YungKai Chin
    Join Date
    Jul 2011
    Posts
    64
    Points
    1
    Answers Provided
    1


    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.

  6. #6
    Aaron Barkhurst
    Join Date
    Apr 2010
    Posts
    24
    Points
    5
    Answers Provided
    0


    0

    Default Re: Setting transparency on sublayers of an ArcGISDynamicMapServiceLayer?

    So does the same hold true for the ability to move the sublayers (children) up and down in the TOC and map drawing order? I have set the ability to drag and drop layers in the TOC, the UI allows the ability to move the sublayers, but the map/toc reorder only applies to the parent layers. Is there a way to allow users to reorder the sublayers both in the TOC and map drawing/layering?

+ 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