Skip to main content

Exposed Events

The DAS Report Map Component emits custom feature-select, feature-create, feature-update, and error events to notify your app of key actions and errors. Configure listeners for these events to respond appropriately.

Example Usage

document.querySelector("#das-report-map").addEventListener("feature-select", (event) => {
// event.detail.id - string
// event.detail.geometry - Geometry | null
});

Geometry refers to a standard GeoJSON geometry object.

Feature Select Event

The Feature Select Event is triggered when a user selects an existing feature on the report map.

Event Data

{
"id": "string",
"geometry": "Geometry | null"
}

Feature Create Event

The Feature Create Event is triggered when a user draws and creates a new feature on the report map.

Event Data

{
"id": "string",
"geometry": "Geometry | null"
}

Feature Update Event

The Feature Update Event is triggered when a user edits the geometry of an existing feature on the report map.

Event Data

{
"id": "string",
"geometry": "Geometry | null"
}

Error Event

The Error Event is triggered when any error occurs within the DAS Report Map Component. This allows you to log or handle errors as needed.

Event Data

{
"code": "string",
"error": "string"
}
  • code — error code identifying the type of issue (e.g., "404", "500", "INVALID_INPUT").
  • error — detailed error message.