diff options
Diffstat (limited to 'gmap_arcgis.js')
-rw-r--r-- | gmap_arcgis.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js index 75add00..e6e35b5 100644 --- a/gmap_arcgis.js +++ b/gmap_arcgis.js @@ -304,7 +304,7 @@ function gmapArcgis(config) { }, // Add makers to the map - addMarkers: function(element) { + addMarkers: function(element, cluster) { var self = this; if (this.config['markers'][element].overlay != undefined) { @@ -379,6 +379,16 @@ function gmapArcgis(config) { self.config['markers'][element].overlay[i].addListener(); } + if (cluster == true) { + var markers = []; + + for (var i = 0; i < self.config['markers'][element].overlay.length; i++) { + markers.push(self.config['markers'][element].overlay[i].marker); + } + + self.config['markers'][element].cluster = new MarkerClusterer(self.map, markers); + } + self.unblockUI('markers_' + element); } }, |