GeoBlazor Pro
layout: pro title: EditorWidget parent: Pro Classes grand_parent: GeoBlazor Pro —
dymaptic.GeoBlazor.Pro
dymaptic.GeoBlazor.Pro.Components.Widgets
EditorWidget Class
This widget provides an out-of-the-box editing experience to help streamline editing within a web application. It automatically recognizes if there are editable feature layers within the map. The layers that are editable will automatically be used by the widget. It is possible to configure how the Editor behaves by setting its layerInfos property. This property takes an array of objects which allows configuring the the editing experience for these layers.
ArcGIS Maps SDK for JavaScript
public class EditorWidget : dymaptic.GeoBlazor.Pro.Components.Widgets.ProWidget
Inheritance System.Object 🡒 Microsoft.AspNetCore.Components.ComponentBase 🡒 dymaptic.GeoBlazor.Core.Components.MapComponent 🡒 dymaptic.GeoBlazor.Core.Components.Widgets.Widget 🡒 ProWidget 🡒 EditorWidget
Properties
EditorWidget.AllowedWorkflows Property
It should be functional. This is how you would specify the field type in a FeatureFormWidget, although currently we aren’t using it because the default auto-types seem to work well in the samples.
public string? AllowedWorkflows { get; set; }
Property Value
Remarks
These workflows are only enabled if the feature service allows these operations. In addition, if wanting to completely remove the ability to select and update, it is necessary to also set attachmentsOnUpdateEnabled: false in layerInfo.attachmentsOnUpdateEnabled. See the example below.
EditorWidget.HeadingLevel Property
Indicates the heading level to use for title of the widget. By default, the title (i.e. “Editor”) is rendered as a level 4 heading (e.g. <h4>Editor</h4>). Depending on the widget’s placement in your app, you may need to adjust this heading for proper semantics. This is important for meeting accessibility standards.
Default Value: 4
public System.Nullable<int> HeadingLevel { get; set; }
Property Value
EditorWidget.Label Property
The widget’s default label.
public string? Label { get; set; }
Property Value
EditorWidget.LabelOptions Property
The unique ID assigned to the widget when the widget is created. If not set by the developer, it will default to the container ID, or if that is not present then it will be automatically generated.
public dymaptic.GeoBlazor.Pro.Components.Widgets.SketchLabelOptions? LabelOptions { get; set; }
Property Value
Remarks
Known Limitation: Sketch labels are currently only supported when working with a SceneView.
EditorWidget.LayerInfos Property
An array of editing configurations for individual layers. It is possible to iterate through the map’s editableLayers and configure these individual layers as needed.
If you have an editable feature layer but do not want the end user to do any type of editing, you can limit this by setting the enabled property to false.
public System.Collections.Generic.HashSet<dymaptic.GeoBlazor.Pro.Components.Widgets.EditorLayerInfo>? LayerInfos { get; set; }
Property Value
System.Collections.Generic.HashSet<EditorLayerInfo>
EditorWidget.SnappingOptions Property
The SnappingOptions for editing. Supports self snapping and feature snapping. The SnappingControls UI is automatically integrated into the Editor widget. Modify the snappingOptions if modifications are needed from what is provided in the default UI.
public dymaptic.GeoBlazor.Pro.Components.Widgets.SnappingOptions? SnappingOptions { get; set; }
Property Value
EditorWidget.SupportingWidgetDefaults Property
This property allows customization of supporting Editor widgets and their default behavior. These widgets include FeatureForm, FeatureTemplates, and the SketchViewModel.
public dymaptic.GeoBlazor.Pro.Components.Widgets.SupportingWidgetDefaults? SupportingWidgetDefaults { get; set; }
Property Value
Remarks
This property is useful for basic overrides of the default widgets. There may be some limitations to what the Editor can do with these overridden properties. For example, the Editor will disable the multipleSelectionEnabled property in Sketch.defaultUpdateOptions no matter what is set within this property.
EditorWidget.TooltipOptions Property
Options to configure the tooltip shown next to the cursor when creating or updating graphics.
public dymaptic.GeoBlazor.Pro.Components.Widgets.SketchTooltipOptions? TooltipOptions { get; set; }
Property Value
EditorWidget.VisibleElements Property
The visible elements that are displayed within the widget. This property provides the ability to turn individual elements of the widget’s display on/off.
public dymaptic.GeoBlazor.Pro.Components.Widgets.EditorWidgetVisibleElements? VisibleElements { get; set; }
Property Value
Methods
EditorWidget.CancelWorkflow() Method
Cancels any active workflow.
public System.Threading.Tasks.Task CancelWorkflow();
Returns
EditorWidget.DeleteFeatureFromWorkflow() Method
This is applicable if there is an active UpdateWorkflow. If so, this method deletes the workflow feature.
public System.Threading.Tasks.Task DeleteFeatureFromWorkflow();
Returns
EditorWidget.GetActiveWorkflow() Method
Retrieves the active Workflow from the widget.
public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Objects.Workflow?> GetActiveWorkflow();
Returns
System.Threading.Tasks.Task<Workflow>
EditorWidget.SetLayerInfos(IReadOnlyCollection) Method
Updates and sets the LayerInfos property.
public System.Threading.Tasks.Task SetLayerInfos(System.Collections.Generic.IReadOnlyCollection<dymaptic.GeoBlazor.Pro.Components.Widgets.EditorLayerInfo> layerInfos);
Parameters
layerInfos
System.Collections.Generic.IReadOnlyCollection<EditorLayerInfo>
Returns
EditorWidget.StartCreateFeaturesWorkflowAtFeatureCreation(CreationInfo) Method
Initiates the CreateFeaturesWorkflow by displaying the panel where feature(s) creation begins. This method takes a CreationInfo object containing the layer(s) and template(s) to use.
public System.Threading.Tasks.Task StartCreateFeaturesWorkflowAtFeatureCreation(dymaptic.GeoBlazor.Pro.Objects.CreationInfo creationInfo);
Parameters
creationInfo
CreationInfo
Returns
EditorWidget.StartCreateFeaturesWorkflowAtFeatureTypeSelection() Method
Initiates the CreateFeaturesWorkflow by displaying the FeatureTemplates panel.
public System.Threading.Tasks.Task StartCreateFeaturesWorkflowAtFeatureTypeSelection();
Returns
EditorWidget.StartUpdateWorkflowAtFeatureEdit(FeatureLayer, Graphic) Method
Starts the UpdateWorkflow at the attribute editing panel.
public System.Threading.Tasks.Task StartUpdateWorkflowAtFeatureEdit(dymaptic.GeoBlazor.Core.Components.Layers.FeatureLayer layer, dymaptic.GeoBlazor.Core.Components.Layers.Graphic feature);
Parameters
layer
dymaptic.GeoBlazor.Core.Components.Layers.FeatureLayer
The layer with the feature to be updated
feature
dymaptic.GeoBlazor.Core.Components.Layers.Graphic
The feature to be updated
Returns
EditorWidget.StartUpdateWorkflowAtFeatureSelection() Method
Starts the UpdateWorkflow using the current selected feature.
public System.Threading.Tasks.Task StartUpdateWorkflowAtFeatureSelection();
Returns
EditorWidget.StartUpdateWorkflowAtMultipleFeatureSelection(IEnumerable) Method
Starts the UpdateWorkflow using the current selected feature.
public System.Threading.Tasks.Task StartUpdateWorkflowAtMultipleFeatureSelection(System.Collections.Generic.IEnumerable<dymaptic.GeoBlazor.Core.Components.Layers.Graphic> candidates);
Parameters
candidates
System.Collections.Generic.IEnumerable<dymaptic.GeoBlazor.Core.Components.Layers.Graphic>
An array of features to be updated. This is only relevant when there are multiple candidates to update.