jawj/OverlappingMarkerSpiderfier — pull request #8 by EricJustusson (2012-05-03 20:09:40+00:00)
Title: Preventing duplicate markers

Hi jawj,

This is an excellent library you have written! It works very well and plays nicely with MarkerClusterer.

I added a check on the addMarker method to see whether the marker has already been added to OMS. MarkerClusterer does this check. This will prevent adding duplicate markers/event listeners if the addMarker function is passed a marker OMS is already observing. I was running into this problem in my application.

I also added a couple of changes so that methods which have checks will be chainable even if the check fails.

Thanks,

Eric