@masterportal/masterportalapi 2.30.0 → 2.31.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,18 @@
3
3
 
4
4
  The [Semantic Versioning](https://semver.org/spec/v2.0.0.html) is used.
5
5
 
6
+ ### 2.31.0 - 2023-12-13
7
+ ## Added
8
+ - Added support for Node LTS version ^20.9.0 and npm Version ^10.1.0.
9
+
10
+ ## Changed
11
+ - WMS-Layer: the attribute extent of rawlayer is set at ol-layer.
12
+
13
+ ## Fixed
14
+ - OAF-Layer: fix oaf layer in examples
15
+
16
+ ---
17
+
6
18
  ### 2.30.0 - 2023-11-28
7
19
  ## Changed
8
20
  - WMS-Layer and WMTS-Layer: create Layer no longer evaluates the minScale and maxScale attributes, but instead minResolution and maxResolution can be transferred.
@@ -11,6 +23,7 @@
11
23
  - Issue Masterportal #1052 VectorStyle: fixed blinking of initial loaded features on great amount of features with a lot of conditional styles.
12
24
  - Issue Masterportal #1088: gfiAttibutes with type=html are not displayed if there is no value in the data.
13
25
  - Issue Masterportal #1091: VectorStyle: read geometry type from geoserver featureTypeRequest
26
+
14
27
  ---
15
28
 
16
29
  ### 2.29.0 - 2023-10-27
@@ -105,13 +105,7 @@
105
105
  "url": "https://api.hamburg.de/datasets/v1/schulen",
106
106
  "collection": "staatliche_schulen",
107
107
  "typ": "OAF",
108
- "bbox": "",
109
- "bboxCrs": "",
110
- "datetime": "",
111
- "crs": "EPSG:25832",
112
- "params": {
113
- "anzahl_schueler": ">1000"
114
- }
108
+ "crs": "http://www.opengis.net/def/crs/EPSG/0/25832"
115
109
  },
116
110
  {
117
111
  "id": "8712",
package/package.json CHANGED
@@ -1,73 +1,73 @@
1
- {
2
- "name": "@masterportal/masterportalapi",
3
- "author": "Implementierungspartnerschaft Masterportal <info@masterportal.org> (https://www.masterportal.org)",
4
- "version": "2.30.0",
5
- "license": "MIT",
6
- "description": "Basic functions of the Masterportal as api",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://bitbucket.org/geowerkstatt-hamburg/masterportalapi.git"
10
- },
11
- "main": "src/index.js",
12
- "scripts": {
13
- "test": "jest .test.js --config ./jest.config.js --collectCoverage",
14
- "test:trace": "node --trace-warnings node_modules/jest/bin/jest.js .test.js --config ./jest.config.js",
15
- "test:watch": "jest .test.js --config ./jest.config.js --watch",
16
- "example": "parcel example/index.html",
17
- "generate-jsdoc": "jsdoc ./src -r -d ./docs/ -R ./README.md -c jsdoc.json",
18
- "prePushHook": "eslint --max-warnings 0 \"./**/*.js\" && npm run test",
19
- "prepare": "husky install"
20
- },
21
- "dependencies": {
22
- "core-js": "^3.33.1",
23
- "dayjs": "^1.11.10",
24
- "ol": "8.1.0",
25
- "ol-mapbox-style": "12.0.0",
26
- "olcs": "2.16.0",
27
- "proj4": "^2.9.1",
28
- "xml2js": "^0.6.2"
29
- },
30
- "devDependencies": {
31
- "@babel/core": "^7.23.2",
32
- "@babel/plugin-transform-modules-commonjs": "^7.23.0",
33
- "@parcel/transformer-sass": "^2.10.0",
34
- "@swc/jest": "^0.2.29",
35
- "assert": "^2.1.0",
36
- "browserify-zlib": "^0.2.0",
37
- "buffer": "^6.0.3",
38
- "canvas": "^2.11.2",
39
- "eslint": "^8.52.0",
40
- "events": "^3.3.0",
41
- "https-browserify": "^1.0.0",
42
- "husky": "^8.0.3",
43
- "jest": "^29.7.0",
44
- "jest-canvas-mock": "^2.5.2",
45
- "jest-environment-jsdom": "^29.7.0",
46
- "jest-fetch-mock": "^3.0.3",
47
- "jsdoc": "^4.0.2",
48
- "parcel": "^2.10.0",
49
- "process": "^0.11.10",
50
- "sass": "^1.69.4",
51
- "stream-browserify": "^3.0.0",
52
- "stream-http": "^3.2.0",
53
- "timers-browserify": "^2.0.12",
54
- "url": "^0.11.3",
55
- "use-resize-observer": "^9.1.0",
56
- "util": "^0.12.5"
57
- },
58
- "peerDependencies": {
59
- "@cesium/engine": "^2.4.1"
60
- },
61
- "engines": {
62
- "node": "^16.13.2 || ^18.12.0",
63
- "npm": "^8.1.2 || ^9.3.1"
64
- },
65
- "homepage": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi#readme",
66
- "directories": {
67
- "example": "example",
68
- "test": "test"
69
- },
70
- "bugs": {
71
- "url": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi/issues"
72
- }
73
- }
1
+ {
2
+ "name": "@masterportal/masterportalapi",
3
+ "author": "Implementierungspartnerschaft Masterportal <info@masterportal.org> (https://www.masterportal.org)",
4
+ "version": "2.31.0",
5
+ "license": "MIT",
6
+ "description": "Basic functions of the Masterportal as api",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://bitbucket.org/geowerkstatt-hamburg/masterportalapi.git"
10
+ },
11
+ "main": "src/index.js",
12
+ "scripts": {
13
+ "test": "jest .test.js --config ./jest.config.js --collectCoverage",
14
+ "test:trace": "node --trace-warnings node_modules/jest/bin/jest.js .test.js --config ./jest.config.js",
15
+ "test:watch": "jest .test.js --config ./jest.config.js --watch",
16
+ "example": "parcel example/index.html",
17
+ "generate-jsdoc": "jsdoc ./src -r -d ./docs/ -R ./README.md -c jsdoc.json",
18
+ "prePushHook": "eslint --max-warnings 0 \"./**/*.js\" && npm run test",
19
+ "prepare": "husky install"
20
+ },
21
+ "dependencies": {
22
+ "core-js": "^3.33.1",
23
+ "dayjs": "^1.11.10",
24
+ "ol": "8.1.0",
25
+ "ol-mapbox-style": "12.0.0",
26
+ "olcs": "2.16.0",
27
+ "proj4": "^2.9.1",
28
+ "xml2js": "^0.6.2"
29
+ },
30
+ "devDependencies": {
31
+ "@babel/core": "^7.23.2",
32
+ "@babel/plugin-transform-modules-commonjs": "^7.23.0",
33
+ "@parcel/transformer-sass": "^2.10.0",
34
+ "@swc/jest": "^0.2.29",
35
+ "assert": "^2.1.0",
36
+ "browserify-zlib": "^0.2.0",
37
+ "buffer": "^6.0.3",
38
+ "canvas": "^2.11.2",
39
+ "eslint": "^8.52.0",
40
+ "events": "^3.3.0",
41
+ "https-browserify": "^1.0.0",
42
+ "husky": "^8.0.3",
43
+ "jest": "^29.7.0",
44
+ "jest-canvas-mock": "^2.5.2",
45
+ "jest-environment-jsdom": "^29.7.0",
46
+ "jest-fetch-mock": "^3.0.3",
47
+ "jsdoc": "^4.0.2",
48
+ "parcel": "^2.10.0",
49
+ "process": "^0.11.10",
50
+ "sass": "^1.69.4",
51
+ "stream-browserify": "^3.0.0",
52
+ "stream-http": "^3.2.0",
53
+ "timers-browserify": "^2.0.12",
54
+ "url": "^0.11.3",
55
+ "use-resize-observer": "^9.1.0",
56
+ "util": "^0.12.5"
57
+ },
58
+ "peerDependencies": {
59
+ "@cesium/engine": "^2.4.1"
60
+ },
61
+ "engines": {
62
+ "node": "^16.13.2 || ^18.12.0 || ^20.9.0",
63
+ "npm": "^8.1.2 || ^9.3.1 || ^10.1.0"
64
+ },
65
+ "homepage": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi#readme",
66
+ "directories": {
67
+ "example": "example",
68
+ "test": "test"
69
+ },
70
+ "bugs": {
71
+ "url": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi/issues"
72
+ }
73
+ }
package/src/layer/wms.js CHANGED
@@ -158,7 +158,8 @@ export function createLayer (rawLayer, layerParams = {}, options) {
158
158
  source,
159
159
  minResolution: typeof rawLayer.minResolution === "string" ? parseFloat(rawLayer.minResolution) : rawLayer.minResolution,
160
160
  maxResolution: typeof rawLayer.maxResolution === "string" ? parseFloat(rawLayer.maxResolution) : rawLayer.maxResolution,
161
- id: rawLayer.id
161
+ id: rawLayer.id,
162
+ extent: rawLayer.extent
162
163
  }, layerParams));
163
164
  }
164
165
 
@@ -213,11 +213,12 @@ describe("wms.js", function () {
213
213
  name: "name",
214
214
  layers: "layer1, layer2"
215
215
  },
216
- layer = wms.createLayer({singleTile: false, tilesize: "10"}, layerParams, options);
216
+ layer = wms.createLayer({singleTile: false, tilesize: "10", extent: [10, 20, 11, 22]}, layerParams, options);
217
217
 
218
218
  expect(layer).toBeInstanceOf(TileLayer);
219
219
  expect(layer.get("name")).toEqual("name");
220
220
  expect(layer.get("layers")).toEqual("layer1, layer2");
221
+ expect(layer.get("extent")).toEqual([10, 20, 11, 22]);
221
222
  expect(layer.getSource().getTileGrid()).toBeInstanceOf(TileGrid);
222
223
  expect(layer.getSource().getTileGrid().getOrigin()).toEqual(options.origin);
223
224
  expect(layer.getSource().getTileGrid().getResolutions()).toEqual(options.resolutions);