mhasbie / react-leaflet-vectorgrid

React wrapper of Leaflet.VectorGrid. Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet.
MIT License
19 stars 10 forks source link

Add support for React-Leaflet v2 #3

Closed afrith closed 6 years ago

afrith commented 6 years ago

React-Leaflet v2 changes the way that context is passed from the Map to other components, as described at https://react-leaflet.js.org/docs/en/context.html. This PR adds support for the new context mechanism, without removing support for earlier versions. It requires the user to slightly change the way in which they use the component if they are using React-Leaflet v2 (but does not require any changes for users of older versions). This is documented in a section added to the README. I think this would fix issue #1.

mhasbie commented 6 years ago

Thanks @afrith Really appreciate the help.

willfalconer commented 6 years ago

Should this be published to npm as a new version?