MapMouseEvent interface
Event object returned by the maps when a mouse event occurs.
- Extends
Properties
layer |
The id of the layer the event is attached to. |
pixel | The pixel coordinate where the event occurred as an array of [x, y]. |
position | The geographical location of all touch points on the map. |
shapes | An array of Shape and Feature objects that the mouse event occurred on. Shape objects are editable, while Feature objects are not editable and either reside in a VectorTileSource or represent a cluster point. Clusters have the following properties: cluster: `boolean` - Indicates that the point is a cluster. This will be set to true if Point object represents a cluster. All other point objects are unlikely to have this value unless a property with this same name was added to the Point property data from your app. cluster_id: `string` - A unique id for the cluster. point_count: `number` - The number of points inside the cluster. point_count_abbreviated: `string` - An abbreviated string version of the point count. i.e. `"10K"` |
Inherited Properties
map | The |
original |
The original event that was fired. |
prevent |
Prevents event propagation bubbling up the event chain. |
type | The event type. |
Property Details
layerId
The id of the layer the event is attached to.
layerId?: string
Property Value
string
pixel
The pixel coordinate where the event occurred as an array of [x, y].
pixel?: Pixel
Property Value
position
The geographical location of all touch points on the map.
position?: Position
Property Value
shapes
An array of Shape and Feature objects that the mouse event occurred on. Shape objects are editable, while Feature objects are not editable and either reside in a VectorTileSource or represent a cluster point. Clusters have the following properties:
cluster: `boolean` - Indicates that the point is a cluster. This will be set to true if Point object represents a cluster. All other point objects are unlikely to have this value unless a property with this same name was added to the Point property data from your app.
cluster_id: `string` - A unique id for the cluster.
point_count: `number` - The number of points inside the cluster.
point_count_abbreviated: `string` - An abbreviated string version of the point count. i.e. `"10K"`
shapes?: Array<Feature<atlas.data.Geometry, any> | Shape>
Property Value
Inherited Property Details
map
The Map
instance in which the event occurred on.
map: Map
Property Value
Inherited From MapEvent.map
originalEvent
The original event that was fired.
originalEvent?: Event
Property Value
Event
Inherited From MapEvent.originalEvent
preventDefault
Prevents event propagation bubbling up the event chain.
preventDefault: () => void
Property Value
() => void
Inherited From MapMouseWheelEvent.preventDefault