Currently, I am utilizing Leaflete and working with a featureGroup that contains multiple features. Each feature within the group is defined by fields such as name, epoch, year, day, and length.
I am interested in creating a filter to selectively add layers to the map based on specific criteria, specifically to display only those features with an epoch of 2021 and a year of 2022. This filter should be activated by clicking the 'epoch' button labeled '2021-22'.
Any guidance or insights on how to achieve this functionality would be greatly appreciated.
Thus far, my attempts to utilize if and for loops to iterate through the array and search for the desired conditions have been unsuccessful. Additionally, using .forEach has not produced the desired results. It seems clear that I may be overlooking something crucial in my implementation. Your assistance in resolving this issue would be invaluable.