Merge pull request #6856 from oterral/fix_6848
Fix creation of new URL in readSharedStyle_ and readSharedStyleMap_
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user