Select to view content in your preferred language

Editor Class, Command Add and feature type.

912
2
12-14-2011 09:59 AM
YgorThomaz
Emerging Contributor
Hello,


I am using the same object "Editor" in the edition of points and polygons. I have two feature layers (access) differents.

In my XAML code:

[PHP]                   
<Button x:Name="btnInserirAreaImovel" Command="{Binding Add, Source={StaticResource chaveEditorESRI}}" CommandParameter="???" IsEnabled="True" Cursor="Hand" >
  <Image Source="ok.png" Stretch="Fill"/>
</Button>
[/PHP]

What command parameter should I use? I will edit MapPoints and Polygons (two feature layers).


http://help.arcgis.com/en/webapi/silverlight/apiref/api_start.htm
..

(I could not understand how to use what is described in the official text.)

If you are editing a FeatureLayer, the CommandParameter should be the feature type to use if you have feature types, or the template name if you only have templates defined. If you have multiple templates defined for each feature type, you can use an array object[] { featureTypeId, featureTemplateName } as parameter. If no template and/or feature type is specified, the default will be used.

..

Thanks!
0 Kudos
2 Replies
JenniferNery
Esri Regular Contributor
Have you looked at this SDK sample? http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsAutoSave.

<Button Command="{Binding Add}" Content="Add Polygon" Margin="2"                        
                         ToolTipService.ToolTip="Civil Disturbance">
                        <Button.CommandParameter>
                            <sys:Int32>10101</sys:Int32>
                        </Button.CommandParameter>
                    </Button>


The service defines Types (see 10101)
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/FeatureServer...
0 Kudos
YgorThomaz
Emerging Contributor
I found another way to do. Ty!
0 Kudos