I've tried Mapbox and their API to create an interactive map. The purpose is to fetch points in a geojson file, and display them on the map. They have to be filtered by their marker-icon and grouped depending on the zoom applied.
I had no trouble using the MarkerClusterGroup plugin with leaflet and Mapbox, but I can't get the filters to work.
This is my code :
https://gist.github.com/KuneStudio/5985864
And this is the content of my json with the points :
https://gist.github.com/KuneStudio/5985858
The markers are displaying correctly, the cluster part too, but I can't get the filters to work...
Any idea?
Thanks !
(Note : using the console, I tried to display a log in the map.markerLayer.setFilter(function(f) {}
, before the return true
, but I have nothing showing up.
Thanks again for your time
I found the solution with some help. This is the method I used :