Using the Google Maps JavaScript API v3 with Overlapping Marker Spiderfier and MarkerWithLabel has an adverse effect when spiderfying: all markers will spiderfy and then immediately return to their original position (not via unspiderfy) except for the first marker.
That is, the Marker event position_changed
is triggered an additional n - 1
times after spiderfying, where n
is the number of markers spiderfied.
The issue stems from the
optimized
Marker attribute, which MarkerWithLabel forces to false. Leavingoptimized
as true (the default setting) should result in correct spiderfying. Doing so requires a patch to the MarkerWithLabel source though: removing the lines that setoptimized = false
: