You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting errors that I cannot read the 'on' property of undefined.
Therefore, in the example below (copied from the Readme's event example), control.loader is undefined.
var control = L.Control.fileLayerLoad();
control.loader.on('data:loaded', function (event) {
// event.layer gives you access to the layers you just uploaded!
// Add to map layer switcher
layerswitcher.addOverlay(event.layer, event.filename);
});
The text was updated successfully, but these errors were encountered:
BTW, I think that loader could be initialized immediately on control creation (loader._map can be initialized later).
If user tries to use loader before adding control to map it may throw error.
But actually I do not see any reason why loader should strictly require map: options.addToMap can be false.
P.S.
Also I suppose that L.FileLayer.FileLoader has not to be extended from L.Layer as it's not layer, and does not benefit from any L.Layer-specific properties/methods/events.
I am getting errors that I cannot read the 'on' property of undefined.
Therefore, in the example below (copied from the Readme's event example), control.loader is undefined.
The text was updated successfully, but these errors were encountered: