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.
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

Constructors

EditorWidget() Constructor

Parameterless constructor for use as a Razor Component.

public EditorWidget();

EditorWidget(string, Nullable, string, string, SketchLabelOptions, IReadOnlyList, MapView, Nullable, SnappingOptions, SupportingWidgetDefaults, SketchTooltipOptions, SketchValueOptions, EditorViewModel, Nullable, EditorWidgetVisibleElements, string) Constructor

Constructor for use in C# code. Use named parameters (e.g., item1: value1, item2: value2) to set properties in any order.

public EditorWidget(string? containerId=null, System.Nullable<int> headingLevel=null, string? icon=null, string? label=null, dymaptic.GeoBlazor.Pro.Options.SketchLabelOptions? labelOptions=null, System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.EditorLayerInfo>? layerInfos=null, dymaptic.GeoBlazor.Core.Components.Views.MapView? mapView=null, System.Nullable<dymaptic.GeoBlazor.Core.Enums.OverlayPosition> position=null, dymaptic.GeoBlazor.Core.Components.SnappingOptions? snappingOptions=null, dymaptic.GeoBlazor.Pro.Components.SupportingWidgetDefaults? supportingWidgetDefaults=null, dymaptic.GeoBlazor.Pro.Options.SketchTooltipOptions? tooltipOptions=null, dymaptic.GeoBlazor.Pro.Options.SketchValueOptions? valueOptions=null, dymaptic.GeoBlazor.Pro.Components.EditorViewModel? viewModel=null, System.Nullable<bool> visible=null, dymaptic.GeoBlazor.Pro.Components.EditorWidgetVisibleElements? visibleElements=null, string? widgetId=null);

Parameters

containerId System.String

The id of an external HTML Element (div). If provided, the widget will be placed inside that element, instead of on the map.

headingLevel System.Nullable<System.Int32>

Indicates the heading level to use for title of the widget.
default 4
ArcGIS Maps SDK for JavaScript

icon System.String

Icon which represents the widget.
default “pencil”
ArcGIS Maps SDK for JavaScript

label System.String

The widget’s default label.
ArcGIS Maps SDK for JavaScript

labelOptions SketchLabelOptions

Options to configure the sketch labels shown next to each segment of the geometry being created or updated.
ArcGIS Maps SDK for JavaScript

layerInfos System.Collections.Generic.IReadOnlyList<EditorLayerInfo>

An array of editing configurations for individual layers.
ArcGIS Maps SDK for JavaScript

mapView dymaptic.GeoBlazor.Core.Components.Views.MapView

If the Widget is defined outside of the MapView, this link is required to connect them together.

position System.Nullable<dymaptic.GeoBlazor.Core.Enums.OverlayPosition>

The position of the widget in relation to the map view.

snappingOptions dymaptic.GeoBlazor.Core.Components.SnappingOptions

The SnappingOptions for editing.
ArcGIS Maps SDK for JavaScript

supportingWidgetDefaults SupportingWidgetDefaults

This property allows customization of supporting Editor widgets and their default behavior.
ArcGIS Maps SDK for JavaScript

tooltipOptions SketchTooltipOptions

Options to configure the tooltip shown next to the cursor when creating or updating graphics.
ArcGIS Maps SDK for JavaScript

valueOptions SketchValueOptions

Options to configure how values are displayed and input when creating or updating graphics.
ArcGIS Maps SDK for JavaScript

viewModel EditorViewModel

The view model for this widget.
ArcGIS Maps SDK for JavaScript

visible System.Nullable<System.Boolean>

Indicates whether the widget is visible.
default true
ArcGIS Maps SDK for JavaScript

visibleElements EditorWidgetVisibleElements

The visible elements that are displayed within the widget.
ArcGIS Maps SDK for JavaScript

widgetId System.String

The unique ID assigned to the widget when the widget is created.
ArcGIS Maps SDK for JavaScript

Properties

EditorWidget.ActiveWorkflow Property

A property indicating the current active workflow.
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Core.Interfaces.IEditorWidgetActiveWorkflow? ActiveWorkflow { get; set; }

Property Value

dymaptic.GeoBlazor.Core.Interfaces.IEditorWidgetActiveWorkflow

EditorWidget.HasSketchCreateListener Property

Used in JavaScript layer to determine if the event listener is registered.

public bool HasSketchCreateListener { get; }

Property Value

System.Boolean

EditorWidget.HasSketchUpdateListener Property

Used in JavaScript layer to determine if the event listener is registered.

public bool HasSketchUpdateListener { get; }

Property Value

System.Boolean

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

System.Nullable<System.Int32>

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.Options.SketchLabelOptions? LabelOptions { get; set; }

Property Value

SketchLabelOptions

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.
ArcGIS Maps SDK for JavaScript

public System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.EditorLayerInfo>? LayerInfos { get; set; }

Property Value

System.Collections.Generic.IReadOnlyList<EditorLayerInfo>

EditorWidget.OnSketchCreate Property

Event Listener for SketchCreate.

public Microsoft.AspNetCore.Components.EventCallback<dymaptic.GeoBlazor.Pro.Events.EditorSketchCreateEvent> OnSketchCreate { get; set; }

Property Value

Microsoft.AspNetCore.Components.EventCallback<EditorSketchCreateEvent>

EditorWidget.OnSketchUpdate Property

Event Listener for SketchUpdate.

public Microsoft.AspNetCore.Components.EventCallback<dymaptic.GeoBlazor.Pro.Events.EditorSketchUpdateEvent> OnSketchUpdate { get; set; }

Property Value

Microsoft.AspNetCore.Components.EventCallback<EditorSketchUpdateEvent>

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.Core.Components.SnappingOptions? SnappingOptions { get; set; }

Property Value

dymaptic.GeoBlazor.Core.Components.SnappingOptions

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.SupportingWidgetDefaults? SupportingWidgetDefaults { get; set; }

Property Value

SupportingWidgetDefaults

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.Options.SketchTooltipOptions? TooltipOptions { get; set; }

Property Value

SketchTooltipOptions

EditorWidget.Type Property

The type of widget

public override dymaptic.GeoBlazor.Core.Enums.WidgetType Type { get; }

Property Value

dymaptic.GeoBlazor.Core.Enums.WidgetType

EditorWidget.ValueOptions Property

Options to configure how values are displayed and input when creating or updating graphics.
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Pro.Options.SketchValueOptions? ValueOptions { get; set; }

Property Value

SketchValueOptions

EditorWidget.ViewModel Property

The view model for this widget.
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Pro.Components.EditorViewModel? ViewModel { get; set; }

Property Value

EditorViewModel

EditorWidget.VisibleElements Property

The visible elements that are displayed within the widget.
ArcGIS Maps SDK for JavaScript

public dymaptic.GeoBlazor.Pro.Components.EditorWidgetVisibleElements? VisibleElements { get; set; }

Property Value

EditorWidgetVisibleElements

Methods

EditorWidget.AddToLayerInfos(EditorLayerInfo[]) Method

Asynchronously adds elements to the LayerInfos property.

public System.Threading.Tasks.Task AddToLayerInfos(params dymaptic.GeoBlazor.Pro.Components.EditorLayerInfo[] values);

Parameters

values EditorLayerInfo[]

The elements to add.

Returns

System.Threading.Tasks.Task

EditorWidget.CancelWorkflow() Method

Cancels any active workflow.

public System.Threading.Tasks.Task CancelWorkflow();

Returns

System.Threading.Tasks.Task

EditorWidget.DeleteAssociationFromWorkflow() Method

This is applicable if there is an active UpdateWorkflow.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task DeleteAssociationFromWorkflow();

Returns

System.Threading.Tasks.Task

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

System.Threading.Tasks.Task

EditorWidget.GetActiveWorkflow() Method

Retrieves the active dymaptic.GeoBlazor.Core.Interfaces.IEditorWidgetActiveWorkflow from the widget.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Interfaces.IEditorWidgetActiveWorkflow?> GetActiveWorkflow();

Returns

System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Interfaces.IEditorWidgetActiveWorkflow>

EditorWidget.GetHeadingLevel() Method

Asynchronously retrieve the current value of the HeadingLevel property.

public System.Threading.Tasks.Task<System.Nullable<int>> GetHeadingLevel();

Returns

System.Threading.Tasks.Task<System.Nullable<System.Int32>>

EditorWidget.GetLabelOptions() Method

Asynchronously retrieve the current value of the LabelOptions property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Options.SketchLabelOptions?> GetLabelOptions();

Returns

System.Threading.Tasks.Task<SketchLabelOptions>

EditorWidget.GetLayerInfos() Method

Asynchronously retrieve the current value of the LayerInfos property.

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.EditorLayerInfo>?> GetLayerInfos();

Returns

System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<EditorLayerInfo>>

EditorWidget.GetSnappingOptions() Method

Asynchronously retrieve the current value of the SnappingOptions property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.SnappingOptions?> GetSnappingOptions();

Returns

System.Threading.Tasks.Task<dymaptic.GeoBlazor.Core.Components.SnappingOptions>

EditorWidget.GetSupportingWidgetDefaults() Method

Asynchronously retrieve the current value of the SupportingWidgetDefaults property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Components.SupportingWidgetDefaults?> GetSupportingWidgetDefaults();

Returns

System.Threading.Tasks.Task<SupportingWidgetDefaults>

EditorWidget.GetTooltipOptions() Method

Asynchronously retrieve the current value of the TooltipOptions property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Options.SketchTooltipOptions?> GetTooltipOptions();

Returns

System.Threading.Tasks.Task<SketchTooltipOptions>

EditorWidget.GetValueOptions() Method

Asynchronously retrieve the current value of the ValueOptions property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Options.SketchValueOptions?> GetValueOptions();

Returns

System.Threading.Tasks.Task<SketchValueOptions>

EditorWidget.GetViewModel() Method

Asynchronously retrieve the current value of the ViewModel property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Components.EditorViewModel?> GetViewModel();

Returns

System.Threading.Tasks.Task<EditorViewModel>

EditorWidget.GetVisibleElements() Method

Asynchronously retrieve the current value of the VisibleElements property.

public System.Threading.Tasks.Task<dymaptic.GeoBlazor.Pro.Components.EditorWidgetVisibleElements?> GetVisibleElements();

Returns

System.Threading.Tasks.Task<EditorWidgetVisibleElements>

EditorWidget.OnJsSketchCreate(IJSStreamReference) Method

JavaScript-Invokable Method for internal use only.

public System.Threading.Tasks.Task OnJsSketchCreate(Microsoft.JSInterop.IJSStreamReference jsStreamRef);

Parameters

jsStreamRef Microsoft.JSInterop.IJSStreamReference

Returns

System.Threading.Tasks.Task

EditorWidget.OnJsSketchUpdate(IJSStreamReference) Method

JavaScript-Invokable Method for internal use only.

public System.Threading.Tasks.Task OnJsSketchUpdate(Microsoft.JSInterop.IJSStreamReference jsStreamRef);

Parameters

jsStreamRef Microsoft.JSInterop.IJSStreamReference

Returns

System.Threading.Tasks.Task

EditorWidget.RegisterChildComponent(MapComponent) Method

Called from dymaptic.GeoBlazor.Core.Components.MapComponent.OnInitializedAsync to “Register” the current component with its parent.

public override System.Threading.Tasks.Task RegisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);

Parameters

child dymaptic.GeoBlazor.Core.Components.MapComponent

The calling, child component to register

Returns

System.Threading.Tasks.Task

Exceptions

dymaptic.GeoBlazor.Core.Exceptions.InvalidChildElementException
Throws if the current child is not a valid sub-component to the parent.

Remarks

This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method. If you see no other way to register a child component, please open an issue on GitHub.

EditorWidget.RemoveFromLayerInfos(EditorLayerInfo[]) Method

Asynchronously remove an element from the LayerInfos property.

public System.Threading.Tasks.Task RemoveFromLayerInfos(params dymaptic.GeoBlazor.Pro.Components.EditorLayerInfo[] values);

Parameters

values EditorLayerInfo[]

The elements to remove.

Returns

System.Threading.Tasks.Task

EditorWidget.SetHeadingLevel(Nullable) Method

Asynchronously set the value of the HeadingLevel property after render.

public System.Threading.Tasks.Task SetHeadingLevel(System.Nullable<int> value);

Parameters

value System.Nullable<System.Int32>

The value to set.

Returns

System.Threading.Tasks.Task

EditorWidget.SetLabelOptions(SketchLabelOptions) Method

Asynchronously set the value of the LabelOptions property after render.

public System.Threading.Tasks.Task SetLabelOptions(dymaptic.GeoBlazor.Pro.Options.SketchLabelOptions? value);

Parameters

value SketchLabelOptions

The value to set.

Returns

System.Threading.Tasks.Task

EditorWidget.SetLayerInfos(IReadOnlyList) Method

Updates and sets the LayerInfos property.

public System.Threading.Tasks.Task SetLayerInfos(System.Collections.Generic.IReadOnlyList<dymaptic.GeoBlazor.Pro.Components.EditorLayerInfo> layerInfos);

Parameters

layerInfos System.Collections.Generic.IReadOnlyList<EditorLayerInfo>

Returns

System.Threading.Tasks.Task

EditorWidget.SetSnappingOptions(SnappingOptions) Method

Asynchronously set the value of the SnappingOptions property after render.

public System.Threading.Tasks.Task SetSnappingOptions(dymaptic.GeoBlazor.Core.Components.SnappingOptions? value);

Parameters

value dymaptic.GeoBlazor.Core.Components.SnappingOptions

The value to set.

Returns

System.Threading.Tasks.Task

EditorWidget.SetSupportingWidgetDefaults(SupportingWidgetDefaults) Method

Asynchronously set the value of the SupportingWidgetDefaults property after render.

public System.Threading.Tasks.Task SetSupportingWidgetDefaults(dymaptic.GeoBlazor.Pro.Components.SupportingWidgetDefaults? value);

Parameters

value SupportingWidgetDefaults

The value to set.

Returns

System.Threading.Tasks.Task

EditorWidget.SetTooltipOptions(SketchTooltipOptions) Method

Asynchronously set the value of the TooltipOptions property after render.

public System.Threading.Tasks.Task SetTooltipOptions(dymaptic.GeoBlazor.Pro.Options.SketchTooltipOptions? value);

Parameters

value SketchTooltipOptions

The value to set.

Returns

System.Threading.Tasks.Task

EditorWidget.SetValueOptions(SketchValueOptions) Method

Asynchronously set the value of the ValueOptions property after render.

public System.Threading.Tasks.Task SetValueOptions(dymaptic.GeoBlazor.Pro.Options.SketchValueOptions? value);

Parameters

value SketchValueOptions

The value to set.

Returns

System.Threading.Tasks.Task

EditorWidget.SetViewModel(EditorViewModel) Method

Asynchronously set the value of the ViewModel property after render.

public System.Threading.Tasks.Task SetViewModel(dymaptic.GeoBlazor.Pro.Components.EditorViewModel? value);

Parameters

value EditorViewModel

The value to set.

Returns

System.Threading.Tasks.Task

EditorWidget.SetVisibleElements(EditorWidgetVisibleElements) Method

Asynchronously set the value of the VisibleElements property after render.

public System.Threading.Tasks.Task SetVisibleElements(dymaptic.GeoBlazor.Pro.Components.EditorWidgetVisibleElements? value);

Parameters

value EditorWidgetVisibleElements

The value to set.

Returns

System.Threading.Tasks.Task

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.Model.CreationInfo creationInfo);

Parameters

creationInfo CreationInfo

Returns

System.Threading.Tasks.Task

EditorWidget.StartCreateFeaturesWorkflowAtFeatureEdit(Graphic) Method

This method starts the CreateFeaturesWorkflow at the “creating-features” step with the provided feature.
param params.initialFeature The initial feature used when you begin creating features.
ArcGIS Maps SDK for JavaScript

public System.Threading.Tasks.Task StartCreateFeaturesWorkflowAtFeatureEdit(dymaptic.GeoBlazor.Core.Components.Graphic initialFeature);

Parameters

initialFeature dymaptic.GeoBlazor.Core.Components.Graphic

The initial feature used when you begin creating features.
ArcGIS Maps SDK for JavaScript

Returns

System.Threading.Tasks.Task

EditorWidget.StartCreateFeaturesWorkflowAtFeatureTypeSelection() Method

Initiates the CreateFeaturesWorkflow by displaying the FeatureTemplates panel.

public System.Threading.Tasks.Task StartCreateFeaturesWorkflowAtFeatureTypeSelection();

Returns

System.Threading.Tasks.Task

EditorWidget.StartUpdateWorkflowAtFeatureEdit(Graphic) Method

Starts the UpdateWorkflow at the attribute editing panel.

public System.Threading.Tasks.Task StartUpdateWorkflowAtFeatureEdit(dymaptic.GeoBlazor.Core.Components.Graphic feature);

Parameters

feature dymaptic.GeoBlazor.Core.Components.Graphic

The feature to be updated

Returns

System.Threading.Tasks.Task

EditorWidget.StartUpdateWorkflowAtFeatureSelection() Method

Starts the UpdateWorkflow using the current selected feature.

public System.Threading.Tasks.Task StartUpdateWorkflowAtFeatureSelection();

Returns

System.Threading.Tasks.Task

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.Graphic> candidates);

Parameters

candidates System.Collections.Generic.IEnumerable<dymaptic.GeoBlazor.Core.Components.Graphic>

An array of features to be updated. This is only relevant when there are multiple candidates to update.

Returns

System.Threading.Tasks.Task

EditorWidget.UnregisterChildComponent(MapComponent) Method

Undoes the “Registration” of a child with its parent.

public override System.Threading.Tasks.Task UnregisterChildComponent(dymaptic.GeoBlazor.Core.Components.MapComponent child);

Parameters

child dymaptic.GeoBlazor.Core.Components.MapComponent

The child to unregister

Returns

System.Threading.Tasks.Task

Remarks

This method is an implementation detail and should not be called directly by consumers. In future versions, this may be changed to an internal method.

EditorWidget.ValidateRequiredChildren() Method

When a dymaptic.GeoBlazor.Core.Components.Views.MapView is prepared to render, this will check to make sure that all properties with the dymaptic.GeoBlazor.Core.Attributes.RequiredPropertyAttribute are provided.

public override void ValidateRequiredChildren();

Implements ValidateRequiredChildren()

Exceptions

dymaptic.GeoBlazor.Core.Exceptions.MissingRequiredChildElementException
The consumer needs to provide the missing child component

dymaptic.GeoBlazor.Core.Exceptions.MissingRequiredOptionsChildElementException
The consumer needs to provide ONE of the options of child components

EditorWidget.ValidateRequiredGeneratedChildren() Method

Validates source-generated child components.

public override void ValidateRequiredGeneratedChildren();

Implements ValidateRequiredGeneratedChildren()