Select to view content in your preferred language

Show State Demographic sample

1522
0
11-04-2012 03:05 PM
GarrettMoeller
Deactivated User
Working on getting the 'Show State Demographic' sample working.
It will be drawing from a mapservice for this test - later, I would like to get the same thing with list items.

I have a rest service that I would like to switch out with the sample's Spatial Data Server (SDS) content.
What I have done so far is:

In RetrieveStateDataCommand.cs
-Put in OutFields related to my rest service field like:  query.OutFields.Add("Excellent");
-Changed the source of the service to my rest service:     QueryTask queryTask = new QueryTask("http://MyMapservice");

In ResultUserControl.xaml.cs
-       // Retrieve and remove the state name, if available
            string stateName = null;
            if (data.ContainsKey("MyFieldName"))
            {
                stateName = data["Condition"] as string;
                data.Remove("MyFieldName");
            }
           
            // Update chart title with state name
            DemographicDataChart.Title = string.Format("MyFieldName - {0}", stateName);


What am I missing here?
I have attached an image of the error
[ATTACH=CONFIG]19000[/ATTACH]
-
0 Kudos
0 Replies