Select to view content in your preferred language

2.1RC Legend Hangs On Sub Layer Uncheck (not sure it is related to Legend though)

819
6
11-17-2010 01:25 PM
RyanCoodey
Frequent Contributor
I have a legend toc setup almost just like the ESRI sample using the new legend control in the 2.1 api (which is GREAT btw)... when I check layers on, they seem to pretty much always turn on, but when I check a layer off, a good majority of the time the map does not refresh this data away and the progress bar just hangs at like 80-90%...  I can then just do a little pan on the map and the data loads right in then.

With 2.0 I built my own TOC control very much like this templated legend control... and it had the same behavior... so that is why I don't know if it is the legend control itself, but if something else is going on.

Fiddler never shows an attempt to connect to the ArcGIS REST endpoint either... I was thinking before maybe it was a caching issue and 2.1 would maybe fix this issue, but it didn't.  My application is a WPF XBAP by the way.

An observation I have made: this issue does not ever seem to happen with the first layer that is turned on in the service, but it does with the layers folowing it... especially with layers in group layers.  I can turn the first layer on and off pretty much everytime without this issue. *EDIT* After trying this some more, maybe no so much even the first layer, but if it is the only layer it always works (but a trip to the server map not be needed for that).

Hope that made sense... any ideas?
0 Kudos
6 Replies
DominiqueBroux
Esri Frequent Contributor
I reproduced the issue but it's very unusual and very difficult to reproduce, so very difficult to debug.

What is the map service you are using to be able to reproduce the issue a good majority of the time? (if it's a public service)
0 Kudos
RyanCoodey
Frequent Contributor
Hmm, it happens to me about 80% of the time and throughout my different WPF XBAP applications... but not sure what else to debug into.

I have 8 services in the map.  5 are from our own ArcGIS Server 10.0 SP1 and the other 3 are from ESRI:
                        <esri:ArcGISTiledMapServiceLayer ID="Imagery" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer"  />
                        <esri:ArcGISTiledMapServiceLayer ID="Street" Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer" Visible="False" />
                        <esri:ArcGISTiledMapServiceLayer ID="Topo" Url="http://server.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer" Visible="False" />


Hope that helps a little... thanks a lot for looking into this Dominique!
0 Kudos
RyanCoodey
Frequent Contributor
Hey Dom (or others),

You have any luck testing, reproducing this issue anymore?

This is about the last bug I need to work out before we take our WPF XBAPs into production.  I have tested this with just a regular WPF application (non-XBAP) too, and it seems to happen all the time there also.  Almost happens 100% of the time when turning "off" sub layers.  It seems like it is an issue with the Map control not refreshing, but not real sure how to debug the ESRI controls much more than I have.

Thanks a lot for helping with this!!!

Also, as a side question... Completely understand if you cannot answer this, but might the 2.1 API go final this week or next?  Will wait for that to go final before deploying too.  Thanks!
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Hi Ryan,

I eventually understood where the issue is coming from. It's a caching issue with WPF.
At this time, I can't tell you which version will fix the issue, but we'll let you know.

The workaround can be to disable the client caching by adding 'DisableClientCaching="True"' to your dynamic map service.

Thanks for pointing this issue out.
0 Kudos
RyanCoodey
Frequent Contributor
Cool, that workaround does the trick for now.  Look forward to taking advantage of the cache in the future.  Hope it�??s not too hard for you guys to work out.

Thanks a bunch Dominique for looking into this issue and providing a workaround!!!  It�??s much appreciated!
0 Kudos
RyanCoodey
Frequent Contributor
Looks like the 2.2 beta fixes this... woohoo!  Thanks a lot WPF team!!!
0 Kudos