markerclustererplus-rails 2.0.16 → 2.0.16.1

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
2
  SHA1:
3
- metadata.gz: 1be49395941d961b1fd2240d44acc26ebdd2272a
4
- data.tar.gz: 2682daca5b400f2a8c911c01cafb0f42b384837f
3
+ metadata.gz: 02a300d6483702597fddc1e4196a765d5ad7ddaf
4
+ data.tar.gz: fb04716ed8084220b523ddf2946ace788bc26328
5
5
  SHA512:
6
- metadata.gz: 4dd7079e75a5207ab6833ac742e03d52a4f98833ca0893e2b2b464aa37778bf9b4c99ba826d2b780024ef566136d69bf452fb13c2af97dcf1560a2ee1e686d14
7
- data.tar.gz: 4ee8df2ea96dd4ced37bcfb31399146f44ff053f42078bf0d798c0c4cec6ee0c75cf631bb259eb2fe3b1fd41e72ce0c58ebb3c7fe84a0b19ddb9e07de0d0207b
6
+ metadata.gz: d3518b1e9e7ea1e9d40f24fe8efb2a0d656373522bdfb24c62333dd3cbf713582c4bfb804df8377ba34ec90ca1d3e419f24147120b6911f0baa2ebaf3ea70783
7
+ data.tar.gz: 3a7f34bdb88bc5c1a05bd64901e6c1b7423184041f3c7d3f29e500be6ebf6f8bea8fe8f04f78654ea4884fbf780de42cc372821423a2d5affceba4546afff02c
data/README.md CHANGED
@@ -31,7 +31,6 @@ Note that to include the MarkerClustererPlus icons in the asset pipeline we over
31
31
 
32
32
  * imageExtension
33
33
  * imagePath
34
- * imageSizes
35
34
 
36
35
  This should not be a problem since the reason to using this gem in the first place is to include everything in the asset pipeline. Should you for some reason want to get the icons from somewhere else it should be possible to override this with the 'styles' property, although we have not tested this ourself.
37
36
 
@@ -28,7 +28,14 @@
28
28
  /**
29
29
  * This file modified for use with the Rails asset pipeline
30
30
  * https://github.com/RogerE/markerclustererplus-rails
31
+ * gem markerclustererplus-rails
32
+ * gem version 2.0.16.1
31
33
  * @author Roger Ertesvag
34
+ * NOTE: to include the MarkerClustererPlus icons in the asset pipeline the gem overrides
35
+ * the original configuration for setting the icon properties. This means that changing
36
+ * the following properties will not have any effect when using the gem:
37
+ * imageExtension
38
+ * imagePath
32
39
  */
33
40
 
34
41
  /**
@@ -812,8 +819,13 @@ MarkerClusterer.prototype.draw = function () {};
812
819
 
813
820
  /**
814
821
  * Sets up the styles object.
822
+ */
815
823
  MarkerClusterer.prototype.setupStyles_ = function () {
816
824
  var i, size;
825
+ // START rails modification
826
+ var icons = ['<%= asset_path 'markerclusterer/m1.png' %>', '<%= asset_path 'markerclusterer/m2.png' %>', '<%= asset_path 'markerclusterer/m3.png' %>', '<%= asset_path 'markerclusterer/m4.png' %>', '<%= asset_path 'markerclusterer/m5.png' %>'];
827
+ // END rails modification
828
+
817
829
  if (this.styles_.length > 0) {
818
830
  return;
819
831
  }
@@ -821,31 +833,12 @@ MarkerClusterer.prototype.setupStyles_ = function () {
821
833
  for (i = 0; i < this.imageSizes_.length; i++) {
822
834
  size = this.imageSizes_[i];
823
835
  this.styles_.push({
836
+ // START rails modification
837
+ url: MarkerClusterer.IMAGE_HOST + 'assets' + icons[i].split('assets').slice(-1)[0],
838
+ /*
824
839
  url: this.imagePath_ + (i + 1) + "." + this.imageExtension_,
825
- height: size,
826
- width: size
827
- });
828
- }
829
- };
830
- */
831
-
832
-
833
- /**
834
- * Sets up the styles object.
835
- */
836
- MarkerClusterer.prototype.setupStyles_ = function () {
837
- var i, size;
838
- if (this.styles_.length > 0) {
839
- return;
840
- }
841
-
842
- var icons = ['<%= asset_path 'markerclusterer/m1.png' %>', '<%= asset_path 'markerclusterer/m2.png' %>', '<%= asset_path 'markerclusterer/m3.png' %>', '<%= asset_path 'markerclusterer/m4.png' %>', '<%= asset_path 'markerclusterer/m5.png' %>'];
843
- var sizes = [53, 56, 66, 78, 90];
844
-
845
- for (i = 0; i < icons.length; i++) {
846
- size = sizes[i];
847
- this.styles_.push({
848
- url: icons[i],
840
+ */
841
+ // END rails modification
849
842
  height: size,
850
843
  width: size
851
844
  });
@@ -1671,3 +1664,10 @@ MarkerClusterer.IMAGE_EXTENSION = "png";
1671
1664
  * @constant
1672
1665
  */
1673
1666
  MarkerClusterer.IMAGE_SIZES = [53, 56, 66, 78, 90];
1667
+
1668
+ // START rails modification
1669
+ // get host js file is served from
1670
+ var scriptList = document.getElementsByTagName('script');
1671
+ var thisScriptSource=scriptList[scriptList.length-1].getAttribute("src");
1672
+ MarkerClusterer.IMAGE_HOST = thisScriptSource.split('assets')[0];
1673
+ // END rails modification
@@ -1,5 +1,5 @@
1
1
  module Markerclustererplus
2
2
  module Rails
3
- VERSION = "2.0.16"
3
+ VERSION = "2.0.16.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.0.16
4
+ version: 2.0.16.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-11-06 00:00:00.000000000 Z
11
+ date: 2013-11-10 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.1.9
52
+ rubygems_version: 2.1.10
53
53
  signing_key:
54
54
  specification_version: 4
55
55
  summary: Use MarkerClustererPlus with Rails Asset Pipeline