Interface MapComponentSchema

Custom Formio component type.

Hierarchy

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

Properties

clearOnHide?: boolean

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

conditional?: ConditionalOptions

Determines when this component should be added to the form for both processing and input.

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.

Todo

Do not add the default value to the builder.

defaultZoom?: null | 2 | 1 | 3 | 4 | 8 | 5 | 6 | 10 | 7 | 12 | 9 | 11 | 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.

Todo

Make property required, which requires a data migration.

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.

Type declaration

  • Optional lat?: number
  • Optional lng?: number

Todo

Make property required, which requires a data migration.

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

Type declaration

  • marker: boolean
  • polygon: boolean
  • polyline: boolean
isSensitiveData?: boolean
key: string
label: string
openForms?: {
    translations: ComponentTranslations<TranslatableKeys>;
}

Type declaration

registration?: {
    attribute: string;
}

Type declaration

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

Todo

Make property required, which requires a data migration.

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

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

Generated using TypeDoc