mhasbie / react-leaflet-vectorgrid

React wrapper of Leaflet.VectorGrid. Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet.
MIT License
19 stars 10 forks source link

onLoading not firing #10

Closed stclairdaniel closed 3 years ago

stclairdaniel commented 5 years ago

Code:

import VectorGridDefault from 'react-leaflet-vectorgrid';
const VectorGrid = withLeaflet(VectorGridDefault);
<VectorGrid
                ref={mapRef}
                key={key}
                url={apiURL}
                type="protobuf"
                subdomains={['a', 'b', 'c']}
                minZoom={minZoom}
                vectorTileLayerStyles={defaultStyle}
                bounds={bounds}
                zIndex={zIndex}
                updateWhenIdle={false}
                updateWhenZooming={false}
                updateInterval={600}
                onLoading={() => console.log('loading')}
                onLoad={() => console.log('loaded')}
/>

Issue: Tiles all load successfully and render, 'loaded' is logged. 'loading' is never logged - I cannot get this event to fire. Same code using react-leaflet GridLayer logs both events correctly. Any ideas? Am I doing something wrong here or is this a bug?

garretteklof commented 5 years ago

Were you able to figure this out? Running into the same issue. Thank you.

stclairdaniel commented 5 years ago

I was never able to figure this out. I'm no longer working on the project that used this code so I stopped investigating, but it's unfortunate I was not able to reach a conclusion.