From 4f45bbc05d3defd05fb691f7956d702cc4143c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 21 Sep 2015 20:44:32 +0200 Subject: [PATCH 1/2] ol.style.Stroke has no "opacity" option --- examples/feature-animation.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/feature-animation.js b/examples/feature-animation.js index 00d97d98fc..8295ec745d 100644 --- a/examples/feature-animation.js +++ b/examples/feature-animation.js @@ -72,8 +72,7 @@ function flash(feature) { snapToPixel: false, stroke: new ol.style.Stroke({ color: 'rgba(255, 0, 0, ' + opacity + ')', - width: 1, - opacity: opacity + width: 1 }) }); From 167480bde6996b58e2e68c5e8cfbe5ad88df9adf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 21 Sep 2015 20:44:52 +0200 Subject: [PATCH 2/2] context.fillStyle should be a string The value we set context.fillStyle to should always be a string. This commit fixes a bug in circlestyle.js where we did set context.fillStyle to an array instead of a string. --- src/ol/style/circlestyle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/style/circlestyle.js b/src/ol/style/circlestyle.js index 57bb47061a..e9d7a2e9ab 100644 --- a/src/ol/style/circlestyle.js +++ b/src/ol/style/circlestyle.js @@ -405,7 +405,7 @@ ol.style.Circle.prototype.drawHitDetectionCanvas_ = renderOptions.size / 2, renderOptions.size / 2, this.radius_, 0, 2 * Math.PI, true); - context.fillStyle = ol.render.canvas.defaultFillStyle; + context.fillStyle = ol.color.asString(ol.render.canvas.defaultFillStyle); context.fill(); if (!goog.isNull(this.stroke_)) { context.strokeStyle = renderOptions.strokeStyle;