markerclustererplus-rails 2.1.2.1 → 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e01fa4113710b0713668ac6edb970852336cc0c4
4
- data.tar.gz: 2f626e208f7393bd03d2dc9b670edd148fcd7d58
2
+ SHA256:
3
+ metadata.gz: 9aaa94037a5e1700f881590186975c22f6f7d0c2f4df2ee0dc8135f797cc09f9
4
+ data.tar.gz: 02f926fe7a6b5c1c244933cffda4a1f1c74bc07dd251479b8cdc2893e158fa24
5
5
  SHA512:
6
- metadata.gz: bbe4a251dfd4422b3d178296fa4f1adbe972e03575602972fb458591f37c8aa53bf5891c019b772426bc896053baefbaa87cbba576f0d9dfccf994267bec26ff
7
- data.tar.gz: 6759da27d20038fc2deb8cb38e60708d7516570bacb6f83871ea33af8b8c679f4791f8f928db1173afb23f8780d02d3b6a83c0f4223c7c9be54a181ed9d8c686
6
+ metadata.gz: 496c2db184c7bbeae84aadbf2aa7a2f29493b37460a01658cdeb6e5368620f7488c4a58b19af039a007cf0589d7dca874902c328fceb4eca8d7e844befec5515
7
+ data.tar.gz: 5e23772bf82df6dacca1b4532658252c7c3d4d81c95198c2543534cb7b7a66de060ca084eb72824c9a82188b3e4ffac449665bdf1c8f860cd7c32acfc55a6497
data/README.md CHANGED
@@ -1,13 +1,18 @@
1
1
  # MarkerClustererPlus for Rails
2
2
 
3
- This gem vendors the MarkerClustererPlus assets for Rails 3.1 and greater.
3
+ MarkerClustererPlus is an enhanced Google Maps V3 implementation of the V2 MarkerClusterer.
4
+
5
+ This gem vendors the MarkerClustererPlus assets for Rails.
4
6
  The files will be added to the asset pipeline and available for you to use.
5
7
 
8
+ The original source can be found here:
9
+
10
+ [MarkerClustererPlus for Google Maps V3](https://github.com/googlemaps/v3-utility-library/tree/master/markerclustererplus)
11
+
6
12
  For info on how to use the library see the original documentation:
7
13
 
8
- [MarkerClustererPlus for Google Maps V3](https://htmlpreview.github.io/?https://github.com/googlemaps/v3-utility-library/blob/master/markerclustererplus/docs/reference.html)
14
+ [MarkerClustererPlus reference](https://htmlpreview.github.io/?https://github.com/googlemaps/v3-utility-library/blob/master/markerclustererplus/docs/reference.html)
9
15
 
10
- MarkerClustererPlus is an enhanced Google Maps V3 implementation of the V2 MarkerClusterer.
11
16
 
12
17
  ## Installation
13
18
 
@@ -23,8 +28,6 @@ You can include it by adding the following to your javascript application file:
23
28
  //= require markerclusterer
24
29
  ```
25
30
 
26
- The gem is Rails 4 compatible from version 2.0.15.2 and up.
27
-
28
31
  ## Limitations
29
32
 
30
33
  Note that to include the MarkerClustererPlus icons in the asset pipeline we override the original configuration for setting the icon properties. This means that changing the following properties will not have any effect when using this gem:
@@ -1,15 +1,13 @@
1
1
  /**
2
2
  * @name MarkerClustererPlus for Google Maps V3
3
- * @version 2.1.2 [May 28, 2014]
3
+ * @version 2.1.5 [July 21, 2016]
4
4
  * @author Gary Little
5
5
  * @fileoverview
6
6
  * The library creates and manages per-zoom-level clusters for large amounts of markers.
7
7
  * <p>
8
- * This is an enhanced V3 implementation of the
9
- * <a href="http://gmaps-utility-library-dev.googlecode.com/svn/tags/markerclusterer/"
10
- * >V2 MarkerClusterer</a> by Xiaoxi Wu. It is based on the
11
- * <a href="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/"
12
- * >V3 MarkerClusterer</a> port by Luke Mahe. MarkerClustererPlus was created by Gary Little.
8
+ * This is an enhanced V3 implementation of the V2 MarkerClusterer by Xiaoxi Wu. It is
9
+ * based on the V3 MarkerClusterer port by Luke Mahe. MarkerClustererPlus was created
10
+ * by Gary Little.
13
11
  * <p>
14
12
  * v2.0 release: MarkerClustererPlus v2.0 is backward compatible with MarkerClusterer v1.0. It
15
13
  * adds support for the <code>ignoreHidden</code>, <code>title</code>, <code>batchSizeIE</code>,
@@ -25,7 +23,7 @@
25
23
  * This file modified for use with the Rails asset pipeline
26
24
  * https://github.com/RogerE/markerclustererplus-rails
27
25
  * gem markerclustererplus-rails
28
- * gem version 2.1.2.1
26
+ * gem version 2.1.5
29
27
  * @author Roger Ertesvag
30
28
  * NOTE: to include the MarkerClustererPlus icons in the asset pipeline the gem overrides
31
29
  * the original configuration for setting the icon properties. This means that changing
@@ -262,7 +260,9 @@ ClusterIcon.prototype.show = function () {
262
260
  var pos = this.getPosFromLatLng_(this.center_);
263
261
  this.div_.style.cssText = this.createCss(pos);
264
262
  img = "<img src='" + this.url_ + "' style='position: absolute; top: " + spriteV + "px; left: " + spriteH + "px; ";
265
- if (!this.cluster_.getMarkerClusterer().enableRetinaIcons_) {
263
+ if (this.cluster_.getMarkerClusterer().enableRetinaIcons_) {
264
+ img += "width: " + this.width_ + "px; height: " + this.height_ + "px;";
265
+ } else {
266
266
  img += "clip: rect(" + (-1 * spriteV) + "px, " + ((-1 * spriteH) + this.width_) + "px, " +
267
267
  ((-1 * spriteV) + this.height_) + "px, " + (-1 * spriteH) + "px);";
268
268
  }
@@ -338,6 +338,11 @@ ClusterIcon.prototype.createCss = function (pos) {
338
338
  style.push("cursor: pointer;");
339
339
  style.push("position: absolute; top: " + pos.y + "px; left: " + pos.x + "px;");
340
340
  style.push("width: " + this.width_ + "px; height: " + this.height_ + "px;");
341
+ style.push("-webkit-user-select: none;");
342
+ style.push("-khtml-user-select: none;");
343
+ style.push("-moz-user-select: none;");
344
+ style.push("-o-user-select: none;");
345
+ style.push("user-select: none;");
341
346
  return style.join("");
342
347
  };
343
348
 
@@ -1429,14 +1434,14 @@ MarkerClusterer.prototype.resetViewport_ = function (opt_hide) {
1429
1434
  * @param {google.maps.LatLng} p2 The second lat lng point.
1430
1435
  * @return {number} The distance between the two points in km.
1431
1436
  * @see http://www.movable-type.co.uk/scripts/latlong.html
1432
- */
1437
+ */
1433
1438
  MarkerClusterer.prototype.distanceBetweenPoints_ = function (p1, p2) {
1434
1439
  var R = 6371; // Radius of the Earth in km
1435
1440
  var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;
1436
1441
  var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;
1437
1442
  var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
1438
- Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) *
1439
- Math.sin(dLon / 2) * Math.sin(dLon / 2);
1443
+ Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) *
1444
+ Math.sin(dLon / 2) * Math.sin(dLon / 2);
1440
1445
  var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
1441
1446
  var d = R * c;
1442
1447
  return d;
@@ -1524,7 +1529,7 @@ MarkerClusterer.prototype.createClusters_ = function (iFirst) {
1524
1529
  // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:
1525
1530
  if (this.getMap().getZoom() > 3) {
1526
1531
  mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),
1527
- this.getMap().getBounds().getNorthEast());
1532
+ this.getMap().getBounds().getNorthEast());
1528
1533
  } else {
1529
1534
  mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));
1530
1535
  }
@@ -1633,7 +1638,7 @@ MarkerClusterer.BATCH_SIZE_IE = 500;
1633
1638
  * @type {string}
1634
1639
  * @constant
1635
1640
  */
1636
- MarkerClusterer.IMAGE_PATH = "../images/m";
1641
+ MarkerClusterer.IMAGE_PATH = "http://www.garylittle.ca/artwork/mcp/m";
1637
1642
 
1638
1643
 
1639
1644
  /**
@@ -1,5 +1,5 @@
1
1
  module Markerclustererplus
2
2
  module Rails
3
- VERSION = "2.1.2.1"
3
+ VERSION = "2.1.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markerclustererplus-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2.1
4
+ version: 2.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - RogerE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-14 00:00:00.000000000 Z
11
+ date: 2018-02-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem provides the MarkerClustererPlus assets for your Rails application.
14
14
  email:
@@ -49,7 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
49
  version: '0'
50
50
  requirements: []
51
51
  rubyforge_project: markerclustererplus-rails
52
- rubygems_version: 2.6.3
52
+ rubygems_version: 2.7.2
53
53
  signing_key:
54
54
  specification_version: 4
55
55
  summary: Use MarkerClustererPlus with Rails Asset Pipeline