Group layers and the Flex viewer

4321
18
11-10-2010 11:33 PM
RaymondBlack
New Contributor
Hi,
I have a map service with more than 30 layers grouped into several categories.  Some of these groups also have sub-groups i.e. the hierarchy contains several levels.  It appears that the Flex viewer does not honour the visibility settings of the parent (group) layer.  For example if I have a group layer called Biodiversity and have several scale dependent children of this layer, whenever I zoom in, the child layers switch on automatically even if the parent (group) layer is switched off.  It seems as if the flex viewer only looks at the visibility parameter of the individual layers - not at the visibility parameters of the entire hierarchy.  This is completely counter-intuitive and indeed counter-productive since the viewer is spending inordinate amounts of time drawing layers that are not required.  Needless to say it also generates a lot of confusion among users.  Does anyone know how to correct this behaviour?  I'm assuming it's a bug with the flex map component in that it doesn't traverse the layer tree to discover the visibility parameters of parent layers?

Note: All the grouping and default visibility in this example is set in the .mxd.

Thanks,

Raymond Black
Tags (2)
0 Kudos
18 Replies
DavidMarley
Occasional Contributor II
Kiran - Thanks for posting that fix.  It worked for me as well - awesome!

One annoyance still with the layer list control and the "More..." section of the MapSwitcher is that they do not stay in synch.  So if you change layer visibility in the layer list widget, the map updates correctly, but then if you go to "More..." that layer you just checked on (or off) is not set the same under there. I suppose the best approach here is to use one of the two controls, but not both.

Also, I can confirm that the legend widget was not working (was not showing any layers) until I upgraded my ArcGIS Server 10 server to SP1. 

Regarding the legend widget, the point made by Mehul Choksey about the use of the ArcGIS.com legend service did not seem to work for me.  My service is publically accessible - via a reverse proxy - and my app can access ArcGIS.com, at least as far as I know. What exactly is meant by "my app can access ArcGIS.com"? Is there any way to test/verify this?  What is the URL for this legend service running on ArcGIS.com?  Can I verify somehow that my app is accessing that?
0 Kudos
DavidMarley
Occasional Contributor II
OK, found part of the answer regarding this ArcGIS.com legend service that's used for pre-10 SP1 services.  Here is the URL:

http://orthogonal.esri.com/restlegends/

You can enter your URL on the page and then see the legend generated.  You can also include the URL of your service in the URL to the ESRI service:
http://orthogonal.esri.com/restlegends/?soapUrl=http%3A%2F%2Fsampleserver1.arcgisonline.com%2FArcGIS...

Still not clear to me how or why this is not working in conjunction with the new legend widget in my case. (in other words, why my pre 10 SP1 service was not working in my app).
0 Kudos
MehulChoksey
Esri Contributor
Could you capture HTTP request/response using firebug/httpfox or fiddler to see whats going on behind  the scene?
0 Kudos
DavidMarley
Occasional Contributor II
Thanks for checking in again Mehul. I have since tried the Legend Widget with a service running from a 9.3 SP1 server and it works fine.  The day I was having problems it was with a version 10 (no SP) service - that was the one that did not seem to be getting the legend thumbnails from the ArcGIS.com legend service.  Unfortunately now I have upgraded my AGS 10 test server to SP1 so I have no way to test/confirm.  Maybe the problem that day was just an anomaly.
0 Kudos
tongkimongki
New Contributor
Hi..

To masmisth (and everybody that knows).. u said "Thanks. I applied Service Pack 1 and now the dynamic map layers are showing up."..
which service pack di u refer to ? desktop ?arcgis server ?

thanks
0 Kudos
DavidMarley
Occasional Contributor II
SP1 for ArcGIS Server 10.
0 Kudos
EmilieLandois
New Contributor
Hello,

OK so concerning the legend widget problem there is the SP1

But, concerning the problem with the multiple group layers�?� and if I am using the flex Viewer compiled release�?� do you know an issue?

Thanks in adance
0 Kudos
MarkSmith1
Occasional Contributor
Robert,

Have you incorporated Kiran's fix into your TOC widget by any chance?

Thanks,
Mark
0 Kudos
DerekHunter
New Contributor
Has anyone seen their LayerList widget move inadvertently to the left whenever it is placed in the upper right area of the window?  When I place it in any of the other 3 corners it stays put.
0 Kudos