performance for too many layers
SixiCat opened this issue · comments
LiuLiangJun commented
hi!
there is a project that has too many layers, leaflet-lasso needs 10~20s until the lasso selection is done.
so, is there a option that make lasso just pick selected layer in the given layers,instead of the map's all layers.
thanks!!!
Jan Žák commented
LiuLiangJun commented
sorry, it's my fault. The "selected layer" is point this
source code.
If there is an option that can set the layers before activate lasso, we don't need to waste time on irrelevant layers.
Jan Žák commented
Would adding a filter function option work for your use case?
export interface LassoHandlerOptions {
polygon?: L.PolylineOptions,
intersect?: boolean;
filter?: (layer: L.Layer) => boolean;
}
LiuLiangJun commented
thanks for your work.
I also think it will help for my project.