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. |
| map | The |
| original |
The original event that was fired. |
| 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. |
| prevent |
Prevents event propagation bubbling up the event chain. |
| 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"` |
| type | The event type. |
Property Details
layerId
The id of the layer the event is attached to.
layerId?: string
Property Value
string
map
originalEvent
The original event that was fired.
originalEvent?: Event
Property Value
Event
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
preventDefault
Prevents event propagation bubbling up the event chain.
preventDefault: () => void
Property Value
() => void
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
type
The event type.
type: string
Property Value
string