Needs work
Project:
GMap Module
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2014 at 17:37 UTC
Updated:
21 Apr 2016 at 15:45 UTC
Jump to comment: Most recent
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:11Uncaught ReferenceError: GLatLngBounds is not defined - clusterer_marker.js?R:68Uncaught TypeError: Object #<hl> has no method 'getPoint' - clusterer_marker.js?R:70Uncaught ReferenceError: GLatLng is not defined - clusterer_marker.js?R:76Uncaught ReferenceError: GLatLng is not defined - clusterer_marker.js?R:78Uncaught TypeError: Object #<dl> has no method 'getBoundsZoomLevel' - clusterer_marker.js?R:83Uncaught ReferenceError: GLatLng is not defined - clusterer_marker.js?R:84With 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.
| Comment | File | Size | Author |
|---|---|---|---|
| clusterer_marker_for_gmap_v3.patch | 1.61 KB | altrugon |
Comments
Comment #1
altrugon commentedComment #2
hutch commentedYou might want to look at http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclus...
Comment #3
earthangelconsulting commentedI 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.
Comment #4
earthangelconsulting commentedOK, 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
Comment #5
djschoone commentedFollowing the above steps saved my day. Big thanks!
Comment #6
Nkendall commentedThis 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.
Comment #7
kenorb commented