markerclustererplus-rails 2.0.8 → 2.0.9

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -5,7 +5,9 @@ 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/docs/reference.html)
8
+ [MarkerClustererPlus for Google Maps V3](http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.9/docs/reference.html)
9
+
10
+ MarkerClustererPlus is an enhanced Google Maps V3 implementation of the V2 MarkerClusterer.
9
11
 
10
12
  ## Installation
11
13
 
@@ -1,5 +1,5 @@
1
1
  module Markerclustererplus
2
2
  module Rails
3
- VERSION = "2.0.8"
3
+ VERSION = "2.0.9"
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.8 [February 9, 2012]
6
+ * @version 2.0.9 [February 20, 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.
@@ -730,6 +730,14 @@ MarkerClusterer.prototype.onAdd = function () {
730
730
  this.listeners_ = [
731
731
  google.maps.event.addListener(this.getMap(), "zoom_changed", function () {
732
732
  cMarkerClusterer.resetViewport_(false);
733
+ // Workaround for this Google bug: when map is at level 0 and "-" of
734
+ // zoom slider is clicked, a "zoom_changed" event is fired even though
735
+ // the map doesn't zoom out any further. In this situation, no "idle"
736
+ // event is triggered so the cluster markers that have been removed
737
+ // do not get redrawn.
738
+ if (this.getZoom() === 0) {
739
+ google.maps.event.trigger(this, "idle");
740
+ }
733
741
  }),
734
742
  google.maps.event.addListener(this.getMap(), "idle", function () {
735
743
  cMarkerClusterer.redraw_();
@@ -1460,6 +1468,7 @@ MarkerClusterer.prototype.addToClosestCluster_ = function (marker) {
1460
1468
  */
1461
1469
  MarkerClusterer.prototype.createClusters_ = function (iFirst) {
1462
1470
  var i, marker;
1471
+ var mapBounds;
1463
1472
  var cMarkerClusterer = this;
1464
1473
  if (!this.ready_) {
1465
1474
  return;
@@ -1484,8 +1493,14 @@ MarkerClusterer.prototype.createClusters_ = function (iFirst) {
1484
1493
 
1485
1494
  // Get our current map view bounds.
1486
1495
  // Create a new bounds object so we don't affect the map.
1487
- var mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),
1496
+ //
1497
+ // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:
1498
+ if (this.getMap().getZoom() > 3) {
1499
+ mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),
1488
1500
  this.getMap().getBounds().getNorthEast());
1501
+ } else {
1502
+ mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));
1503
+ }
1489
1504
  var bounds = this.getExtendedBounds(mapBounds);
1490
1505
 
1491
1506
  var iLast = Math.min(iFirst + this.batchSize_, this.markers_.length);
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: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 8
10
- version: 2.0.8
9
+ - 9
10
+ version: 2.0.9
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-07 00:00:00 Z
18
+ date: 2012-03-08 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: This gem provides the MarkerClustererPlus assets for your Rails application.