@masterportal/masterportalapi 2.26.0 → 2.27.0
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/CHANGELOG.md +19 -0
- package/package.json +1 -1
- package/src/vectorStyle/styleList.js +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
|
|
4
4
|
The [Semantic Versioning](https://semver.org/spec/v2.0.0.html) is used.
|
|
5
5
|
|
|
6
|
+
### Unreleased - in development
|
|
7
|
+
## Added
|
|
8
|
+
## Changed
|
|
9
|
+
## Deprecated
|
|
10
|
+
## Removed
|
|
11
|
+
## Fixed
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
### 2.27.0 - 2023-08-31
|
|
16
|
+
## Added
|
|
17
|
+
## Changed
|
|
18
|
+
- VectorStyle: 'initializeStyleList' is asynchron, waits for loading finished and returns the loaded styles.
|
|
19
|
+
## Deprecated
|
|
20
|
+
## Removed
|
|
21
|
+
## Fixed
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
6
25
|
### 2.26.0 - 2023-08-23
|
|
7
26
|
## Changed
|
|
8
27
|
- The following packages have been updated:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterportal/masterportalapi",
|
|
3
3
|
"author": "Implementierungspartnerschaft Masterportal <info@masterportal.org> (https://www.masterportal.org)",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.27.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Basic functions of the Masterportal as api",
|
|
7
7
|
"repository": {
|
|
@@ -214,9 +214,9 @@ function parseStyles (data) {
|
|
|
214
214
|
* @param {array} [layers] - an array with the configured layers
|
|
215
215
|
* @param {array} [tools] - an array with the configured tools
|
|
216
216
|
* @param {function} [callback] - called with services after loaded; called with false and error on error
|
|
217
|
-
* @returns {
|
|
217
|
+
* @returns {array} the list of styles
|
|
218
218
|
*/
|
|
219
|
-
function initializeStyleList (styleGetters, Config, layers, tools, callback) {
|
|
219
|
+
async function initializeStyleList (styleGetters, Config, layers, tools, callback) {
|
|
220
220
|
configuredLayers = layers;
|
|
221
221
|
configuredTools = tools;
|
|
222
222
|
|
|
@@ -230,7 +230,7 @@ function initializeStyleList (styleGetters, Config, layers, tools, callback) {
|
|
|
230
230
|
styleConf = Config.styleConf;
|
|
231
231
|
featureViaUrlLayers = Config.featureViaURL?.layers;
|
|
232
232
|
|
|
233
|
-
fetch(styleConf)
|
|
233
|
+
await fetch(styleConf)
|
|
234
234
|
.then(response => response.json())
|
|
235
235
|
.then(data => {
|
|
236
236
|
styleList = parseStyles(data);
|
|
@@ -239,6 +239,7 @@ function initializeStyleList (styleGetters, Config, layers, tools, callback) {
|
|
|
239
239
|
console.error(error);
|
|
240
240
|
callback(false, true);
|
|
241
241
|
});
|
|
242
|
+
return styleList;
|
|
242
243
|
}
|
|
243
244
|
|
|
244
245
|
/**
|