Open Pioneer Trails Packages
    Preparing search index...

    Props for the FeatureEditor component.

    interface FeatureEditorProps {
        drawingOptions?: DrawingOptions;
        failureNotifierDisplayDuration?: number | false;
        highlightingOptions?: HighlightOptions;
        map?: MapModel;
        modificationOptions?: ModificationOptions;
        onEditingStepChange?: (newEditingStep: EditingStep) => void;
        resolveFormTemplate?: (
            context: FormTemplateContext,
        ) => FormTemplate | undefined;
        selectableLayers?: Layer[];
        selectionOptions?: SelectionOptions;
        showActionBar?: boolean;
        snappableLayers?: Layer[];
        snappingOptions?: SnappingOptions;
        successNotifierDisplayDuration?: number | false;
        templates: FeatureTemplate[];
        writer: FeatureWriter;
        [key: `data-${string}`]: unknown;
    }

    Hierarchy (View Summary)

    Indexable

    • [key: `data-${string}`]: unknown

      Arbitrary data attributes.

      NOTE: The component may use data properties for its own behavior. Make sure not to overwrite required attributes.

    Index

    Properties

    drawingOptions?: DrawingOptions

    Options for drawing new geometries.

    failureNotifierDisplayDuration?: number | false

    Duration in milliseconds to display failure notifications.

    Controls how long error messages are shown to the user. By default, notifiers will never disappear.

    Use false to hide the notification altogether.

    highlightingOptions?: HighlightOptions

    Options for highlighting features during modification.

    map?: MapModel

    The map model to use.

    modificationOptions?: ModificationOptions

    Options for modifying feature geometries.

    onEditingStepChange?: (newEditingStep: EditingStep) => void

    Optional callback invoked when the editing step changes.

    Called whenever the editing workflow transitions between steps (e.g., from drawing to attribute editing, or from attribute editing back to the initial state).

    Use this to track or respond to changes in the editing workflow state.

    resolveFormTemplate?: (context: FormTemplateContext) => FormTemplate | undefined

    Optional function to provide custom form templates for features.

    When specified, this function is called to determine which form template to use when editing an existing feature. If not provided, the first feature template matching the feature's layer ID will be used.

    Type Declaration

    selectableLayers?: Layer[]

    Layers from which features can be selected for editing.

    When not specified, the layer IDs from the feature templates are used to determine which layers are selectable. Only specify layers that contain features you want to allow users to edit.

    selectionOptions?: SelectionOptions

    Options for selecting existing features from layers.

    showActionBar?: boolean

    Whether to show the action bar with undo/redo/finish/reset controls during drawing.

    When false, the action bar is hidden. Only applies to templates with geometry types that support these actions (e.g., Polygon, LineString).

    true
    
    snappableLayers?: Layer[]

    Layers to which drawn geometries will snap.

    Enables snapping to features in these layers during drawing and modification operations. Defaults to selectableLayers if not specified.

    selectableLayers
    
    snappingOptions?: SnappingOptions

    Options for snapping to nearby features during drawing or modification.

    successNotifierDisplayDuration?: number | false

    Duration in milliseconds to display success notifications.

    Controls how long success messages (e.g., "Feature saved") are shown to the user. By default, notifiers will never disappear.

    Use false to hide the notification altogether.

    templates: FeatureTemplate[]

    Feature templates defining the types of features that can be created or edited.

    Each template specifies the geometry type, drawing options, and form configuration for a specific feature type.

    Responsible for persisting changes to your data source.