Document Maps JavaScript API Reference Manual Map MapsEvent

MapsEvent

This object is used to represent various mouse events returned on maps, overlays, and layers, and includes the following fields:

Attribute

Type

Description

lnglat

LngLat

Latitude and longitude coordinates of the cursor when the event occurred

pixel

Pixel

Pixel coordinates of the cursor when the event occurred

type

string

Event type

target

Object

The target object of the event varies by type. For example, if the event object is a Marker, then the target represents the Marker; if the event object is something else, the target changes accordingly