How to filter polygons in Leaflet using range slider

المشرف العام

Administrator
طاقم الإدارة
I have a map I'm working on with Leaflet that displays a choropleth of zip code-level data. One piece of functionality I would like to add is to allow users to use a range slider to filter out polygons (zip codes) based on some values of the associated metadata. In this case, each zip code in the GeoJson I'm using has a value for "sales" for that zip, and I would like users to be able to use the range slider to remove zip polygons that have fewer than the number of sales specified by the range slider.

I have seen some examples pointing to filtering using buttons, but nothing using a slider as described here. Any help pointing me in the right direction with some example code or fully working examples would be much appreciated. Thanks for reading.



أكثر...
 
أعلى