markerclustererplus-rails 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
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.
|
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
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
/**
|
5
5
|
* @name MarkerClustererPlus for Google Maps V3
|
6
|
-
* @version 2.0.
|
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
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
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:
|
4
|
+
hash: 5
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
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-
|
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.
|