<?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 Adding layers to editor widget on the fly, missing symbols for single (first) layer in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-layers-to-editor-widget-on-the-fly-missing/m-p/116132#M2899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using the editor widget to edit feature services that the user can add at run time. Each time a user adds or subtracts a feature layer from the map, I am setting the EditorWidget.LayerIDs property accordingly. Oddly, there seems to be a bug in the TemplatePicker portion of the widget where when the control switches from 0 to 1 layers, the symbols are missing from the template. When you add a second layer, symbols from both layers show up. Adding more layers the control exhibits expected behavior, as well as when you remove layers. If this is fixed in 2.1, I can wait until release for it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Nov 2010 13:20:24 GMT</pubDate>
    <dc:creator>DanielWalton</dc:creator>
    <dc:date>2010-11-18T13:20:24Z</dc:date>
    <item>
      <title>Adding layers to editor widget on the fly, missing symbols for single (first) layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-layers-to-editor-widget-on-the-fly-missing/m-p/116132#M2899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using the editor widget to edit feature services that the user can add at run time. Each time a user adds or subtracts a feature layer from the map, I am setting the EditorWidget.LayerIDs property accordingly. Oddly, there seems to be a bug in the TemplatePicker portion of the widget where when the control switches from 0 to 1 layers, the symbols are missing from the template. When you add a second layer, symbols from both layers show up. Adding more layers the control exhibits expected behavior, as well as when you remove layers. If this is fixed in 2.1, I can wait until release for it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Nov 2010 13:20:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-layers-to-editor-widget-on-the-fly-missing/m-p/116132#M2899</guid>
      <dc:creator>DanielWalton</dc:creator>
      <dc:date>2010-11-18T13:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: Adding layers to editor widget on the fly, missing symbols for single (first) lay</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-layers-to-editor-widget-on-the-fly-missing/m-p/116133#M2900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for reporting this. We will try to get it fixed in future releases.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Nov 2010 15:18:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-layers-to-editor-widget-on-the-fly-missing/m-p/116133#M2900</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2010-11-18T15:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Adding layers to editor widget on the fly, missing symbols for single (first) lay</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-layers-to-editor-widget-on-the-fly-missing/m-p/116134#M2901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For the time-being, you can do the following as workaround:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ensure that the layer you are adding to the map is already initialized.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp; private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; FeatureLayer l = new FeatureLayer() { ID = "Point", Url = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer/0" };
&amp;nbsp;&amp;nbsp; l.Initialized += l_Initialized;
&amp;nbsp;&amp;nbsp; l.Initialize();&amp;nbsp; 
&amp;nbsp; }

&amp;nbsp; private void l_Initialized(object sender, System.EventArgs e)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; this.MyMap.Layers.Add(sender as Layer);
&amp;nbsp;&amp;nbsp; //this.MyEditorWidget.LayerIDs = new string[] { (sender as Layer).ID };
&amp;nbsp; }
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, note that setting LayerIDs is optional. It is not necessary when you already bind the EditorWidget or TemplatePicker's Map property to your map and there are no editable FeatureLayers you are trying to exclude.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This should be sufficient (include GeometryService for Cut/Reshape/Union/Add with AutoComplete):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;esri:EditorWidget x:Name="MyEditorWidget" Map="{Binding ElementName=MyMap}" /&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:50:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/adding-layers-to-editor-widget-on-the-fly-missing/m-p/116134#M2901</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T06:50:47Z</dc:date>
    </item>
  </channel>
</rss>

