Leaflet / Leaflet.VectorGrid

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

Missing event 'tileerror' when failed to fetch #139

Open hwernstrom opened 6 years ago

hwernstrom commented 6 years ago

Missing event 'tileerror' when failed to fetch. This is part of the the base L.gridLayer events when a tile has an error it should call the tileerror event.

IvanSanchez commented 6 years ago

@hwernstrom It's difficult to know what's going on in your case. I'm going to guess you're using protobuf tiles (instead of a GeoJSON slicer), and that your tiles are failing to fetch due to HTTP errors.

The changes at #140 should fix those, and we could use a hand testing if those changes actually cover your error cases.

If you're encountering different errors, could you please elaborate?

hwernstrom commented 6 years ago

I'm creating the pbf tiles server-side for only where there is data. I want to add a check to see if new data exist where it didn't previously cache. Right now I have no way of retrieving the 404 error and handling it by calling the server to create that pbf.

This is in the L.VectorGrid.Protobuf fetch call. I'm trying to fix and send a pull request.