Leaflet / Leaflet.VectorGrid

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

Implement GridLayer loading events #171

Open newmanw opened 6 years ago

newmanw commented 6 years ago

Wondering if it would be possible to implement the GridLayer tile loading events for async vector tile resources. Looking to get feedback on when tiles have loaded as well as the entire layer.

Technically the loading events fire, however they don't take into account async server call to get vector tiles from a remote location. This means that the loading event is fired after the vector tile comes back from the server and leaflet starts to render the tile. It would be helpful for the loading events to fire when the request is made.

screen shot 2018-06-28 at 7 33 08 pm
perliedman commented 5 years ago

Hi, sorry for late feedback, but from my reading of the events, loading should fire before the async server calls return, and load should fire afterwards; corresponding events for each tile should be tileloadstart and tileload. Do you mean this is not the way it currently works? That sounds like a bug in Leaflet in that case.