markerclustererplus-rails 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -5,7 +5,7 @@ The files will be added to the asset pipeline and available for you to use.
5
5
 
6
6
  For info on how to use the library see the original documentation:
7
7
 
8
- [MarkerClustererPlus for Google Maps V3](http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.4/docs/reference.html)
8
+ [MarkerClustererPlus for Google Maps V3](http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.5/docs/reference.html)
9
9
 
10
10
  ## Installation
11
11
 
@@ -1,5 +1,5 @@
1
1
  module Markerclustererplus
2
2
  module Rails
3
- VERSION = "2.0.4"
3
+ VERSION = "2.0.5"
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.4 [September 21, 2011]
6
+ * @version 2.0.5 [September 30, 2011]
7
7
  * @author Gary Little
8
8
  * @fileoverview
9
9
  * The library creates and manages per-zoom-level clusters for large amounts of markers.
@@ -131,6 +131,7 @@ ClusterIcon.prototype.onAdd = function () {
131
131
  this.getPanes().overlayMouseTarget.appendChild(this.div_);
132
132
 
133
133
  google.maps.event.addDomListener(this.div_, "click", function (e) {
134
+ var mz;
134
135
  var mc = cClusterIcon.cluster_.getMarkerClusterer();
135
136
  /**
136
137
  * This event is fired when a cluster marker is clicked.
@@ -143,19 +144,20 @@ ClusterIcon.prototype.onAdd = function () {
143
144
 
144
145
  // The default click handler follows. Disable it by setting
145
146
  // the zoomOnClick property to false.
146
- var mz = mc.getMaxZoom();
147
147
  if (mc.getZoomOnClick()) {
148
148
  // Zoom into the cluster.
149
+ mz = mc.getMaxZoom();
149
150
  mc.getMap().fitBounds(cClusterIcon.cluster_.getBounds());
150
151
  // Don't zoom beyond the max zoom level
151
- if (mz && (mc.getMap().getZoom() > mz)) {
152
+ if (mz !== null && (mc.getMap().getZoom() > mz)) {
152
153
  mc.getMap().setZoom(mz + 1);
153
154
  }
154
- // Prevent event propagation to map:
155
- e.cancelBubble = true;
156
- if (e.stopPropagation) {
157
- e.stopPropagation();
158
- }
155
+ }
156
+
157
+ // Prevent event propagation to the map:
158
+ e.cancelBubble = true;
159
+ if (e.stopPropagation) {
160
+ e.stopPropagation();
159
161
  }
160
162
  });
161
163
 
@@ -1115,6 +1117,16 @@ MarkerClusterer.prototype.getTotalMarkers = function () {
1115
1117
  };
1116
1118
 
1117
1119
 
1120
+ /**
1121
+ * Returns the current array of clusters formed by the clusterer.
1122
+ *
1123
+ * @return {Array} The array of clusters formed by the clusterer.
1124
+ */
1125
+ MarkerClusterer.prototype.getClusters = function () {
1126
+ return this.clusters_;
1127
+ };
1128
+
1129
+
1118
1130
  /**
1119
1131
  * Returns the number of clusters formed by the clusterer.
1120
1132
  *
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: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 4
10
- version: 2.0.4
9
+ - 5
10
+ version: 2.0.5
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-03 00:00:00 Z
18
+ date: 2012-03-04 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: This gem provides the MarkerClustererPlus assets for your Rails application.