Dictating the load order of layers in a Silverlight map

126
1
11-15-2012 03:51 AM
PeterBrough
New Contributor
We are developing a Silverlight mapping application and have a question regarding the programmatic enforcement of a load order for individual layers contained in multiple ArcGIS Server map services into a map hosted in a Silverlight application.

Our application loads service layers into the map's layers collection at start up in a configurable order and then switches on sublayer visibility within each service layer's sublayers collection according to the settings in a database driven TOC. This gives us a degree of control of the layer load order at the non-granular map service level. But ideally, we'd like to to programmatically dictate the load order of the visible sublayers (not merely the higher level service layers) so that we can ensure certain features aren't masked by others - but we can see no obvious way of programmatically enforcing a load order sequence on the sublayers within a service layer or, more importantly, across multiple service layers within a map. We could, of course, amend the layer order in the individual MXDs that underlie the map services but this still doesn't resolve the issue of enforcing a global load order across multiple map services and doesn't allow for any flexibility in the differing load order requirements of separate mapping channels which use common map services. And, then again, we could possibly put all layers for a map into a single MXD rather than spreading them across multiple MXDs, but many of our maps can contain several hundred layers - from past experience, having MXDs containing large numbers of layers has proved problematic.      

The question is, therefore, whether there are any alternative programmatic methods of loading layers contained within map services into the map which would give us more control over the layer load order at the most granular level but allow us to retain the sublayers being split across multiple map services.
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor
The sublayer order is defined at the server side when you publish the service.
Nevertheless from ArcGIS for SL 3.0 and ArcGIS Server 10.1, there is a new possibility to change the layer order by using dynamic layers (if that capability has been turned on at the server side). See sample.
0 Kudos