diff --git a/src/ol/format/kmlformat.js b/src/ol/format/kmlformat.js index 3cf88b9e19..6cd5f7b7ea 100644 --- a/src/ol/format/kmlformat.js +++ b/src/ol/format/kmlformat.js @@ -203,6 +203,14 @@ ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_ = 'https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png'; +/** + * @const + * @type {number} + * @private + */ +ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_ = 0.5 + + /** * @const * @type {ol.style.Image} @@ -215,7 +223,7 @@ ol.format.KML.DEFAULT_IMAGE_STYLE_ = new ol.style.Icon({ anchorYUnits: ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS_, crossOrigin: 'anonymous', rotation: 0, - scale: 0.5, + scale: ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_, size: ol.format.KML.DEFAULT_IMAGE_STYLE_SIZE_, src: ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_ }); @@ -551,7 +559,7 @@ ol.format.KML.IconStyleParser_ = function(node, objectStack) { offset: offset, offsetOrigin: ol.style.IconOrigin.BOTTOM_LEFT, rotation: rotation, - scale: scale, + scale: ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_ * scale, size: size, src: src });