From 9a698ce1e88cb7fadc25289c4f9082dcdd98654d Mon Sep 17 00:00:00 2001 From: oterral Date: Mon, 29 May 2017 09:49:04 +0200 Subject: [PATCH] Fix creation of new URL in readSharedStyle_ and readSharedStyleMap_ --- src/ol/format/kml.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/format/kml.js b/src/ol/format/kml.js index 174e59cdf8..cefbde6d71 100644 --- a/src/ol/format/kml.js +++ b/src/ol/format/kml.js @@ -1737,7 +1737,7 @@ ol.format.KML.prototype.readSharedStyle_ = function(node, objectStack) { var style = ol.format.KML.readStyle_(node, objectStack); if (style) { var styleUri; - if (node.baseURI) { + if (node.baseURI && node.baseURI !== 'about:blank') { var url = new URL('#' + id, node.baseURI); styleUri = url.href; } else { @@ -1764,7 +1764,7 @@ ol.format.KML.prototype.readSharedStyleMap_ = function(node, objectStack) { return; } var styleUri; - if (node.baseURI) { + if (node.baseURI && node.baseURI !== 'about:blank') { var url = new URL('#' + id, node.baseURI); styleUri = url.href; } else {