Hierarchy (View Summary)

Constructors

  • Parameters

    • Optionaloptions: {
          auto?: boolean;
          collapsed?: boolean;
          draggable?: boolean;
          element?: HTMLElement;
          format?: string;
          icon?: string;
          render?: Function;
          target?: string;
          thematics?: any[];
      }

      options

      • Optionalauto?: boolean

        specify if control add some stuff auto

      • Optionalcollapsed?: boolean

        specify if control is collapsed (true) or not (false)

      • Optionaldraggable?: boolean

        specify if control is draggable (true) or not (false)

      • Optionalelement?: HTMLElement

        specify the DOM element to append the control

      • Optionalformat?: string

        specify the format for export (default: "geojson")

      • Optionalicon?: string

        specify the icon for point entry (default: base64 encoded SVG)

      • Optionalrender?: Function

        specify the render function

      • Optionaltarget?: string

        specify the target element to append the control

      • Optionalthematics?: any[]

        specify the list of thematics

    Returns Reporting

    The Reporting control is a custom OpenLayers control that allows users to report issues or provide feedback on the map. It provides a user interface for inputting details about the report, including the location, description, and thematic category of the issue.

    reporting:sending

    reporting:opened

    var reporting = new ol.control.Reporting();
    map.addControl(reporting);

Properties

auto: undefined | boolean

{Boolean} specify if control add some stuff auto

collapsed: undefined | boolean

{Boolean} specify if control is collapsed (true) or not (false)

container: HTMLElement
data: any

{Object} raw data

description: any
disposed: boolean

The object has already been disposed.

draggable: undefined | boolean

{Boolean} specify if control is draggable (true) or not (false)

element: HTMLElement
eventsListeners: undefined | any[]

{Array} specify some events listener

iocDrawing: undefined | DrawingActionByDefaut
iocForm: undefined | FormActionByDefaut
iocInput: undefined | InputActionByDefaut
iocService: undefined | ServiceActionByDefaut
listable: boolean
listenerKeys: EventsKey[]
on: ObjectOnSignature<EventsKey>
once: ObjectOnSignature<EventsKey>
options:
    | undefined
    | {
        auto: boolean;
        collapsed: boolean;
        draggable: boolean;
        thematics: string[];
    }
step: any
stepContainer:
    | undefined
    | {
        action: null;
        container: null;
        footer: boolean;
        header: boolean;
        name: string;
        next: number;
        prev: number;
    }[]
uid: undefined | number
un: ObjectOnSignature<void>

Methods

  • Parameters

    • key: string

      Key name.

    • listener: Listener

      Listener.

    Returns void

  • Parameters

    • type: string

      Type.

    • listener: Listener

      Listener.

    Returns void

  • Protected

    Apply any properties from another object without triggering events.

    Parameters

    • source: BaseObject

      The source object.

    Returns void

  • Increases the revision counter and dispatches a 'change' event.

    Returns void

  • Dispatches an event and calls all listeners listening for events of this type. The event parameter can either be a string or an Object with a type property.

    Parameters

    • event: string | BaseEvent

      Event object.

    Returns undefined | boolean

    false if anyone called preventDefault on the event object or if any of the listeners returned false.

  • Clean up.

    Returns void

  • Protected

    Extension point for disposable objects.

    Returns void

  • Gets a value.

    Parameters

    • key: string

      Key name.

    Returns any

    Value.

  • Get a list of object property names.

    Returns string[]

    List of property names.

  • Get the listeners for a specified event type. Listeners are returned in the order that they will be called in.

    Parameters

    • type: string

      Type.

    Returns undefined | Listener[]

    Listeners.

  • Get the map associated with this control.

    Returns null | Map

    Map.

  • Get an object of all property names and values.

    Returns { [x: string]: any }

    Object.

  • Get an object of all property names and values.

    Returns null | { [x: string]: any }

    Object.

  • Get the version number for this object. Each time the object is modified, its version number will be incremented.

    Returns number

    Revision.

  • Parameters

    • Optionaltype: string

      Type. If not provided, true will be returned if this event target has any listeners.

    Returns boolean

    Has listeners.

  • Returns boolean

    The object has properties.

  • Move to the next step in the reporting process. This method checks if there is a next step available.

    Returns void

    This method is used to navigate to the next step in the reporting process. It retrieves the next step from the stepContainer array based on the current step index. If a next step exists (indicated by a valid index), it retrieves the action associated with the current step, clears its data, and disables it. The data from the current action is merged into the reporting data object.

  • Parameters

    • key: string

      Key name.

    • oldValue: any

      Old value.

    Returns void

  • Protected

    Parameters

    • type: string | string[]

      Type.

    • listener: (arg0: Event | BaseEvent) => unknown

      Listener.

    Returns EventsKey | EventsKey[]

    Event key.

  • Protected

    Parameters

    • type: string | string[]

      Type.

    • listener: (arg0: Event | BaseEvent) => unknown

      Listener.

    Returns EventsKey | EventsKey[]

    Event key.

  • Move to the previous step in the reporting process. This method checks if there is a previous step available. If there is a previous step, it clears the current action's data and sets the step to the previous one.

    Returns void

    This method is used to navigate back to the previous step in the reporting process. It retrieves the previous step from the stepContainer array based on the current step index. If a previous step exists (indicated by a valid index), it clears the current action's data and sets the step to the previous one. The current action's data is cleared to ensure that any unsaved changes are discarded. This method is typically called when the user wants to go back to the previous step in the reporting process, allowing them to review or modify their input before proceeding. It is useful for scenarios where users may need to correct or change their input before finalizing their report. If the current step does not have a previous step (indicated by prev being -1), the method does nothing, effectively preventing navigation to a non-existent step. This ensures that the reporting process remains linear and prevents users from navigating to steps that are not part of the defined workflow.

  • Parameters

    • key: string

      Key name.

    • listener: Listener

      Listener.

    Returns void

  • Parameters

    • type: string

      Type.

    • listener: Listener

      Listener.

    Returns void

  • Renders the control.

    Parameters

    • mapEvent: MapEvent

      Map event.

    Returns void

  • Sets a value.

    Parameters

    • key: string

      Key name.

    • value: any

      Value.

    • Optionalsilent: boolean

      Update without triggering an event.

    Returns void

  • Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).

    Parameters

    • values: { [x: string]: any }

      Values.

    • Optionalsilent: boolean

      Update without triggering an event.

    Returns void

  • Set the current step of the reporting process.

    Parameters

    • num: any

      The step number to set.

    Returns void

    This method sets the current step of the reporting process. It updates the visibility of the step containers, activates the corresponding IoC action, and updates the reporting title and footer display. It is typically called when the user navigates to a different step in the reporting process, such as moving from the input step to the form step or the send step.

  • This function is used to set a target element for the control. It has no effect if it is called after the control has been added to the map (i.e. after setMap is called on the control). If no target is set in the options passed to the control constructor and if setTarget is not called then the control is added to the map's overlay container.

    Parameters

    • target: string | HTMLElement

      Target.

    Returns void

  • Protected

    Unlisten for a certain type of event.

    Parameters

    • type: string | string[]

      Type.

    • listener: (arg0: Event | BaseEvent) => unknown

      Listener.

    Returns void

  • Unsets a property.

    Parameters

    • key: string

      Key name.

    • Optionalsilent: boolean

      Unset without triggering an event.

    Returns void

Events

OPENED_REPORTING_EVENT: undefined | string

event triggered when the reporting panel is opened reporting:opened

"reporting:opened"

This event is dispatched when the reporting panel is opened. It indicates that the reporting process has started and the user can begin inputting data. This event can be used to perform additional actions when the reporting panel is opened, such as initializing the input fields or updating the UI to reflect the reporting state.

SEND_REPORTING_EVENT: undefined | string

event triggered at the end of the reporting process reporting:sending

"reporting:sending"

This event is dispatched when the reporting data is successfully sent. It contains the reporting data that was sent. This event can be used to perform additional actions after the reporting data is sent, such as updating the UI or notifying other components.