Merge pull request #7032 from raiyni/icon-fix
Fix KML Export Icon Anchor
This commit is contained in:
@@ -2260,7 +2260,7 @@ ol.format.KML.writeIconStyle_ = function(node, style, objectStack) {
|
|||||||
iconProperties['y'] = iconImageSize[1] - (origin[1] + size[1]);
|
iconProperties['y'] = iconImageSize[1] - (origin[1] + size[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (anchor && anchor[0] !== 0 && anchor[1] !== size[1]) {
|
if (anchor && (anchor[0] !== size[0] / 2 || anchor[1] !== size[1] / 2)) {
|
||||||
var /** @type {ol.KMLVec2_} */ hotSpot = {
|
var /** @type {ol.KMLVec2_} */ hotSpot = {
|
||||||
x: anchor[0],
|
x: anchor[0],
|
||||||
xunits: ol.style.IconAnchorUnits.PIXELS,
|
xunits: ol.style.IconAnchorUnits.PIXELS,
|
||||||
|
|||||||
Reference in New Issue
Block a user