@open-formulieren/types
    Preparing search index...

    Interface MapComponentSchema

    Custom Formio component type.

    interface MapComponentSchema {
        clearOnHide?: boolean;
        conditional?: OFConditionalOptions;
        defaultValue?: null | MapValue;
        defaultZoom?: null | 2 | 1 | 3 | 4 | 8 | 5 | 6 | 10 | 7 | 12 | 11 | 9 | 13;
        description?: string;
        errors?: Object & ComponentErrors<"required">;
        hidden?: boolean;
        id: string;
        initialCenter?: { lat?: number; lng?: number };
        interactions?: { marker: boolean; polygon: boolean; polyline: boolean };
        isSensitiveData?: boolean;
        key: string;
        label: string;
        openForms?: { translations: ComponentTranslations<TK> };
        overlays?: {
            label: string;
            layers: string[];
            type: "wms" | "wfs";
            url: string;
            uuid: string;
        }[];
        registration?: { attribute: string };
        showInEmail?: boolean;
        showInPDF?: boolean;
        showInSummary?: boolean;
        tileLayerIdentifier?: string;
        tileLayerUrl?: string;
        tooltip?: string;
        translatedErrors?: ErrorTranslations<"required">;
        type: "map";
        useConfigDefaultMapSettings?: boolean;
        validate?: OFValidateOptions<"required" | "plugins">;
        validateOn?: "blur" | "change";
    }

    Hierarchy

    • Omit<MapInputSchema, "hideLabel" | "disabled" | "placeholder">
      • MapComponentSchema
    Index

    Properties

    clearOnHide?: boolean

    If the value of this field should be cleared when it is conditionally hidden.

    conditional?: OFConditionalOptions

    Dynamically determines if the component is visible/available.

    defaultValue?: null | MapValue

    Only specified to be able to type the submission data value. We do not see a use case for pre-selecting a particular location on a map component, as the SDK asks the user for their location anyway.

    defaultZoom?: null | 2 | 1 | 3 | 4 | 8 | 5 | 6 | 10 | 7 | 12 | 11 | 9 | 13

    Default zoom level, limited by Leaflet and the available tile service zoom levels.

    Leaflet zoom level is a range of 1-20, but the Dutch tile service only supports up to level 13.

    description?: string
    errors?: Object & ComponentErrors<"required">

    Allows customizable errors to be displayed for each component when an error occurs. This is an object with the following keys: required min max minLength maxLength invalid_email invalid_date pattern custom

    An object (keys listed above), values are the strings you wish to display. Each string has the {{ field }} to use within the string. Example. {"required": "{{ field }} is required. Try again."}

    hidden?: boolean

    Determines if the component should be within the form, but not visible. This can be overridden with the conditionals.

    id: string
    initialCenter?: { lat?: number; lng?: number }

    Coordinates to center the map on initially.

    interactions?: { marker: boolean; polygon: boolean; polyline: boolean }

    Interactions users can use when working with the map component.

    These interaction options are based on the options available in leaflet draw: https://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html#drawoptions

    isSensitiveData?: boolean
    key: string

    The data key for this component (how the data is stored in the database, referenced as API key in docs).

    label: string

    The HTML label to give this component.

    openForms?: { translations: ComponentTranslations<TK> }
    overlays?: {
        label: string;
        layers: string[];
        type: "wms" | "wfs";
        url: string;
        uuid: string;
    }[]

    Overlays to display on the map component.

    Overlays are used to provide additional visual information to the map component. They can be used to show heat-maps, highlight certain points of interest, or provide additional context. WMS and WFS tile layers provide access to lower-level layers, to specify which parts of the entire data-collection should be shown in the map.

    registration?: { attribute: string }
    showInEmail?: boolean
    showInPDF?: boolean
    showInSummary?: boolean
    tileLayerIdentifier?: string

    The tile layer identifier used for the map component tile layer.

    tileLayerUrl?: string

    The url belonging to the connected tile layer object, determined by tileLayerIdentifier.

    This value should not be definable by admins, but should be fetched from the related tile layer object. This happens when fetching the component from the backend.

    tooltip?: string
    translatedErrors?: ErrorTranslations<"required">
    type: "map"
    useConfigDefaultMapSettings?: boolean

    If true, the backend must apply the globally configured defaults to a particular map instance. This results in populating defaultZoom and initialCenter, so for the SDK this property has no effect.

    validate?: OFValidateOptions<"required" | "plugins">
    validateOn?: "blur" | "change"

    This will perform the validation on either "change" or "blur" of the input element.