@igo2/geo 20.1.0-next.26 → 20.1.0-next.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2022/igo2-geo.mjs
CHANGED
|
@@ -2062,7 +2062,7 @@ class DataSource {
|
|
|
2062
2062
|
legend;
|
|
2063
2063
|
get saveableOptions() {
|
|
2064
2064
|
return {
|
|
2065
|
-
id: this.
|
|
2065
|
+
id: this.id,
|
|
2066
2066
|
type: this.options.type,
|
|
2067
2067
|
url: this.options.url
|
|
2068
2068
|
};
|
|
@@ -2073,7 +2073,7 @@ class DataSource {
|
|
|
2073
2073
|
this.options = options;
|
|
2074
2074
|
this.dataService = dataService;
|
|
2075
2075
|
this.options = options;
|
|
2076
|
-
this.id = this.options.id
|
|
2076
|
+
this.id = this.options.id ?? this.generateId();
|
|
2077
2077
|
this.ol = this.createOlSource();
|
|
2078
2078
|
}
|
|
2079
2079
|
generateId() {
|
|
@@ -11879,7 +11879,7 @@ function mergeLayersOptions(layersOptionsTree, layersOptions) {
|
|
|
11879
11879
|
return;
|
|
11880
11880
|
const currentNode = _getNodeById(identifier, tree) ?? _getNodeByTitle(options.title, tree);
|
|
11881
11881
|
if (currentNode) {
|
|
11882
|
-
// if
|
|
11882
|
+
// if the currentNode is find by title (See below), we update the id of current layer.
|
|
11883
11883
|
if (isLayerGroupOptions(currentNode) &&
|
|
11884
11884
|
currentNode.id.toString().includes(ID_GROUP_PREFIX)) {
|
|
11885
11885
|
currentNode.id = identifier;
|
|
@@ -11925,12 +11925,9 @@ function handleExternalDataSource(options) {
|
|
|
11925
11925
|
};
|
|
11926
11926
|
}
|
|
11927
11927
|
function getLayerOptionIdentifier(layerOptions) {
|
|
11928
|
-
return
|
|
11928
|
+
return layerOptions.id
|
|
11929
11929
|
? String(layerOptions.id)
|
|
11930
|
-
:
|
|
11931
|
-
(layerOptions.id !== undefined
|
|
11932
|
-
? layerOptions.id.toString()
|
|
11933
|
-
: undefined));
|
|
11930
|
+
: getLayerParam(layerOptions);
|
|
11934
11931
|
}
|
|
11935
11932
|
function moveOptions(tree, initialIdentifier, options) {
|
|
11936
11933
|
removeNode(tree, initialIdentifier);
|