Leaflet / Leaflet.VectorGrid

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

fix: apply few necessary checks before accessing objects #269

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hello Team,

We need to have these checks in place, otherwise I'm facing some Uncaught TypeError Thanks...

image

tomchadwin commented 2 years ago

What are these other objects which need to be gracefully ignored? Not sure I've seen them before. Do you get them in all data sources? Does anyone else get these errors?

IvanSanchez commented 2 years ago

This is a case of GIGO. The responsibility of ensuring that VectorGrid receives well-formed data falls to whatever code is feeding data to VectorGrid.

In other words: fix your AddMVTDynamicLayerToMap code, not VectorGrid's.