@masterportal/masterportalapi 2.60.0 → 2.61.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 CHANGED
@@ -3,6 +3,23 @@
3
3
 
4
4
  The [Semantic Versioning](https://semver.org/spec/v2.0.0.html) is used.
5
5
 
6
+ ## 2.61.0 - 2026-04-21
7
+
8
+ ### Changed
9
+ - VectorTile with `vtStyles`: `setStyle` is not reading from url, if `options.readStyleFromUrl = false`. Is also passed by `options` in `createLayer`.
10
+ - The following packages have been updated:
11
+ - dependencies:
12
+ - ol-mapbox-style: 12.5.0 to 13.3.0
13
+ - olcs: 2.22.1 to 2.23.0
14
+ - ol: 10.8.0 to 10.9.0
15
+
16
+ ### Removed
17
+ - The following overwrites have been removed:
18
+ - geotiff in ol
19
+ - The unused babel dev dependencies were removed
20
+
21
+ ---
22
+
6
23
  ## 2.60.0 - 2026-04-10
7
24
 
8
25
  ### Added
package/README.md CHANGED
@@ -25,7 +25,3 @@ Both methods may be required for useful user feedback. For example, a WMS may an
25
25
  |``npm run generate-jsdoc``|Generates the project documentation within the folder ``./docs``.|
26
26
  |``npm test``|Runs all tests. Prints code coverage to console.|
27
27
  |``npm run test:watch``|Runs all tests in watch mode. Good practive to let this run during development in a separate terminal. |
28
-
29
- ## About Babel
30
-
31
- The Babel dev dependencies are purely added for development tests and jest tests. Babel is required for testing since Node does not support ES6 in .js files so far.
package/jest.config.js CHANGED
@@ -14,7 +14,7 @@ module.exports = {
14
14
  /** mapping svg to string representation since jest can't handle svg and mapping olcs paths*/
15
15
  "moduleNameMapper": {
16
16
  "marker.svg": "<rootDir>/public/stringMarker.js",
17
- "olcs/lib/olcs/(.*)$": "<rootDir>/node_modules/olcs/lib/olcs/$1",
17
+ "olcs/lib/olcs/util.js": "<rootDir>/node_modules/olcs/lib/olcs/util.js",
18
18
  "ol-mapbox-style$": "<rootDir>/node_modules/ol-mapbox-style/src/$1"
19
19
  },
20
20
  "testEnvironment": "jsdom",
package/package.json CHANGED
@@ -1,26 +1,27 @@
1
1
  {
2
2
  "name": "@masterportal/masterportalapi",
3
- "author": "Implementierungspartnerschaft Masterportal <info@masterportal.org> (https://www.masterportal.org)",
4
- "version": "2.60.0",
5
- "license": "MIT",
3
+ "version": "2.61.0",
6
4
  "description": "Basic functions of the Masterportal as api",
5
+ "homepage": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi#readme",
6
+ "bugs": {
7
+ "url": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi/issues"
8
+ },
7
9
  "repository": {
8
10
  "type": "git",
9
11
  "url": "git+https://bitbucket.org/geowerkstatt-hamburg/masterportalapi.git"
10
12
  },
11
- "source": "src/index.js",
12
- "main": "src/index.js",
13
+ "license": "MIT",
14
+ "author": "Implementierungspartnerschaft Masterportal <info@masterportal.org> (https://www.masterportal.org)",
15
+ "type": "commonjs",
13
16
  "exports": {
14
17
  ".": "./src/index.js",
15
18
  "./src/*": "./src/*"
16
19
  },
17
- "targets": {
18
- "library": {
19
- "source": "src/index.js",
20
- "distDir": "dist",
21
- "outputFormat": "commonjs"
22
- },
23
- "main": false
20
+ "main": "src/index.js",
21
+ "directories": {
22
+ "doc": "docs",
23
+ "example": "example",
24
+ "test": "test"
24
25
  },
25
26
  "scripts": {
26
27
  "test": "jest .test.js --config ./jest.config.js --collectCoverage",
@@ -34,15 +35,13 @@
34
35
  "dependencies": {
35
36
  "core-js": "^3.33.1",
36
37
  "dayjs": "^1.11.10",
37
- "ol": "10.8.0",
38
+ "ol": "10.9.0",
38
39
  "ol-mapbox-style": "13.3.0",
39
- "olcs": "^2.22.1",
40
+ "olcs": "^2.23.0",
40
41
  "proj4": "^2.10.0",
41
42
  "xml2js": "^0.6.2"
42
43
  },
43
44
  "devDependencies": {
44
- "@babel/core": "7.26.0",
45
- "@babel/plugin-transform-modules-commonjs": "^7.23.0",
46
45
  "@parcel/config-default": "^2.15.4",
47
46
  "@parcel/transformer-sass": "^2.15.4",
48
47
  "@swc/jest": "^0.2.39",
@@ -72,22 +71,23 @@
72
71
  "peerDependencies": {
73
72
  "@cesium/engine": "^23.0.0"
74
73
  },
75
- "overrides": {
76
- "ol": {
77
- "geotiff": "^2.1.3"
78
- }
79
- },
80
74
  "engines": {
81
75
  "node": "^22.19.0 || ^24.11.1",
82
76
  "npm": "^10.5.0 || ^11.6.2"
83
77
  },
84
- "homepage": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi#readme",
85
- "directories": {
86
- "doc": "docs",
87
- "example": "example",
88
- "test": "test"
78
+ "source": "src/index.js",
79
+ "targets": {
80
+ "library": {
81
+ "source": "src/index.js",
82
+ "distDir": "dist",
83
+ "outputFormat": "commonjs"
84
+ },
85
+ "main": false
89
86
  },
90
- "bugs": {
91
- "url": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi/issues"
87
+ "@parcel/resolver-default": {
88
+ "packageExports": true
89
+ },
90
+ "alias": {
91
+ "olcs/lib/olcs/util.js": "./node_modules/olcs/lib/olcs/util.js"
92
92
  }
93
93
  }
package/publiccode.yml CHANGED
@@ -81,8 +81,8 @@ maintenance:
81
81
  name: Masterportal
82
82
  platforms:
83
83
  - web
84
- releaseDate: '2026-04-10'
84
+ releaseDate: '2026-04-21'
85
85
  roadmap: 'https://bitbucket.org/geowerkstatt-hamburg/masterportalapi/src/master/'
86
86
  softwareType: api
87
- softwareVersion: 2.60.0
87
+ softwareVersion: 2.61.0
88
88
  url: 'https://bitbucket.org/geowerkstatt-hamburg/masterportalapi.git'
@@ -141,7 +141,9 @@ export function createLayerSource (url, options = {}) {
141
141
  * @returns {void}
142
142
  */
143
143
  export function setStyle (layer, glStyle, {options = {}} = {}, url) {
144
- if (url) {
144
+ const readStyleFromUrl = typeof options.readStyleFromUrl === "boolean" ? options.readStyleFromUrl : true;
145
+
146
+ if (url && readStyleFromUrl) {
145
147
  fetch(url)
146
148
  .then(response => response.json())
147
149
  .then(style => {
@@ -224,7 +226,7 @@ export function createLayer (rawLayer = {}, {layerParams = {}, options = {}} = {
224
226
  if (rawLayer.vtStyles) {
225
227
  const vtStyle = rawLayer.vtStyles.filter((style) => style.defaultStyle)[0] || rawLayer.vtStyles[0];
226
228
 
227
- setStyle(layer, {}, {options: {layers: rawLayer.layers}}, vtStyle.url);
229
+ setStyle(layer, {}, {options: {layers: rawLayer.layers, readStyleFromUrl: options.readStyleFromUrl}}, vtStyle.url);
228
230
 
229
231
  }
230
232
  return layer;
@@ -1,4 +1,4 @@
1
- import OverlaySynchronizer from "olcs/lib/olcs/OverlaySynchronizer.js";
1
+ import {OverlaySynchronizer} from "olcs";
2
2
 
3
3
  /**
4
4
  * Represents a FixedOverlaySynchronizer.
@@ -6,8 +6,7 @@ import {getUid} from "olcs/lib/olcs/util.js";
6
6
  import TileWMS from "ol/source/TileWMS.js";
7
7
  import ImageWMS from "ol/source/ImageWMS.js";
8
8
  import WMTS from "ol/source/WMTS.js";
9
- import AbstractSynchronizer from "olcs/lib/olcs/AbstractSynchronizer.js";
10
- import {extentToRectangle, tileLayerToImageryLayer, updateCesiumLayerProperties} from "olcs/lib/olcs/core.js";
9
+ import {AbstractSynchronizer, extentToRectangle, tileLayerToImageryLayer, updateCesiumLayerProperties} from "olcs";
11
10
  import {Tile, Image as ImageLayer} from "ol/layer.js";
12
11
  import {stableSort} from "ol/array.js";
13
12
  import {getBottomLeft, getBottomRight, getTopRight, getTopLeft} from "ol/extent.js";
@@ -1,6 +1,6 @@
1
1
  import OLCesium from "olcs";
2
2
  import {transform, get} from "ol/proj.js";
3
- import VectorSynchronizer from "olcs/lib/olcs/VectorSynchronizer.js";
3
+ import {VectorSynchronizer} from "olcs";
4
4
 
5
5
  import FixedOverlaySynchronizer from "./3dUtils/fixedOverlaySynchronizer.js";
6
6
  import WMSRasterSynchronizer from "./3dUtils/wmsRasterSynchronizer.js";
package/babel.config.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "presets": [],
3
- "plugins": [
4
- "@babel/plugin-transform-modules-commonjs"
5
- ]
6
- }