I can confirm that the clusterer_marker.js found on version gmap-6.x-2.x-dev commit e196906e2c03395e72894c67331d72dcd4c18eca it is not compatible with the Google Maps Javascript API V3.

Here is a list of the errors I found:

  • Uncaught ReferenceError: GMarker is not defined - clusterer_marker.js?R:11
  • Uncaught ReferenceError: GLatLngBounds is not defined - clusterer_marker.js?R:68
  • Uncaught TypeError: Object #<hl> has no method 'getPoint' - clusterer_marker.js?R:70
  • Uncaught ReferenceError: GLatLng is not defined - clusterer_marker.js?R:76
  • Uncaught ReferenceError: GLatLng is not defined - clusterer_marker.js?R:78
  • Uncaught TypeError: Object #<dl> has no method 'getBoundsZoomLevel' - clusterer_marker.js?R:83
  • Uncaught ReferenceError: GLatLng is not defined - clusterer_marker.js?R:84

With the help of this stackoverflow post and the Google Maps Javascript API V3 Reference I was able to solve all the errors that I previously listed, the map worked again, the markers got displayed and the info windows opened, and the Jef Poskanzer's clusters worked again.

Please find attached my proposed patch for the solution.

CommentFileSizeAuthor
clusterer_marker_for_gmap_v3.patch1.61 KBaltrugon

Comments

altrugon’s picture

hutch’s picture

earthangelconsulting’s picture

I am confused. Does clusterer_marker.js work INSTEAD of Jef's Clusterer2.js, or in conjuction with?

I tried this patch against the clusterer_marker.js (from 6.x-2.0-beta5+1-dev from 2013-sept-30, hope that's the right version) and it didn't help, i can't get Clusterer2.js to work with 6.x-2.x versions of Gmap at all, it just displays a map with no markers.

earthangelconsulting’s picture

OK, I am less confused now. But it took a lot of research and experimenting to clear this mess up.

If you want Clusterer2.js to be working under the new Google Maps Version 3 API (under D6), with the behaviour that clicking on a cluster zooms in on it, then you need to:

- upgrade to the latest dev release of gmaps 6.x-2.x

- apply the patch described in the original post on this page we are on (https://www.drupal.org/files/issues/clusterer_marker_for_gmap_v3.patch)

- make the change described in the original post on this page: https://www.drupal.org/node/1952940
(to the file sites/all/modules/gmap/js/icon.js)

- make sure you are using the new version of Clusterer2.js (written by Jef Poskanzer of acme.com and modified by Etienne Châtaignier), available here: https://github.com/melicerte/clusterer

to do the same under D7 (and I haven't tested this)... I THINK that the patch on this page is already in place in 7.x-2.x versions of this module, and the admin page will point you to the correct version of Clusterer2.js... but you still need to make the changes described at https://www.drupal.org/node/1952940

djschoone’s picture

Following the above steps saved my day. Big thanks!

Nkendall’s picture

This still happens when upgrading from version 2.9 to 2.10

Nevermind, rookie mistake. the update wiped out the third party js files, and I just had to recopy them in the right place.

kenorb’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, clusterer_marker_for_gmap_v3.patch, failed testing.