Leaflet / Leaflet.VectorGrid

Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet 1.0.0
601 stars 194 forks source link

Full-featured L.Polygons and L.Polylines #217

Closed StefanBrand closed 5 years ago

StefanBrand commented 5 years ago

I'm using an SVG renderer to render Protobuf tiles and have a listener bound to the VectorGrid. The propagatedFrom property of the event is instanceof L.Polygon, but the getLatLngs() method returns undefined.

In my case, the polygon is visible in its entirety (all tiles with parts of the polygon are loaded). Thinking about it, there are cases where L.VectorGrid doesn't even know the whole polygon, so getLatLngs() wouldn't return all LatLngs. Now it makes sense for me that getLatLngs() is undefined.

Documenting this in case someone else stumbles upon the same paradox.