markerclustererplus-rails 2.0.10 → 2.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Markerclustererplus
2
2
  module Rails
3
- VERSION = "2.0.10"
3
+ VERSION = "2.0.11"
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  /**
5
5
  * @name MarkerClustererPlus for Google Maps V3
6
- * @version 2.0.10 [February 29, 2012]
6
+ * @version 2.0.11 [April 19, 2012]
7
7
  * @author Gary Little
8
8
  * @fileoverview
9
9
  * The library creates and manages per-zoom-level clusters for large amounts of markers.
@@ -107,6 +107,7 @@ function ClusterIcon(cluster, styles) {
107
107
  cluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView);
108
108
 
109
109
  this.cluster_ = cluster;
110
+ this.className_ = cluster.getMarkerClusterer().getClusterClass();
110
111
  this.styles_ = styles;
111
112
  this.center_ = null;
112
113
  this.div_ = null;
@@ -126,6 +127,7 @@ ClusterIcon.prototype.onAdd = function () {
126
127
  var cDraggingMapByCluster;
127
128
 
128
129
  this.div_ = document.createElement("div");
130
+ this.div_.className = this.className_;
129
131
  if (this.visible_) {
130
132
  this.show();
131
133
  }
@@ -622,6 +624,9 @@ Cluster.prototype.isMarkerAlreadyAdded_ = function (marker) {
622
624
  * <code>text</code> value of <code>"125"</code> and an <code>index</code> of <code>3</code>
623
625
  * for a cluster icon representing 125 markers so the element used in the <code>styles</code>
624
626
  * array is <code>2</code>.
627
+ * @property {string} [clusterClass="cluster"] The name of the CSS class defining general styles
628
+ * for the cluster markers. Use this class to define CSS styles that are not set up by the code
629
+ * that processes the <code>styles</code> array.
625
630
  * @property {Array} [styles] An array of {@link ClusterIconStyle} elements defining the styles
626
631
  * of the cluster markers to be used. The element to be used to style a given cluster marker
627
632
  * is determined by the function defined by the <code>calculator</code> property.
@@ -701,6 +706,7 @@ function MarkerClusterer(map, opt_markers, opt_options) {
701
706
  this.calculator_ = opt_options.calculator || MarkerClusterer.CALCULATOR;
702
707
  this.batchSize_ = opt_options.batchSize || MarkerClusterer.BATCH_SIZE;
703
708
  this.batchSizeIE_ = opt_options.batchSizeIE || MarkerClusterer.BATCH_SIZE_IE;
709
+ this.clusterClass_ = opt_options.clusterClass || "cluster";
704
710
 
705
711
  if (navigator.userAgent.toLowerCase().indexOf("msie") !== -1) {
706
712
  // Try to avoid IE timeout when processing a huge number of markers:
@@ -1122,6 +1128,26 @@ MarkerClusterer.prototype.setBatchSizeIE = function (batchSizeIE) {
1122
1128
  };
1123
1129
 
1124
1130
 
1131
+ /**
1132
+ * Returns the value of the <code>clusterClass</code> property.
1133
+ *
1134
+ * @return {string} the value of the clusterClass property.
1135
+ */
1136
+ MarkerClusterer.prototype.getClusterClass = function () {
1137
+ return this.clusterClass_;
1138
+ };
1139
+
1140
+
1141
+ /**
1142
+ * Sets the value of the <code>clusterClass</code> property.
1143
+ *
1144
+ * @param {number} clusterClass The value of the clusterClass property.
1145
+ */
1146
+ MarkerClusterer.prototype.setClusterClass = function (clusterClass) {
1147
+ this.clusterClass_ = clusterClass;
1148
+ };
1149
+
1150
+
1125
1151
  /**
1126
1152
  * Returns the array of markers managed by the clusterer.
1127
1153
  *
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markerclustererplus-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 10
10
- version: 2.0.10
9
+ - 11
10
+ version: 2.0.11
11
11
  platform: ruby
12
12
  authors:
13
13
  - RogerE
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-16 00:00:00 Z
18
+ date: 2012-04-22 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: This gem provides the MarkerClustererPlus assets for your Rails application.