AlpacaTravel / react-map-gl-alt

React Mapbox-GL-JS binding with improved performance, event and API exposure
Other
42 stars 2 forks source link

Add styledata, sourcedata, styledataloading, and sourcedataloading events #7

Open cammanderson opened 7 years ago

cammanderson commented 7 years ago

With the release of new events in v0.29 of mapbox-gl-js, the new events of styledata, sourcedata, styledataloading and sourcedataloading events are added. These are useful in being able to craft feedback to the user amongst other reasons.

We need to add support for these events so that event handlers can listen in for these events. We currently support all the events that are provided by mapbox-gl-js and expose them into React (e.g. load, rotate, drag, webglcontextlost etc) through the MapEvents component, which also supports multiple listeners to be registered through multiple components.

The update would require additions to map-events.jsx and evented.jsx. This is a fairly easy win to add these additions with plenty of examples shown for adding events as a pattern to follow.