scale icons by 0.5 so they are not huge
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user