v6.0.0-17Pre-release
Added 4
- Added rollstart, roll, and rollend events to MapEventType
- Added style.load event as MapStyleLoadEvent to MapEventType
- Added event classes and type-map for Marker, Popup, GeolocateControl and FullscreenControl
- Added MapMovementEvent as the type for all camera-transition events
Changed 6
- All map events are now real classes that are instantiated when they are fired
- Renamed MapLibreZoomEvent to MapBoxZoomEvent
- Source data events now carry full source info including sourceId, tile, and sourceDataType
- Evented is now generic over an event-type map and abstract, allowing subclasses to get strongly-typed on, once, and off automatically
- Camera and Style events are now typed via MapEventType
- Source events are now typed via the new SourceEventType
Fixed 1
- Skip undefined properties during worker serialization
Removed 1
- Removed MapDataEvent; data, dataloading, and dataabort events are now MapSourceDataEvent or MapStyleDataEvent
✨ Features and improvements
- ⚠️ All map events are now real classes that are instantiated when they are fired. Renamed
MapLibreZoomEventtoMapBoxZoomEvent, added therollstart/roll/rollendandstyle.load(asMapStyleLoadEvent) events toMapEventType, and added event classes and type-map forMarker,Popup,GeolocateControlandFullscreenControl. RemovedMapDataEvent: thedata/dataloading/dataabortevents are nowMapSourceDataEvent | MapStyleDataEvent, so source data events carry the full source info (sourceId,tile,sourceDataType, …). AddedMapMovementEventas the type for all camera-transition events (move/zoom/rotate/pitch/roll/dragand theirstart/endvariants).Eventedis now generic over an event-type map (Evented<EventType>) and isabstract, so subclasses get strongly-typedon/once/offautomatically without re-declaring overloads — this also types the events onCamera/Style(viaMapEventType) and on the sources (via the newSourceEventType) (#7789) (by @HarelM)