diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index 5b4551035f..96eb136447 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -2580,7 +2580,7 @@ function writeLineStyle(node, style, objectStack) { const /** @type {import("../xml.js").NodeStackItem} */ context = {node: node}; const properties = { 'color': style.getColor(), - 'width': style.getWidth() + 'width': Number(style.getWidth()) || 1 }; const parentNode = objectStack[objectStack.length - 1].node; const orderedKeys = LINE_STYLE_SEQUENCE[parentNode.namespaceURI];