XYZ Maps Documentation
    Preparing search index...

    The EditorEvent represents an event which takes place in the editor. An event can be triggered by user interaction e.g. tapping on the map, or generated to represent the progress of an asynchronous task.

    Index
    button: number

    This property indicates which button was pressed on the mouse to trigger the event.

    Possible values:

    • 0: Main button pressed, usually the left button or the un-initialized state
    • 2: Secondary button pressed, usually the right button
    0
    
    detail: {
        geometryValidation?: {
            blocked?: boolean;
            coordinateIndex?: number;
            lineStringIndex?: number;
            operation?: "shapeMove" | "shapeAdd" | "polygonDraw";
            polygonIndex?: number;
            reason?: "selfIntersection" | "topologyViolation" | "connectedAreaInvalid";
            valid: boolean;
        };
        index?: number;
        layer?: TileLayer;
        range?: Range;
    }

    optional event detail data depending on the type of the event.

    Type Declaration

    • OptionalgeometryValidation?: {
          blocked?: boolean;
          coordinateIndex?: number;
          lineStringIndex?: number;
          operation?: "shapeMove" | "shapeAdd" | "polygonDraw";
          polygonIndex?: number;
          reason?: "selfIntersection" | "topologyViolation" | "connectedAreaInvalid";
          valid: boolean;
      }

      This property is set when polygon geometry validation rejects an edit operation. The payload includes the affected polygon, line string, and coordinate indices.

    • Optionalindex?: number

      This property is set by the DrawingBoard utility and dispatched when an "onShapeAdd" or "onShapeRemove" event occurs. Index in the coordinate array of the shape being added or removed.

    • Optionallayer?: TileLayer

      the layer the event relates to.

    • Optionalrange?: Range

      This property is set by the RangeSelector utility and dispatched when an "dragStart", "dragMove" or "dragStop" event occurs. The respective Range on in which the event occurred.

    mapX?: number

    Gives the x coordinate relative to the map HTMLElement in pixels. This property is only set when created by user interaction with native mouse/touch/pointer events.

    mapY?: number

    Gives the y coordinate relative to the map HTMLElement in pixels. This property is only set when created by user interaction with native mouse/touch/pointer events.

    nativeEvent?: MouseEvent | TouchEvent | PointerEvent

    The underlying native Mouse-, Pointer- or Touch-event generated by the browser. This property will be null if the Event was not directly generated from a native event.

    target?:
        | Marker
        | Feature
        | Navlink
        | Crossing
        | NavlinkShape
        | Line
        | LineShape
        | Area
        | Place
        | Address
        | AreaShape
        | DrawingShape

    The feature on the map this event relates to. e.g. User clicks/taps on a specific Feature on the map. If the event does not refer to any feature, the property is null.

    timeStamp: number

    This property specifies the time at which the event was created in milliseconds relative to 1970-01-01T00:00:00Z.

    type: string

    The type of the event. Supported events: "tap", "dbltap", "pointerup", "pointerenter", "pointerleave", "featureUnselected", "error", "geometryValidation", "dragStart", "dragStop".