Open geekypradip opened 2 months ago
@geekypradip My question to you is: Why did you think there's a filter
option implemented in VectorGrid?
@geekypradip My question to you is: Why did you think there's a
filter
option implemented in VectorGrid?
Thank you for your prompt response. I assumed the filter option was available because it's mentioned in the TypeScript definitions for leaflet.vectorgrid
on npm. Here's the link for reference: DefinitelyTyped vector grid
Upon further investigation, I noticed a discrepancy between the npm package version and the master
branch of the repository. The npm package is at version 1.3.0
, where the filter option is not available. However, the TypeScript definitions seem to be based on the master
branch, where the filter option is indeed present in the VectorGrid
options.
This mismatch between the released version and the TypeScript definitions could be causing some confusion. I would appreciate any guidance on how to proceed with this.
I'm currently working with Leaflet's VectorGrid and I'm encountering an issue with the filter option. Here's a snippet of my code:
In the above code, I've provided a filter function that should prevent any feature from being rendered on the map, as I'm returning false. However, it seems like the filter function is not being called at all. I've tried to debug this using Chrome's devtools and added a console.log statement inside the filter function, but it's not printing anything.
The strange thing is, whether I pass the filter option or not, the result is the same. It's as if the filter function is being completely ignored.
Any help or guidance on this issue would be greatly appreciated.