digidem / react-mapfilter

Visualizing, exploring, filtering and printing geographic data and geotagged photos and video
https://lab.digital-democracy.org/mapfilter
29 stars 11 forks source link

[WIP] Use Uber react-map-gl for better reactive map #96

Open gmaclennan opened 5 years ago

gmaclennan commented 5 years ago

Working with a map in a reactive application is hard - especially with map zoom and pan animations in response to both user input and events from the app itself. A lot of bugs in MapFilter come from mixing imperative code with reactive code - where the map view should always render the same with the same set of props/inputs. This PR switches to use react-map-gl which is a module by the Uber team which wraps mapbox-gl-js in a react component, replacing our current custom mapbox-gl-js component.