From a691dd9459cec8eb3c5ae3e0890085267dcf20e4 Mon Sep 17 00:00:00 2001 From: Albert Cornelissen Date: Wed, 9 Dec 2015 09:23:08 +0200 Subject: [PATCH 1/2] Update location of closure compiler externals. --- src/markerclusterer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/markerclusterer.js b/src/markerclusterer.js index a31e3a9..4efc377 100755 --- a/src/markerclusterer.js +++ b/src/markerclusterer.js @@ -1,6 +1,6 @@ // ==ClosureCompiler== // @compilation_level ADVANCED_OPTIMIZATIONS -// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3_3.js +// @externs_url https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/maps/google_maps_api_v3.js // ==/ClosureCompiler== /** From c26ffebb17420af9b7aeb4e1a6b9df2c08528bc9 Mon Sep 17 00:00:00 2001 From: Albert Cornelissen Date: Wed, 9 Dec 2015 09:25:47 +0200 Subject: [PATCH 2/2] Set background-size of cluster icons as well. This allows for one image size to be used for custom icons (and allows for nicer rendering on high-res displays). --- src/markerclusterer.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/markerclusterer.js b/src/markerclusterer.js index 4efc377..3b727b5 100755 --- a/src/markerclusterer.js +++ b/src/markerclusterer.js @@ -1216,7 +1216,9 @@ ClusterIcon.prototype.createCss = function(pos) { var style = []; style.push('background-image:url(' + this.url_ + ');'); var backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0'; + var backgroundSize = this.width_ > this.height_ ? this.width_ : this.height_; style.push('background-position:' + backgroundPosition + ';'); + style.push('background-size:' + backgroundSize + 'px;'); if (typeof this.anchor_ === 'object') { if (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 &&