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

Cannot render tiles with React16, Leafletjs 1.3.3 and React-Leaflet 2.0 #1

Closed cre8te closed 5 years ago

cre8te commented 6 years ago

Hi, I cannot get this to render the vector tiles under React16, Leafletjs 1.3.3 and React-Leaflet 2.0 as context is not passed to the child object (it is just undefined).

Line 117

var _context = this.context,
map = _context.map,
pane = _context.pane,
layerContainer = _context.layerContainer;

I am working on a solution but any assistance would be appreciated.

egemon commented 6 years ago

Same to me. Lemme know if u find the solution, I will try as well at mean time

egemon commented 6 years ago

@cre8te https://react-leaflet.js.org/docs/en/context.html

mhasbie commented 5 years ago

Latest release is published and tested. Works with react@16.5.2, leaflet@1.3.4, and react-leaflet@2.0.1

Closing this now.