I would like to use Leaflet's map.eachLayer(...) to do something to every marker in the map. I am not sure how to detect markers, however.
Is there a way to find out of what class the current layer is an instance of?
I guess I could add a custom property to each marker that I create, such as:
L.marker([40.49083 , -108.95966], {layerType: 'marker'}).addTo(map);
And then check if that property exists... but maybe there is a more elegant way?