You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All Mapbox GL JS events are available for use. For a list of events look here: [https://www.mapbox.com/mapbox-gl-js/api/#map.event:resize](https://www.mapbox.com/mapbox-gl-js/api/#map.event:resize)
172
172
173
-
Events can be used by prepending `map-` to the beginning of the Mapbox event. For example for the Mapbox `click` event `@map-click` can be used.
173
+
Map and control events can be used by adding a prefix introduced in the following table to the beginning of the Mapbox event name.
174
+
175
+
| Object | Prefix |
176
+
| ----- | ------ |
177
+
| Map |`map-`|
178
+
| GeolocateControl |`geolocate-`|
179
+
180
+
For example for the Mapbox Map `click` event `@map-click` can be used and for the GeolocateControl geolocate event `@geolocate-geolocate` can be used.
181
+
182
+
All events are passed the `map` or `control` object and the event or position object if it has one.
174
183
175
-
All events are passed the `map` object and the event if it has one.
0 commit comments