I have encountered an issue where setting the geojson triggers the mouseover event, causing an infinite loop and breaking functionality. I managed to fix it by changing it to click, but now I need to figure out how to make it work with hover.
My goal is to load festivals onto a map for my festival index page, similar to Yelp's index page. I've successfully loaded the data as geoJSON to my markerLayer, but when I try to change the color of the marker on hover, it disables other events. I've tried various approaches, but moving things out of the ajax call hasn't helped.
What am I missing in my code? How can I resolve this issue? I believe my struggle stems from a lack of understanding of layers, mapbox, and setting geojson.
Additionally, I'm considering using font awesome and changing the font color as an alternative solution. Any feedback or suggestions are appreciated!