Maps SDK for Web


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


defaultPrevented: Boolean

true if preventDefault has been called.

lngLat: Maps.LngLat

The geographic location on the map of the mouse cursor.

originalEvent: Unknown

The DOM event which caused the map event.

point: Maps.Point

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

target: Maps.Map

The Map object that fired the event.

type: String

The event type.


preventDefault( )

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.