markerclustererplus-rails 2.1.2 → 2.1.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c53de974b2bb247038c523cad343287792ae6e6
4
- data.tar.gz: b1f11fe870401d0af7f5d77da5ecf9fd2cfe6be1
3
+ metadata.gz: e01fa4113710b0713668ac6edb970852336cc0c4
4
+ data.tar.gz: 2f626e208f7393bd03d2dc9b670edd148fcd7d58
5
5
  SHA512:
6
- metadata.gz: bac324b2c147f2749fbfe77a962319467debfe8843bfdc8fa7f91f893d44142a9f9a00789d24872bac1e64d0e6bf9c77989082c9f3c70cfac97777c0028585f0
7
- data.tar.gz: 971aa9c4df3e9ce908a49df9f3584d9bc191991c3bfe3f93b93278f26c2aa26b5dde8f9aeb72403eeca00af7e78c5342155e302a7bf407dac3a5f72a7337c903
6
+ metadata.gz: bbe4a251dfd4422b3d178296fa4f1adbe972e03575602972fb458591f37c8aa53bf5891c019b772426bc896053baefbaa87cbba576f0d9dfccf994267bec26ff
7
+ data.tar.gz: 6759da27d20038fc2deb8cb38e60708d7516570bacb6f83871ea33af8b8c679f4791f8f928db1173afb23f8780d02d3b6a83c0f4223c7c9be54a181ed9d8c686
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.1.2/docs/reference.html)
8
+ [MarkerClustererPlus for Google Maps V3](https://htmlpreview.github.io/?https://github.com/googlemaps/v3-utility-library/blob/master/markerclustererplus/docs/reference.html)
9
9
 
10
10
  MarkerClustererPlus is an enhanced Google Maps V3 implementation of the V2 MarkerClusterer.
11
11
 
@@ -17,7 +17,7 @@ In your Gemfile, add this line:
17
17
  gem 'markerclustererplus-rails'
18
18
  ```
19
19
 
20
- You can include it by adding the following to your javascript file:
20
+ You can include it by adding the following to your javascript application file:
21
21
 
22
22
  ```javascript
23
23
  //= require markerclusterer
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @name MarkerClustererPlus for Google Maps V3
3
- * @version 2.1.1 [November 4, 2013]
3
+ * @version 2.1.2 [May 28, 2014]
4
4
  * @author Gary Little
5
5
  * @fileoverview
6
6
  * The library creates and manages per-zoom-level clusters for large amounts of markers.
@@ -25,7 +25,7 @@
25
25
  * This file modified for use with the Rails asset pipeline
26
26
  * https://github.com/RogerE/markerclustererplus-rails
27
27
  * gem markerclustererplus-rails
28
- * gem version 2.1.2
28
+ * gem version 2.1.2.1
29
29
  * @author Roger Ertesvag
30
30
  * NOTE: to include the MarkerClustererPlus icons in the asset pipeline the gem overrides
31
31
  * the original configuration for setting the icon properties. This means that changing
@@ -257,8 +257,8 @@ ClusterIcon.prototype.show = function () {
257
257
  var img = "";
258
258
  // NOTE: values must be specified in px units
259
259
  var bp = this.backgroundPosition_.split(" ");
260
- var spriteH = parseInt(bp[0].trim(), 10);
261
- var spriteV = parseInt(bp[1].trim(), 10);
260
+ var spriteH = parseInt(bp[0].replace(/^\s+|\s+$/g, ""), 10);
261
+ var spriteV = parseInt(bp[1].replace(/^\s+|\s+$/g, ""), 10);
262
262
  var pos = this.getPosFromLatLng_(this.center_);
263
263
  this.div_.style.cssText = this.createCss(pos);
264
264
  img = "<img src='" + this.url_ + "' style='position: absolute; top: " + spriteV + "px; left: " + spriteH + "px; ";
@@ -1215,7 +1215,7 @@ MarkerClusterer.prototype.addMarkers = function (markers, opt_nodraw) {
1215
1215
  if (markers.hasOwnProperty(key)) {
1216
1216
  this.pushMarkerTo_(markers[key]);
1217
1217
  }
1218
- }
1218
+ }
1219
1219
  if (!opt_nodraw) {
1220
1220
  this.redraw_();
1221
1221
  }
@@ -1429,14 +1429,14 @@ MarkerClusterer.prototype.resetViewport_ = function (opt_hide) {
1429
1429
  * @param {google.maps.LatLng} p2 The second lat lng point.
1430
1430
  * @return {number} The distance between the two points in km.
1431
1431
  * @see http://www.movable-type.co.uk/scripts/latlong.html
1432
- */
1432
+ */
1433
1433
  MarkerClusterer.prototype.distanceBetweenPoints_ = function (p1, p2) {
1434
1434
  var R = 6371; // Radius of the Earth in km
1435
1435
  var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;
1436
1436
  var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;
1437
1437
  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);
1438
+ Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) *
1439
+ Math.sin(dLon / 2) * Math.sin(dLon / 2);
1440
1440
  var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
1441
1441
  var d = R * c;
1442
1442
  return d;
@@ -1524,7 +1524,7 @@ MarkerClusterer.prototype.createClusters_ = function (iFirst) {
1524
1524
  // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug:
1525
1525
  if (this.getMap().getZoom() > 3) {
1526
1526
  mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),
1527
- this.getMap().getBounds().getNorthEast());
1527
+ this.getMap().getBounds().getNorthEast());
1528
1528
  } else {
1529
1529
  mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625));
1530
1530
  }
@@ -1633,7 +1633,7 @@ MarkerClusterer.BATCH_SIZE_IE = 500;
1633
1633
  * @type {string}
1634
1634
  * @constant
1635
1635
  */
1636
- MarkerClusterer.IMAGE_PATH = "http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m";
1636
+ MarkerClusterer.IMAGE_PATH = "../images/m";
1637
1637
 
1638
1638
 
1639
1639
  /**
@@ -1653,16 +1653,6 @@ MarkerClusterer.IMAGE_EXTENSION = "png";
1653
1653
  */
1654
1654
  MarkerClusterer.IMAGE_SIZES = [53, 56, 66, 78, 90];
1655
1655
 
1656
- if (typeof String.prototype.trim !== 'function') {
1657
- /**
1658
- * IE hack since trim() doesn't exist in all browsers
1659
- * @return {string} The string with removed whitespace
1660
- */
1661
- String.prototype.trim = function() {
1662
- return this.replace(/^\s+|\s+$/g, '');
1663
- }
1664
- }
1665
-
1666
1656
  // START rails modification
1667
1657
  // get host js file is served from
1668
1658
  var scriptList = document.getElementsByTagName('script');
@@ -1,5 +1,5 @@
1
1
  module Markerclustererplus
2
2
  module Rails
3
- VERSION = "2.1.2"
3
+ VERSION = "2.1.2.1"
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
4
+ version: 2.1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - RogerE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-03 00:00:00.000000000 Z
11
+ date: 2016-06-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem provides the MarkerClustererPlus assets for your Rails application.
14
14
  email:
@@ -17,7 +17,7 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
- - .gitignore
20
+ - ".gitignore"
21
21
  - Gemfile
22
22
  - README.md
23
23
  - Rakefile
@@ -39,17 +39,17 @@ require_paths:
39
39
  - lib
40
40
  required_ruby_version: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - '>='
42
+ - - ">="
43
43
  - !ruby/object:Gem::Version
44
44
  version: '0'
45
45
  required_rubygems_version: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - '>='
47
+ - - ">="
48
48
  - !ruby/object:Gem::Version
49
49
  version: '0'
50
50
  requirements: []
51
51
  rubyforge_project: markerclustererplus-rails
52
- rubygems_version: 2.1.11
52
+ rubygems_version: 2.6.3
53
53
  signing_key:
54
54
  specification_version: 4
55
55
  summary: Use MarkerClustererPlus with Rails Asset Pipeline