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';
|
'https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png';
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @const
|
||||||
|
* @type {number}
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_ = 0.5
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @const
|
* @const
|
||||||
* @type {ol.style.Image}
|
* @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_,
|
anchorYUnits: ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS_,
|
||||||
crossOrigin: 'anonymous',
|
crossOrigin: 'anonymous',
|
||||||
rotation: 0,
|
rotation: 0,
|
||||||
scale: 0.5,
|
scale: ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_,
|
||||||
size: ol.format.KML.DEFAULT_IMAGE_STYLE_SIZE_,
|
size: ol.format.KML.DEFAULT_IMAGE_STYLE_SIZE_,
|
||||||
src: ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_
|
src: ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_
|
||||||
});
|
});
|
||||||
@@ -551,7 +559,7 @@ ol.format.KML.IconStyleParser_ = function(node, objectStack) {
|
|||||||
offset: offset,
|
offset: offset,
|
||||||
offsetOrigin: ol.style.IconOrigin.BOTTOM_LEFT,
|
offsetOrigin: ol.style.IconOrigin.BOTTOM_LEFT,
|
||||||
rotation: rotation,
|
rotation: rotation,
|
||||||
scale: scale,
|
scale: ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_ * scale,
|
||||||
size: size,
|
size: size,
|
||||||
src: src
|
src: src
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user