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

932
5
12-04-2013 12:15 AM
IanBates
New Contributor II
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
0 Kudos
5 Replies
MichaelBranscomb
Esri Frequent Contributor
Hi,

I've reproduced the issue - we'll investigate.

Cheers

Mike
0 Kudos
IanBates
New Contributor II
Hi,

I've reproduced the issue - we'll investigate.

Cheers

Mike


Thanks for looking into this - we have a product release on Monday are you able to supply us with a workaround to this issue quickly?
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

I'll check with the team and get back to you as soon as I can. The source code for the EditorWidget is published on GitHub (https://github.com/Esri/arcgis-toolkit-sl-wpf), which means potentially you could look at the EditorWidget source and make your own fix then rebuild.

Cheers

Mike
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

Is it possible it's just a binding issue? - e.g. string[] versus ObservableCollection<string>

Cheers

Mike
0 Kudos
IanBates
New Contributor II
Thanks for pointing that out. We are now using the Editor class directly instead of the widget so I will retest the issue on Monday
0 Kudos