scale icons by 0.5 so they are not huge

This commit is contained in:
Tamar Cohen
2015-10-21 14:30:14 -07:00
parent 78a961e6ef
commit 79d803aba8

View File

@@ -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
});