gabriel-russo / Leaflet.BetterFileLayer

The definitive plugin to load your spatialized files into leaflet.
https://gabriel-russo.github.io/Leaflet.BetterFileLayer/example/
Other
18 stars 0 forks source link

issue uploading files #2

Closed anujs099 closed 5 months ago

anujs099 commented 5 months ago

hey @gabriel-russo ,i am having trouble uploading the file , when i upload the file the file loaded event runs but immediately after that another event layerloaderror runs which is not letting me complete the dispatch .

map.on('bfl:layerloaded', (e: any) => { const layers = e.layer.getLayers(true, true, true); map.removeLayer(e.layer); const arrOfGeoJSON = layers.map((layer: any) => layer.toGeoJSON()); dispatch(setLayerFromFiles(arrOfGeoJSON)); });

        map.on('bfl:layerloaderror', e => {
            console.log('upload event load error', e);
        });