Adding Click- and Mouseover-Events simultaneously to GeoJson Markers on a Leaflet Map

When you are developing Leaflet Maps for Desktop and Mobile Applications, you might want to add nice features like a Mouse Over Effect for Desktop Users, but what if you have a mobile user also accessing the website in this case the easiest way might be just to add a click event. When I dealed with this problem, I found a good hint in this Stackexchange with a top answer of IvanSanchez, where he mentioned that when you bind a popup you automatically also add and click event....

March 14, 2019 · 1 min · Moritz Gnisia