Select to view content in your preferred language

Silverlight Cache Problems

923
6
11-01-2010 08:04 AM
AndyWright
Frequent Contributor
I am in the process of converting a huge Flex API application over to Silverlight.  I've noticed some very weird behavior in Silverlight when it comes to our map caches, and was hoping someone could shed some light on it for me.

It seems that the Silverlight API is ignoring scale thresholds on the caches.  As I zoom out to smaller and smaller scales the browser locks up for an extended period of time.  Once it is freed up I can see features from a cache on the map that should not be drawing at that scale.  So I am assuming that the browser lock up is occurring because it is drawing a bunch of features where it shouldn't be.  That is absolutely bizarre because the cached tiles at those scales do not have those features in them, so it appears as if the Silverlight app is drawing tiles from larger scales on top of the tiles for the scale the map is actually at.

Has anyone else seen this behavior or know how to get around it?  At first I thought it was because we weren't using SnapToLevels on the map.  I set that to true and the problem is still occurring.  Thanks in advance for any help on this ...

Andy
0 Kudos
6 Replies
dotMorten_esri
Esri Notable Contributor
Silverlight allows you to zoom out further than the tiles are cached at (Flex doesn't). This usually works great, but if your cache doesn't have low-resolution scale levels cached, it can end up loading a large amounts of tiles. I suggest you set the MaximumResolution property on the map or the layer to that of the lowest resolution tile level.
0 Kudos
AndyWright
Frequent Contributor
Morten,

Thanks for the quick reply, but that didn't work.  Actually, many of our caches do not have the same Maximum Resolution anyway.  They all start at 1:282 scale (Resolution: 0.0746126492252985), but the maximum resolution varies.  Our basemap caches end at 1:4622324.434309 scale (Resolution: 1222.99245256249), but our "operational layer" caches usually end around 1:577790.554289 scale (Resolution: 152.874056570411) - they do vary though. 

I'm still a little confused as to why Silverlight would want to generate tiles for a cache that doesn't have that particular LOD defined in its cache definition.  We have our caches set to generate tiles on demand, but it should only generate those tiles for the scales at which the cache has been defined.  Am I missing something here, or is Silverlight overriding the map service cache definition?  Are you saying that we should pre-generate tiles for the larger resolution LODs even if they are blank?
0 Kudos
DeminHu
Deactivated User
I have the same problem, for me it seems: the cache I built with ArcGIS 10, has the problem, the problem built with ArcGIS 9.3.1, it was fine. I wonder if it is beacuse the cache created in 10 with compact storage format.

Any help on this problem will be appreciated.
0 Kudos
AndyWright
Frequent Contributor
All of our caches have been converted to the compact cache format as well.  Seems like a major bug to me.  It would be a crying shame if we had to go back to the old cache format because of this.  We love the efficiency we've gained with the compact caches.  Morten, do you see this same behavior in your lab?
0 Kudos
AndyWright
Frequent Contributor
I went ahead and generated tiles for my operational layer caches at the smaller scale LODs that exactly match the same LODs of my basemap caches.  We didn't generate tiles at these LODs before because we didn't want to display any data in those caches at those scales.  So now there are a bunch of LODs that have blank tiles at some of the smaller scale levels for the operational layer caches.  That seems to have fixed the problem we were seeing in our Silverlight app.  I guess since Silverlight has something to work with at those scales, a blank tile, it doesn't try to do its drawing things in between or beyond scale levels stuff. 

I'm sure this is a new "feature" in ArcGIS 10, but it is very confusing to those of us that were used to the way it worked in 9.3.1.  This seems like a valid workaround though and it's not too much trouble to implement.
0 Kudos
DeminHu
Deactivated User
My experiences is that:   need a few times to rebuild caches using  Update Titles and Recreate Empty Titles.    After I did a few times, it seems improved.

I don't  know why  there were so many empty titles first time.
0 Kudos