|
2 | 2 | /* exports DataLayerClusterer */ |
3 | 3 | 'use strict'; |
4 | 4 |
|
| 5 | + |
| 6 | +/** |
| 7 | + * @name DataLayerClusterer for Google Maps v3 |
| 8 | + * @version version 0.7.3 |
| 9 | + * @author Nelson Antunes; clean and corrections Jesús R Peinado [email protected] |
| 10 | + */ |
| 11 | + |
5 | 12 | /** |
6 | 13 | * @name DataLayerClusterer for Google Maps v3 |
7 | 14 | * @version version 0.7.2 |
|
33 | 40 | * |
34 | 41 | * @param {google.maps.Map} map The Google map to attach to. |
35 | 42 | * @param {Object=} opt_options support the following options: |
36 | | - * 'map': (google.maps.Map) The Google map to attach to. |
| 43 | + * 'map': (google.maps.Map) The Google map to attach to. |
37 | 44 | * 'gridSize': (number) The grid size of a cluster in pixels. |
38 | 45 | * 'maxZoom': (number) The maximum zoom level that a feature can be part of a |
39 | 46 | * cluster. |
@@ -104,8 +111,8 @@ function DataLayerClusterer(opt_options) { |
104 | 111 | this._data_layer = new google.maps.Data(); |
105 | 112 | this._data_layer.setStyle(DataLayerClusterer.HIDDEN_FEATURE); |
106 | 113 |
|
107 | | - if(map !== null) { |
108 | | - this.setMap(this.map_); |
| 114 | + if (map !== null) { |
| 115 | + this.setMap(this.map_); |
109 | 116 | } |
110 | 117 | } |
111 | 118 |
|
@@ -409,7 +416,7 @@ DataLayerClusterer.prototype.addToClosestCluster_ = function(feature) { |
409 | 416 |
|
410 | 417 | var pos = feature.getGeometry().get(); |
411 | 418 |
|
412 | | - var cluster; |
| 419 | + var cluster; |
413 | 420 |
|
414 | 421 | var c_size = this.clusters_.length; |
415 | 422 | for (var i = 0; i !== c_size; ++i) { |
@@ -584,7 +591,7 @@ FeatureCluster.prototype.isFeatureAlreadyAdded = function(feature) { |
584 | 591 | if (this.features_.indexOf) { |
585 | 592 | return this.features_.indexOf(feature) !== -1; |
586 | 593 | } else { |
587 | | - var f_size = this.features_.length; |
| 594 | + var f_size = this.features_.length; |
588 | 595 | for (var i = 0; i !== f_size; ++i) { |
589 | 596 | if (this.features_[i] === feature) { |
590 | 597 | return true; |
@@ -660,7 +667,7 @@ FeatureCluster.prototype.getDataLayerClusterer = function() { |
660 | 667 | FeatureCluster.prototype.getBounds = function() { |
661 | 668 | var bounds = new google.maps.LatLngBounds(this.center_, this.center_); |
662 | 669 |
|
663 | | - var f_size = this.features_.length; |
| 670 | + var f_size = this.features_.length; |
664 | 671 | for (var i = 0; i !== f_size; ++i) { |
665 | 672 | bounds.extend(this.features_[i].getGeometry().get()); |
666 | 673 | } |
@@ -743,8 +750,8 @@ FeatureCluster.prototype.updateIcon = function() { |
743 | 750 |
|
744 | 751 | if (mz && zoom > mz) { |
745 | 752 | // The zoom is greater than our max zoom so show all the features in cluster. |
746 | | - var f_size = this.features_.length; |
747 | | - for (var i = 0; i !== f_size; ++i) { |
| 753 | + var f_size = this.features_.length; |
| 754 | + for (var i = 0; i !== f_size; ++i) { |
748 | 755 | this.featureClusterer_.overrideStyle(this.features_[i], DataLayerClusterer.VISIBLE_FEATURE); |
749 | 756 | } |
750 | 757 |
|
|
0 commit comments