ian.bates@aecom.com

How to connect Editor widget to local feature layer in group layer

Discussion created by ian.bates@aecom.com on Dec 4, 2013
Latest reply on Dec 13, 2013 by ian.bates@aecom.com
Hi

I am using the WPF runtime sdk (10.2) and creating a ArcGISLocalFeatureLayer as follows:

            ArcGISLocalFeatureLayer arcGISLocalFeatureLayer = new ArcGISLocalFeatureLayer
            {
                Service = localFeatureService,
                ID = layerId,
                LayerName = layerName,
                DisableClientCaching = true,
                OutFields = new OutFields() { "*" },
                Editable = true,
                AutoSave = false,
                ValidateEdits = true,
                Mode= FeatureLayer.QueryMode.Snapshot
            };

Later I connect the Editor Widget by setting the LayerIDs via the VM binding where layerIds is a string array of the ids of my layer as defined above.

EditLayerIds = new ObservableCollection<string>(layerIds);

and in the xaml:

  <esri:EditorWidget x:Name="MyEditorWidget"
Map="{Binding ElementName=myMap}"
              Width="300"
  AutoSelect="False"                                    
  ShowAttributesOnAdd="True" 
  LayerIDs="{Binding EditLayerIds}"
  GeometryServiceUrl="{Binding GeometryServiceUrl}"     />

However making the feature layers child layers of a Group Layer prevents the EditorWidget initializing. However all is fine if the Feature layers are placed directly as a map layer.

The editable feature layers are otherwise displayed normally when hosted withing the Group Layer.

Is there something more I need to do to connect the EditorWidget to a feature layer within a group layer? I tried
{Group LayerId}/{Feature LayerId} as the layerid - but that makes no difference. Alternatively not setting (binding) the LayerIDs (which is supposed to connect to all feature layers) also does not work.

Regards,

Ian

Outcomes