Layer on/off while mainiting current selections

1519
4
05-22-2013 11:12 AM
GaryWine
New Contributor
I have writers block on this one - so deep I cannot even provide any code to start with.

I have a feature class that contains fields for:

UNITS:  Emmergency Service Vehicles
YEAR:    Year of a call the unit went on (4 years are covered)

In this feature class there are multiple calls for each unit during each of the years.

I have been asked to create a map which a user can select a unit, or multiple units, with a checkbox, and then in a different layer list select the year they wish to view, or multiple years.

Example: I have UNIT A, UNIT B and UNIT C turned on (checked) in one list, I then turn on (check) 2010 and 2011 in another list and points populate the map that those units went on during those years.

I have the feeling this might be a basic solution, but I cannot find an example. I am still a novice at Silverlight so this is not coming easy. Any recommendations would be extremely appreciated.

Thank you
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
I have writers block on this one - so deep I cannot even provide any code to start with.

I have a feature class that contains fields for:

UNITS:  Emmergency Service Vehicles
YEAR:    Year of a call the unit went on (4 years are covered)

In this feature class there are multiple calls for each unit during each of the years.

I have been asked to create a map which a user can select a unit, or multiple units, with a checkbox, and then in a different layer list select the year they wish to view, or multiple years.

Example: I have UNIT A, UNIT B and UNIT C turned on (checked) in one list, I then turn on (check) 2010 and 2011 in another list and points populate the map that those units went on during those years.

I have the feeling this might be a basic solution, but I cannot find an example. I am still a novice at Silverlight so this is not coming easy. Any recommendations would be extremely appreciated.

Thank you


The closest sample I know is this one: http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#AttributeQuery
It allows to select a state from a combobox and display the feature accordingly.
0 Kudos
GaryWine
New Contributor
I appreciate the response Dominique, unfortunately that will not resolve my dilemma. I have to use a layer list that will always be displayed for the user, allowing them to turn on/off whatever they need. If I created a layer for each units calls by year I would have a layerlist that was entirely too large for the user to look at.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I appreciate the response Dominique, unfortunately that will not resolve my dilemma. I have to use a layer list that will always be displayed for the user, allowing them to turn on/off whatever they need. If I created a layer for each units calls by year I would have a layerlist that was entirely too large for the user to look at.


Sorry I don't get the dilemna.
Is it that instead of selecting just one year in a combox, you want to select a set of years?
In this case we can build the where clause by a concatenation depending on the checked years: YEAR='1980' OR YEAR='1985'....

Did I miss something?
0 Kudos
GaryWine
New Contributor
OK, I understand how to apply the "WHERE", but I am not seeing how I am going to apply this to work with 2 separate layer lists.

Layer List A = Units, Layer List B = Years

User selects, via checkbox, UNIT A, UNIT B and UNIT C, then the user goes to LayerList B and selects Year 2010, the map populates with the appropriate selected data. Then the user decides they want to remove UNIT C, so they unselect it from Layer List A, and is now viewing data for the remaining units in the selected year.

This is how it has been requested to set the map up, so the user can see all their choices in front of them without having to use a drop-down or type what they are looking for in a search box.
0 Kudos