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.
I'm using an SVG renderer to render Protobuf tiles and have a listener bound to the
VectorGrid
. ThepropagatedFrom
property of the event isinstanceof L.Polygon
, but thegetLatLngs()
method returnsundefined
.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, sogetLatLngs()
wouldn't return allLatLng
s. Now it makes sense for me thatgetLatLngs()
isundefined
.Documenting this in case someone else stumbles upon the same paradox.