markerclustererplus-rails 2.0.12 → 2.0.13

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/trunk/markerclustererplus/docs/reference.html)
8
+ [MarkerClustererPlus for Google Maps V3](http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.13/docs/reference.html)
9
9
 
10
10
  MarkerClustererPlus is an enhanced Google Maps V3 implementation of the V2 MarkerClusterer.
11
11
 
@@ -1,5 +1,5 @@
1
1
  module Markerclustererplus
2
2
  module Rails
3
- VERSION = "2.0.12"
3
+ VERSION = "2.0.13"
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.12 [April 21, 2012]
6
+ * @version 2.0.13 [May 8, 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.
@@ -92,6 +92,9 @@
92
92
  * @property {string} text The text of the label to be shown on the cluster icon.
93
93
  * @property {number} index The index plus 1 of the element in the <code>styles</code>
94
94
  * array to be used to style the cluster icon.
95
+ * @property {string} title The tooltip to display when the mouse moves over the cluster icon.
96
+ * If this value is <code>undefined</code> or <code>""</code>, <code>title</code> is set to the
97
+ * value of the <code>title</code> property passed to the MarkerClusterer.
95
98
  */
96
99
  /**
97
100
  * A cluster icon.
@@ -257,7 +260,11 @@ ClusterIcon.prototype.show = function () {
257
260
  } else {
258
261
  this.div_.innerHTML = this.sums_.text;
259
262
  }
260
- this.div_.title = this.cluster_.getMarkerClusterer().getTitle();
263
+ if (typeof this.sums_.title === "undefined" || this.sums_.title === "") {
264
+ this.div_.title = this.cluster_.getMarkerClusterer().getTitle();
265
+ } else {
266
+ this.div_.title = this.sums_.title;
267
+ }
261
268
  this.div_.style.display = "";
262
269
  }
263
270
  this.visible_ = true;
@@ -616,7 +623,8 @@ Cluster.prototype.isMarkerAlreadyAdded_ = function (marker) {
616
623
  * set to <code>true</code> if the <code>url</code> fields in the <code>styles</code> array
617
624
  * refer to image sprite files.
618
625
  * @property {string} [title=""] The tooltip to display when the mouse moves over a cluster
619
- * marker.
626
+ * marker. (Alternatively, you can use a custom <code>calculator</code> function to specify a
627
+ * different tooltip for each cluster marker.)
620
628
  * @property {function} [calculator=MarkerClusterer.CALCULATOR] The function used to determine
621
629
  * the text to be displayed on a cluster marker and the index indicating which style to use
622
630
  * for the cluster marker. The input parameters for the function are (1) the array of markers
@@ -629,7 +637,10 @@ Cluster.prototype.isMarkerAlreadyAdded_ = function (marker) {
629
637
  * <code>index</code> minus 1. For example, the default <code>calculator</code> returns a
630
638
  * <code>text</code> value of <code>"125"</code> and an <code>index</code> of <code>3</code>
631
639
  * for a cluster icon representing 125 markers so the element used in the <code>styles</code>
632
- * array is <code>2</code>.
640
+ * array is <code>2</code>. A <code>calculator</code> may also return a <code>title</code>
641
+ * property that contains the text of the tooltip to be used for the cluster marker. If
642
+ * <code>title</code> is not defined, the tooltip is set to the value of the <code>title</code>
643
+ * property for the MarkerClusterer.
633
644
  * @property {string} [clusterClass="cluster"] The name of the CSS class defining general styles
634
645
  * for the cluster markers. Use this class to define CSS styles that are not set up by the code
635
646
  * that processes the <code>styles</code> array.
@@ -1596,6 +1607,7 @@ MarkerClusterer.prototype.extend = function (obj1, obj2) {
1596
1607
  */
1597
1608
  MarkerClusterer.CALCULATOR = function (markers, numStyles) {
1598
1609
  var index = 0;
1610
+ var title = "";
1599
1611
  var count = markers.length.toString();
1600
1612
 
1601
1613
  var dv = count;
@@ -1607,7 +1619,8 @@ MarkerClusterer.CALCULATOR = function (markers, numStyles) {
1607
1619
  index = Math.min(index, numStyles);
1608
1620
  return {
1609
1621
  text: count,
1610
- index: index
1622
+ index: index,
1623
+ title: title
1611
1624
  };
1612
1625
  };
1613
1626
 
metadata CHANGED
@@ -1,33 +1,23 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: markerclustererplus-rails
3
- version: !ruby/object:Gem::Version
4
- hash: 23
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.13
5
5
  prerelease:
6
- segments:
7
- - 2
8
- - 0
9
- - 12
10
- version: 2.0.12
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - RogerE
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-04-23 00:00:00 Z
12
+ date: 2012-05-12 00:00:00.000000000 Z
19
13
  dependencies: []
20
-
21
14
  description: This gem provides the MarkerClustererPlus assets for your Rails application.
22
- email:
15
+ email:
23
16
  - roger@webfokus.no
24
17
  executables: []
25
-
26
18
  extensions: []
27
-
28
19
  extra_rdoc_files: []
29
-
30
- files:
20
+ files:
31
21
  - .gitignore
32
22
  - Gemfile
33
23
  - README.md
@@ -43,36 +33,26 @@ files:
43
33
  - vendor/assets/javascripts/markerclusterer.js.erb
44
34
  homepage: https://github.com/RogerE/markerclustererplus-rails
45
35
  licenses: []
46
-
47
36
  post_install_message:
48
37
  rdoc_options: []
49
-
50
- require_paths:
38
+ require_paths:
51
39
  - lib
52
- required_ruby_version: !ruby/object:Gem::Requirement
40
+ required_ruby_version: !ruby/object:Gem::Requirement
53
41
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
61
- required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
47
  none: false
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- hash: 3
67
- segments:
68
- - 0
69
- version: "0"
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
70
52
  requirements: []
71
-
72
53
  rubyforge_project: markerclustererplus-rails
73
- rubygems_version: 1.8.10
54
+ rubygems_version: 1.8.17
74
55
  signing_key:
75
56
  specification_version: 3
76
57
  summary: Use MarkerClustererPlus with Rails Asset Pipeline
77
58
  test_files: []
78
-