Skip to content

Commit cb4217a

Browse files
committed
clean
1 parent 2ef1f63 commit cb4217a

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

src/datalayerclusterer.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
/* exports DataLayerClusterer */
33
'use strict';
44

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+
512
/**
613
* @name DataLayerClusterer for Google Maps v3
714
* @version version 0.7.2
@@ -33,7 +40,7 @@
3340
*
3441
* @param {google.maps.Map} map The Google map to attach to.
3542
* @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.
3744
* 'gridSize': (number) The grid size of a cluster in pixels.
3845
* 'maxZoom': (number) The maximum zoom level that a feature can be part of a
3946
* cluster.
@@ -104,8 +111,8 @@ function DataLayerClusterer(opt_options) {
104111
this._data_layer = new google.maps.Data();
105112
this._data_layer.setStyle(DataLayerClusterer.HIDDEN_FEATURE);
106113

107-
if(map !== null) {
108-
this.setMap(this.map_);
114+
if (map !== null) {
115+
this.setMap(this.map_);
109116
}
110117
}
111118

@@ -409,7 +416,7 @@ DataLayerClusterer.prototype.addToClosestCluster_ = function(feature) {
409416

410417
var pos = feature.getGeometry().get();
411418

412-
var cluster;
419+
var cluster;
413420

414421
var c_size = this.clusters_.length;
415422
for (var i = 0; i !== c_size; ++i) {
@@ -584,7 +591,7 @@ FeatureCluster.prototype.isFeatureAlreadyAdded = function(feature) {
584591
if (this.features_.indexOf) {
585592
return this.features_.indexOf(feature) !== -1;
586593
} else {
587-
var f_size = this.features_.length;
594+
var f_size = this.features_.length;
588595
for (var i = 0; i !== f_size; ++i) {
589596
if (this.features_[i] === feature) {
590597
return true;
@@ -660,7 +667,7 @@ FeatureCluster.prototype.getDataLayerClusterer = function() {
660667
FeatureCluster.prototype.getBounds = function() {
661668
var bounds = new google.maps.LatLngBounds(this.center_, this.center_);
662669

663-
var f_size = this.features_.length;
670+
var f_size = this.features_.length;
664671
for (var i = 0; i !== f_size; ++i) {
665672
bounds.extend(this.features_[i].getGeometry().get());
666673
}
@@ -743,8 +750,8 @@ FeatureCluster.prototype.updateIcon = function() {
743750

744751
if (mz && zoom > mz) {
745752
// 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) {
748755
this.featureClusterer_.overrideStyle(this.features_[i], DataLayerClusterer.VISIBLE_FEATURE);
749756
}
750757

0 commit comments

Comments
 (0)