Skip to content
Snippets Groups Projects
Commit fff3f6b6 authored by joelpittet's avatar joelpittet Committed by Andriy Podanenko http://druler.com
Browse files

Issue #1565792 by hadim, joelpittet: Fixed MarkerClusterer is not working.

parent 7d6b1174
No related branches found
No related tags found
No related merge requests found
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
/*global Drupal, GMarker, MarkerClusterer */ /*global Drupal, GMarker, MarkerClusterer */
// Replace to override marker creation // Replace to override marker creation
Drupal.gmap.factory.marker = function (loc, opts) { Drupal.gmap.factory.marker = function (opts) {
return new GMarker(loc, opts); return new google.maps.Marker(opts);
}; };
Drupal.gmap.addHandler('gmap', function (elem) { Drupal.gmap.addHandler('gmap', function (elem) {
...@@ -16,7 +16,10 @@ Drupal.gmap.addHandler('gmap', function (elem) { ...@@ -16,7 +16,10 @@ Drupal.gmap.addHandler('gmap', function (elem) {
obj.bind('init', function () { obj.bind('init', function () {
// Set up the markermanager. // Set up the markermanager.
obj.mc = new MarkerClusterer(obj.map, [], Drupal.settings.gmap_markermanager); obj.mc = new MarkerClusterer(obj.map, [], {
maxZoom: parseInt(Drupal.settings.gmap_markermanager["maxZoom"]),
gridSize: parseInt(Drupal.settings.gmap_markermanager["gridSize"])
});
}); });
obj.bind('addmarker', function (marker) { obj.bind('addmarker', function (marker) {
// @@@ Would be really nice to have bulk adding support in gmap. // @@@ Would be really nice to have bulk adding support in gmap.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment