Skip to content
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

Refilter issue (setStyle) #48

Open
kalnode opened this issue Jun 6, 2017 · 0 comments
Open

Refilter issue (setStyle) #48

kalnode opened this issue Jun 6, 2017 · 0 comments

Comments

@kalnode
Copy link

kalnode commented Jun 6, 2017

Refilter doesn't seem to be functional. Firebug reports an error "a.setStyle is not a function", and the rest of my code doesn't execute. A previous closed issue went off-topic and referenced this same problem.

A partial solution is successful: hiding the filtered-out markers by setting their opacity rather than using setStyle, as mentioned here. It proves the refilter function DOES work overall, but only setting opacity you end up with still-clickable ghost markers... so not a final solution.

Ultimately the problem is indeed that setStyle doesn't work on markers, only on paths. Here's a comment that hints at this. It mentions using setIcon to change the markers instead of setStyle. I guess you would need to use a transparent dummy marker image. Then, could it be made not-clickable?

In any case, shouldn't filtered-out markers be locally tagged "hidden" somehow rather than only changing their visual properties? In my case, I'm using my JSON in other data views (e.g. list view), and I'd rather simply look for a tag "hidden" rather than scanning for opacity 0 or 1, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant