Select to view content in your preferred language

Question regarding transparency

902
8
Jump to solution
03-12-2013 11:16 AM
AdamNelson
Deactivated User
I apologize if this has already been covered in these forums, but I can't find it specifically. I'm new to the ArcGIS Viewer for Flex (I've just used it a few times for a class), so I'm having difficulty implementing something. Here's the process that I've performed that led to my issue:

1 - In ArcMap, I created a solid, polygonal layer and gave it 35% transparency.
2 - From ArcMap, I published the MXD as a WMS through ArcGIS Server.
3 - Using the ArcGIS Viewer for Flex, I created an app that calls this WMS.
4 - When I open the app in a browser, the original transparency in the polygon feature is gone, and I have no way of modifying it as a user.

I would very much like to have a user be able to set the transparency of this layer (possibly through a slider), but I will settle for a way to render the layer 35% transparent when the service is called by a user, even if that means the user can't control its transparency. Is there a way I can do provision either of these scenarios using ArcGIS Viewer for Flex?

Thanks in advance.
Adam
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
AnthonyGiles
Honored Contributor
Adam,

In your main config .xml where you add the layer into the viewer you can set an alpha value on the layer tag, to set its transparency:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_tag_overview/01m30000000p...

If you use the layer list widget to manage the ability of turning the layer on/off this has an option in the sub menu for changing the transparency in the viewer:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_List_widget/01m3000000350...

Regards

Anthony

View solution in original post

0 Kudos
8 Replies
AnthonyGiles
Honored Contributor
Adam,

In your main config .xml where you add the layer into the viewer you can set an alpha value on the layer tag, to set its transparency:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_tag_overview/01m30000000p...

If you use the layer list widget to manage the ability of turning the layer on/off this has an option in the sub menu for changing the transparency in the viewer:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_List_widget/01m3000000350...

Regards

Anthony
0 Kudos
AdamNelson
Deactivated User
Adam,

In your main config .xml where you add the layer into the viewer you can set an alpha value on the layer tag, to set its transparency:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_tag_overview/01m30000000p...

If you use the layer list widget to manage the ability of turning the layer on/off this has an option in the sub menu for changing the transparency in the viewer:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_List_widget/01m3000000350...

Regards

Anthony


Thanks, Anthony. I will definitely give that a shot. I'll let you know how it turns out.

Adam
0 Kudos
AdamNelson
Deactivated User
Adam,

In your main config .xml where you add the layer into the viewer you can set an alpha value on the layer tag, to set its transparency:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_tag_overview/01m30000000p...

If you use the layer list widget to manage the ability of turning the layer on/off this has an option in the sub menu for changing the transparency in the viewer:

http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Layer_List_widget/01m3000000350...

Regards

Anthony


I went the Layer List widget method and it worked! Thanks for the tip. Now I wish that it could break it out by actual layer, as opposed to the slider adjusting the transparency for all of the polygonal layers that were published form ArcMap at once. Ah well.

I also would have liked there to be a widget that allowed users to modify the symbology (colors, icons, etc.) for the vector layers, but that's not an absolute requirement.

Thanks again!

Adam
0 Kudos
AnthonyGiles
Honored Contributor
Adam,

To achieve that you would have to use dynamic layers on feature services:

http://resources.arcgis.com/en/help/flex-api/samples/index.html#/UniqueValueRenderer/01nq00000071000...

Regards

Anthony
0 Kudos
AdamNelson
Deactivated User
Adam,

To achieve that you would have to use dynamic layers on feature services:

http://resources.arcgis.com/en/help/flex-api/samples/index.html#/UniqueValueRenderer/01nq00000071000...

Regards

Anthony


Just to be clear, are you saying that when I publish the MXD from ArcMap, I need to activate Dynamic Layers? Or is this accomplished another way? Also - some of my layers are not published as WFS, they are just WMS. Does that mean that dynamic layers won't work for them?

Thanks again for the quick response.

Adam
0 Kudos
AnthonyGiles
Honored Contributor
Adam,

Read more about dynamic layers here:

http://resources.arcgis.com/en/help/main/10.1/index.html#//0154000004zv000000

They are not utilised through the WMS feed from a service, they utilise the REST endpoints.

In your flex application are all the layers you are using coming from your own server? If so your application would preform a lot better if you used the REST endpoints not the WMS.

Regards

Anthony
0 Kudos
AdamNelson
Deactivated User
Adam,

Read more about dynamic layers here:

http://resources.arcgis.com/en/help/main/10.1/index.html#//0154000004zv000000

They are not utilised through the WMS feed from a service, they utilise the REST endpoints.

In your flex application are all the layers you are using coming from your own server? If so your application would preform a lot better if you used the REST endpoints not the WMS.

Regards

Anthony


OK - I've enabled Dynamic Workspaces in ArcGIS Server Manager, by checking the box for "Allow per requests modification of layer order and symbology." I've also created a Shapefile workspace ID that pointed to the absolute path on my server PC where the shapefiles reside. However, I still don't have control over the layers when I go to the site. I'm sure I'm just missing something, but the help file doesn't tell me what it is (or at least I can't find it.)
0 Kudos
AnthonyGiles
Honored Contributor
Adam,

I think there may be a slight misunderstanding here, when you said you would like a widget that allows the user to change symbology etc, I was commenting that you would need to use dynamic layers to do this not a wms layer. You would then still have to build a widget to do it. I posted the link to the example just so show what can be done.

Sorry if I have caused any confusion

Regards

Anthony
0 Kudos