-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using multiple tag filters in same map #10
Comments
Maybe, you have to move your features to different layers. Then, you have to use registerCustomSource function. Create an object per each layer. Each object must be contains name and hide function. You have to implement hide function |
I'm not sure if I'm fully understanding your comment. I want to use multiple buttons to filter the same markers. A project could be either active or inactive and also be about different plans. I've got a list like this (in reality it contains tens of instances):
So if the user selects Tomato and Active projects, I want only item 1 to appear and so on. Would this be possible with Tag Filter Button? Could you even maybe provide an example? |
You can add two tag filter button to your map. First filter button data must be active and ended and second button data must be contains tomato,cherry etc. Add active or ended and related project as tag option to your markers. Try this. Sorry, i can not add an example right now. Thanks |
I managed to get multiple buttons, but the filtering function doesn't use both buttons. So if the user first clicks 'ended' on the first button and then 'tomato' on the second one, projects 1, 2 and 3 are shown (all Tomato-projects) instead of only number 2 & 3 (ended Tomato-projects). |
Ok i will check. it seems there is a bug. İf you prepare a little jsfiddle i can fix the bug faster |
Here you go, hope you can find out what goes wrong! |
Ok i understand the question right now. And sory this use case not possible. Because first filter button shows active markers then second filter button searches tomato markers and clears previous search. Wé need a new idea for this use case. İf you have a new idea, like related filter buttons you can send pull request |
Thanks for your response. It's a pity we won't be able to do this right away, I will try to find a solution. |
Ok i will chang this request type from "question" to "feature" and i will be happy develop this feature. |
added nice docs. thanks to "Xiaoying Riley"
fixed "using multiple tag filters in same map #10" issue.
In you example, if i check Active, then check Cherry, it seems ok. But now if i uncheck Active, and only the Cherry is stay checked, but visually on map we have wrong result(. |
Needed a method |
And also, tell me, is the script compatible with LeafletMarkerCluster? Thanks. |
Please reopen issue or create a new issue |
Not compatible yet. But you can check #21 |
Hi there,
I would like to use Tag Filter Button, but I'm having a problem. I've added multiple filter buttons, but they are not working together.
Per example:
I want to filter projects in their status (active, ended), but I also want to filter on their topic (trees, plants, animals). So if I use a button to filter on the status 'active' and the topic 'plants', I would like to see only the instances that contain both tags. At the moment only one of two filter tags are used in the filtering, the last one clicked.
I understand that this use case might outside of the scope of the initial project, but I'd like to know if it'd be possible to implement something like this. If not, I'm gonna have to find another solution to my problem.
The text was updated successfully, but these errors were encountered: