Leaflet/Leaflet — pull request #1754 by danzel (2013-06-12 04:18:59+00:00)
Title: Fix SetIcon with DivIcons

As of #1726 you cannot use setIcon and pass a new DivIcon. If you do the icon doesn't end up getting updated.
This breaks MarkerCluster which relies heavily on DivIcon.
Also probably breaks leaflet.awesome-markers and some others.

Now we check that the Icon has actual reused the dom element, if it hasn't we do the old behaviour of removing the dom element and adding the new one.

Fixes #1753 and Fixed Leaflet/Leaflet.markercluster#190