diff --git a/src/ol/render/webgl/webglreplay.js b/src/ol/render/webgl/webglreplay.js index 0864f811d2..3bfbe613fa 100644 --- a/src/ol/render/webgl/webglreplay.js +++ b/src/ol/render/webgl/webglreplay.js @@ -506,7 +506,6 @@ ol.render.webgl.ImageReplay.prototype.setImageStyle = function(imageStyle) { goog.asserts.assert(!goog.isNull(anchor)); var image = imageStyle.getImage(1); goog.asserts.assert(!goog.isNull(image)); - // FIXME getImageSize does not exist for circles var imageSize = imageStyle.getImageSize(); goog.asserts.assert(!goog.isNull(imageSize)); var opacity = imageStyle.getOpacity(); diff --git a/src/ol/style/circlestyle.js b/src/ol/style/circlestyle.js index 0d209ba876..6c3490e17e 100644 --- a/src/ol/style/circlestyle.js +++ b/src/ol/style/circlestyle.js @@ -137,6 +137,14 @@ ol.style.Circle.prototype.getImageState = function() { }; +/** + * @inheritDoc + */ +ol.style.Circle.prototype.getImageSize = function() { + return this.size_; +}; + + /** * @inheritDoc * @api diff --git a/src/ol/style/imagestyle.js b/src/ol/style/imagestyle.js index 35c3a3ac16..bf306ab65c 100644 --- a/src/ol/style/imagestyle.js +++ b/src/ol/style/imagestyle.js @@ -132,6 +132,12 @@ ol.style.Image.prototype.getImage = goog.abstractMethod; ol.style.Image.prototype.getImageState = goog.abstractMethod; +/** + * @return {ol.Size} Image size. + */ +ol.style.Image.prototype.getImageSize = goog.abstractMethod; + + /** * @param {number} pixelRatio Pixel ratio. * @return {HTMLCanvasElement|HTMLVideoElement|Image} Image element. diff --git a/src/ol/style/regularshapestyle.js b/src/ol/style/regularshapestyle.js index 74850f1225..526724ee2e 100644 --- a/src/ol/style/regularshapestyle.js +++ b/src/ol/style/regularshapestyle.js @@ -147,6 +147,14 @@ ol.style.RegularShape.prototype.getImage = function(pixelRatio) { }; +/** + * @inheritDoc + */ +ol.style.RegularShape.prototype.getImageSize = function() { + return this.size_; +}; + + /** * @inheritDoc */