<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Binding aplication defrined data in a layer in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/binding-aplication-defrined-data-in-a-layer/m-p/43662#M1185</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ali&amp;amp; Christopher Thank you very much&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Aug 2010 11:29:05 GMT</pubDate>
    <dc:creator>surjithu</dc:creator>
    <dc:date>2010-08-20T11:29:05Z</dc:date>
    <item>
      <title>Binding aplication defrined data in a layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/binding-aplication-defrined-data-in-a-layer/m-p/43659#M1182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I see that in the samples given data like city name population are retrieved through the function in the sdk and binds it to the layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to know is there a method to display application defined data in the layers above the map?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to retrieve some information from the application's database and display them on top of the map, for example suppose if I just want to display number of hospitals in each city, how can I do that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using Silverlight sdk version 2.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Surjith&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Aug 2010 08:03:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/binding-aplication-defrined-data-in-a-layer/m-p/43659#M1182</guid>
      <dc:creator>surjithu</dc:creator>
      <dc:date>2010-08-11T08:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Binding aplication defrined data in a layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/binding-aplication-defrined-data-in-a-layer/m-p/43660#M1183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can add an attribute to the attribute collection of your layer when the graphic collection of your layer changes, i.e. assuming that you've already populated your application specific data in a class, say Cities, use the "CollectionChanged" event handler of "Graphics" in your leyer and add appropriate attribute to each graphic with the value you're retrieving from your class. That would be something similar to the following code snippet:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private void Graphics_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Graphic graphic = e.NewItems[0] as Graphic;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.Attributes.Add("NumberOfHospitals", Cities.NumberOfHospitals);
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:40:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/binding-aplication-defrined-data-in-a-layer/m-p/43660#M1183</guid>
      <dc:creator>AliMirzabeigi</dc:creator>
      <dc:date>2021-12-10T21:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Binding aplication defrined data in a layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/binding-aplication-defrined-data-in-a-layer/m-p/43661#M1184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are getting a set of hospitals and cities, then it sounds like you are need to make an aggregation of the data that is being loaded. I am assuming that your using a feature layer and that it loads all hostipals and the city that they belong to. assuming also that you don't want to make any additional request to the server to build your sub-set of data. on UpdateCompleted you can use a Linq query to build a Dictionary&amp;lt;string,int&amp;gt; your Key would be "City" your int would be "Count" you can add entries into the dictionary. I am not sure if you intend on showing all results at one time or just one at a time. If you intended on using binding you might want to make a class to hold the data instead. List&amp;lt;HospitalsByCity&amp;gt; where class is defined &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private class HospitalByCity&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; string City, //create dependancy property&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int Count //create dependancy property&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Aug 2010 16:44:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/binding-aplication-defrined-data-in-a-layer/m-p/43661#M1184</guid>
      <dc:creator>ChristopherHill</dc:creator>
      <dc:date>2010-08-12T16:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: Binding aplication defrined data in a layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/binding-aplication-defrined-data-in-a-layer/m-p/43662#M1185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ali&amp;amp; Christopher Thank you very much&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 11:29:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/binding-aplication-defrined-data-in-a-layer/m-p/43662#M1185</guid>
      <dc:creator>surjithu</dc:creator>
      <dc:date>2010-08-20T11:29:05Z</dc:date>
    </item>
  </channel>
</rss>

