This issue is not really regarding the gmap module but the Clusterer2.js file so it isn't just directed at 5.x-1.x-dev.

Hard to explain but:
I have found in some cases when your map covers an area that wraps around the point where latitude -180 & latitude 180 meet the Clusterer can get mixed up and set the grid squares in the wrong places, resulting in it not finding any markers within the grid squares and therefore not clustering any of your markers.

This would result in clusters sometimes working and sometimes not depending on the bounds of your gmap.

This patch fixes this issue for me.

If anyone else has been having this issue, try the patch and see if it helps.

Also, if people can confirm this fixes the issue it might be good to get it back to Jef Poskanzer to update his code.

CommentFileSizeAuthor
clusterer2_cluster_bounds.patch2.7 KBagileware

Comments

bdragon’s picture

Re: the logic changes, Wouldn't it be easer to just add 90 and 180 so stuff doesn't go negative, and then subtract it back out later in the calculations?

Also, you should probabaly be following Jef's formatting conventions. (even IF it means brace on next line and tabs, yeurrrgh..)

podarok’s picture

Status: Needs review » Closed (won't fix)

release unsupported
feel free to open issue against latest 7.x dev