Merge pull request #6856 from oterral/fix_6848

Fix creation of new URL in readSharedStyle_ and readSharedStyleMap_
This commit is contained in:
Andreas Hocevar
2017-05-29 14:32:32 +02:00
committed by GitHub
+2 -2
View File
@@ -1737,7 +1737,7 @@ ol.format.KML.prototype.readSharedStyle_ = function(node, objectStack) {
var style = ol.format.KML.readStyle_(node, objectStack); var style = ol.format.KML.readStyle_(node, objectStack);
if (style) { if (style) {
var styleUri; var styleUri;
if (node.baseURI) { if (node.baseURI && node.baseURI !== 'about:blank') {
var url = new URL('#' + id, node.baseURI); var url = new URL('#' + id, node.baseURI);
styleUri = url.href; styleUri = url.href;
} else { } else {
@@ -1764,7 +1764,7 @@ ol.format.KML.prototype.readSharedStyleMap_ = function(node, objectStack) {
return; return;
} }
var styleUri; var styleUri;
if (node.baseURI) { if (node.baseURI && node.baseURI !== 'about:blank') {
var url = new URL('#' + id, node.baseURI); var url = new URL('#' + id, node.baseURI);
styleUri = url.href; styleUri = url.href;
} else { } else {