@maplibre/maplibre-gl-directions - v0.10.1
    Preparing search index...

    Interface MapMouseEvent

    MapMouseEvent is the event type for mouse-related map events.

    // The `click` event is an example of a `MapMouseEvent`.
    // Set up an event listener on the map.
    map.on('click', (e) => {
    // The event object (e) contains information like the
    // coordinates of the point on the map that was clicked.
    console.log('A click event has occurred at ' + e.lngLat);
    });
    interface MapMouseEvent {
        _defaultPrevented: boolean;
        lngLat: LngLat;
        originalEvent: MouseEvent;
        point: Point;
        target: Map$1;
        type:
            | "mousedown"
            | "mouseup"
            | "click"
            | "dblclick"
            | "mousemove"
            | "mouseover"
            | "mouseenter"
            | "mouseleave"
            | "mouseout"
            | "contextmenu";
        get defaultPrevented(): boolean;
        preventDefault(): void;
    }

    Hierarchy

    • MapLibreEvent<MouseEvent>
      • MapMouseEvent
    Index
    _defaultPrevented: boolean
    lngLat: LngLat

    The geographic location on the map of the mouse cursor.

    originalEvent: MouseEvent

    The DOM event which caused the map event.

    point: Point

    The pixel coordinates of the mouse cursor, relative to the map and measured from the top left corner.

    target: Map$1

    The Map object that fired the event.

    type:
        | "mousedown"
        | "mouseup"
        | "click"
        | "dblclick"
        | "mousemove"
        | "mouseover"
        | "mouseenter"
        | "mouseleave"
        | "mouseout"
        | "contextmenu"

    The event type

    • get defaultPrevented(): boolean

      true if preventDefault has been called.

      Returns boolean

    • Prevents subsequent default processing of the event by the map.

      Calling this method will prevent the following default map behaviors:

      • On mousedown events, the behavior of DragPanHandler
      • On mousedown events, the behavior of DragRotateHandler
      • On mousedown events, the behavior of BoxZoomHandler
      • On dblclick events, the behavior of DoubleClickZoomHandler

      Returns void