diff --git a/src/ol/format/kmlformat.js b/src/ol/format/kmlformat.js index 3e1e4c39a8..d9edd33d54 100644 --- a/src/ol/format/kmlformat.js +++ b/src/ol/format/kmlformat.js @@ -654,6 +654,9 @@ ol.format.KML.IconStyleParser_ = function(node, objectStack) { (object['scale']); if (src == ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_) { size = ol.format.KML.DEFAULT_IMAGE_STYLE_SIZE_; + if (scale === undefined) { + scale = ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_; + } } var imageStyle = new ol.style.Icon({ @@ -665,7 +668,7 @@ ol.format.KML.IconStyleParser_ = function(node, objectStack) { offset: offset, offsetOrigin: ol.style.IconOrigin.BOTTOM_LEFT, rotation: rotation, - scale: ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_ * scale, + scale: scale, size: size, src: src }); diff --git a/test/spec/ol/format/kmlformat.test.js b/test/spec/ol/format/kmlformat.test.js index 007c53c840..72c642de83 100644 --- a/test/spec/ol/format/kmlformat.test.js +++ b/test/spec/ol/format/kmlformat.test.js @@ -1337,6 +1337,7 @@ describe('ol.format.KML', function() { expect(imageStyle.getOrigin()).to.be(null); expect(imageStyle.getRotation()).to.eql(0); expect(imageStyle.getSize()).to.be(null); + expect(imageStyle.getScale()).to.be(1); expect(style.getText()).to.be(ol.format.KML.DEFAULT_TEXT_STYLE_); expect(style.getZIndex()).to.be(undefined); }); @@ -1348,6 +1349,7 @@ describe('ol.format.KML', function() { ' ' + '