@masterportal/masterportalapi 2.4.0 → 2.5.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/.eslintrc +1 -1
- package/CHANGELOG.md +28 -0
- package/example/config/portal.json +1 -1
- package/example/config/services.json +143 -61
- package/example/index.js +1 -1
- package/package.json +18 -17
- package/src/defaults.js +1 -1
- package/src/layer/vectorTile.js +3 -3
- package/test/layer/vectorTile.test.js +2 -2
package/.eslintrc
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,34 @@
|
|
|
3
3
|
|
|
4
4
|
The [Semantic Versioning](https://semver.org/spec/v2.0.0.html) is used.
|
|
5
5
|
|
|
6
|
+
## 2.5.0 - 2022-08-05
|
|
7
|
+
### Added
|
|
8
|
+
- The following packages have been installed:
|
|
9
|
+
- jest-environment-jsdom: 28.1.3
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- The following packages have been updated:
|
|
13
|
+
- dependencies:
|
|
14
|
+
- core-js: 3.16.1 to 3.24.0
|
|
15
|
+
- ol: 6.14.1 to 6.15.1 (This also raised ol-mapbox-style from 7 to version 8)
|
|
16
|
+
- proj4: 2.7.5 to 2.8.0
|
|
17
|
+
- devDependencies:
|
|
18
|
+
- @babel/core: 7.16.7 to 7.18.9
|
|
19
|
+
- @babel/plugin-transform-modules-commonjs: 7.16.8 to 7.18.6
|
|
20
|
+
- @parcel/transformer-sass: 2.2.0 to 2.6.2
|
|
21
|
+
- canvas: 2.8.0 to 2.9.3
|
|
22
|
+
- eslint: 7.32.0 to 8.20.0
|
|
23
|
+
- husky: 7.0.1 to 8.0.1
|
|
24
|
+
- jest: 27.4.0 to 28.1.3
|
|
25
|
+
- jest-canvas-mock: 2.3.1 to 2.4.0
|
|
26
|
+
- jsdoc: 3.6.7 to 3.6.11
|
|
27
|
+
- parcel: 2.2.0 to 2.6.2
|
|
28
|
+
- sass: 1.37.5 to 1.54.0
|
|
29
|
+
- peerDependencies:
|
|
30
|
+
- cesium: 1.88.0 to 1.95.0
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
6
34
|
## 2.4.0 - 2022-07-06
|
|
7
35
|
### Added
|
|
8
36
|
- Issue 776: Add 3D mode for WMTS layers.
|
|
@@ -62,6 +62,43 @@
|
|
|
62
62
|
"maximumScreenSpaceError": 6
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
+
{
|
|
66
|
+
"id": "4003",
|
|
67
|
+
"name": "EntitiesLayer",
|
|
68
|
+
"typ": "Entities3D",
|
|
69
|
+
"entities": [
|
|
70
|
+
{
|
|
71
|
+
"url": "https://daten-hamburg.de/gdi3d/datasource-data/Simple_Building.glb",
|
|
72
|
+
"attributes": {
|
|
73
|
+
"name": "einfaches Haus in Planten und Blomen"
|
|
74
|
+
},
|
|
75
|
+
"latitude": 53.5631,
|
|
76
|
+
"longitude": 9.9800,
|
|
77
|
+
"height": 16,
|
|
78
|
+
"heading": 0,
|
|
79
|
+
"pitch": 0,
|
|
80
|
+
"roll": 0,
|
|
81
|
+
"scale": 5,
|
|
82
|
+
"allowPicking": true,
|
|
83
|
+
"show": true
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"url": "https://daten-hamburg.de/gdi3d/datasource-data/Simple_Building.glb",
|
|
87
|
+
"attributes": {
|
|
88
|
+
"name": "einfaches Haus im See"
|
|
89
|
+
},
|
|
90
|
+
"latitude": 53.5622,
|
|
91
|
+
"longitude": 9.9808,
|
|
92
|
+
"height": 16,
|
|
93
|
+
"heading": 0,
|
|
94
|
+
"pitch": 0,
|
|
95
|
+
"roll": 0,
|
|
96
|
+
"scale": 2,
|
|
97
|
+
"allowPicking": true,
|
|
98
|
+
"show": true
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
65
102
|
{
|
|
66
103
|
"id": "5001",
|
|
67
104
|
"name": "Schulen",
|
|
@@ -106,12 +143,12 @@
|
|
|
106
143
|
"zDirection": -1
|
|
107
144
|
},
|
|
108
145
|
{
|
|
109
|
-
"id":"7001",
|
|
110
|
-
"name":"TopPlusOpen",
|
|
111
|
-
"capabilitiesUrl":"https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",
|
|
112
|
-
"optionsFromCapabilities":true,
|
|
113
|
-
"typ":"WMTS",
|
|
114
|
-
"layers":"web"
|
|
146
|
+
"id": "7001",
|
|
147
|
+
"name": "TopPlusOpen",
|
|
148
|
+
"capabilitiesUrl": "https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",
|
|
149
|
+
"optionsFromCapabilities": true,
|
|
150
|
+
"typ": "WMTS",
|
|
151
|
+
"layers": "web"
|
|
115
152
|
},
|
|
116
153
|
{
|
|
117
154
|
"id": "7002",
|
|
@@ -142,16 +179,86 @@
|
|
|
142
179
|
"maxScale": "2500000",
|
|
143
180
|
"tileMatrixSet": "google3857",
|
|
144
181
|
"matrixSizes": [
|
|
145
|
-
[
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
[
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
[
|
|
154
|
-
|
|
182
|
+
[
|
|
183
|
+
1,
|
|
184
|
+
1
|
|
185
|
+
],
|
|
186
|
+
[
|
|
187
|
+
2,
|
|
188
|
+
2
|
|
189
|
+
],
|
|
190
|
+
[
|
|
191
|
+
4,
|
|
192
|
+
4
|
|
193
|
+
],
|
|
194
|
+
[
|
|
195
|
+
8,
|
|
196
|
+
8
|
|
197
|
+
],
|
|
198
|
+
[
|
|
199
|
+
16,
|
|
200
|
+
16
|
|
201
|
+
],
|
|
202
|
+
[
|
|
203
|
+
32,
|
|
204
|
+
32
|
|
205
|
+
],
|
|
206
|
+
[
|
|
207
|
+
64,
|
|
208
|
+
64
|
|
209
|
+
],
|
|
210
|
+
[
|
|
211
|
+
128,
|
|
212
|
+
128
|
|
213
|
+
],
|
|
214
|
+
[
|
|
215
|
+
256,
|
|
216
|
+
256
|
|
217
|
+
],
|
|
218
|
+
[
|
|
219
|
+
512,
|
|
220
|
+
512
|
|
221
|
+
],
|
|
222
|
+
[
|
|
223
|
+
1024,
|
|
224
|
+
1024
|
|
225
|
+
],
|
|
226
|
+
[
|
|
227
|
+
2048,
|
|
228
|
+
2048
|
|
229
|
+
],
|
|
230
|
+
[
|
|
231
|
+
4096,
|
|
232
|
+
4096
|
|
233
|
+
],
|
|
234
|
+
[
|
|
235
|
+
8192,
|
|
236
|
+
8192
|
|
237
|
+
],
|
|
238
|
+
[
|
|
239
|
+
16384,
|
|
240
|
+
16384
|
|
241
|
+
],
|
|
242
|
+
[
|
|
243
|
+
32768,
|
|
244
|
+
32768
|
|
245
|
+
],
|
|
246
|
+
[
|
|
247
|
+
65536,
|
|
248
|
+
65536
|
|
249
|
+
],
|
|
250
|
+
[
|
|
251
|
+
131072,
|
|
252
|
+
131072
|
|
253
|
+
],
|
|
254
|
+
[
|
|
255
|
+
262144,
|
|
256
|
+
262144
|
|
257
|
+
],
|
|
258
|
+
[
|
|
259
|
+
524288,
|
|
260
|
+
524288
|
|
261
|
+
]
|
|
155
262
|
],
|
|
156
263
|
"coordinateSystem": "EPSG:3857",
|
|
157
264
|
"layerAttribution": "nicht vorhanden",
|
|
@@ -163,53 +270,28 @@
|
|
|
163
270
|
20037508.3428
|
|
164
271
|
],
|
|
165
272
|
"scales": [
|
|
166
|
-
559082264.029,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
273
|
+
559082264.029,
|
|
274
|
+
279541132.015,
|
|
275
|
+
139770566.007,
|
|
276
|
+
69885283.0036,
|
|
277
|
+
34942641.5018,
|
|
278
|
+
17471320.7509,
|
|
279
|
+
8735660.37545,
|
|
280
|
+
4367830.18773,
|
|
281
|
+
2183915.09386,
|
|
282
|
+
1091957.54693,
|
|
283
|
+
45978.773466,
|
|
284
|
+
272989.386733,
|
|
285
|
+
136494.693366,
|
|
286
|
+
68247.3466832,
|
|
287
|
+
34123.6733416,
|
|
288
|
+
17061.8366708,
|
|
289
|
+
8530.91833540,
|
|
290
|
+
4265.45916770,
|
|
291
|
+
2132.72958385,
|
|
292
|
+
1066.36479193
|
|
171
293
|
],
|
|
172
294
|
"resLength": "20",
|
|
173
295
|
"requestEncoding": "REST"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"id": "4003",
|
|
177
|
-
"name": "EntitiesLayer",
|
|
178
|
-
"typ": "Entities3D",
|
|
179
|
-
"entities": [
|
|
180
|
-
{
|
|
181
|
-
"url": "https://daten-hamburg.de/gdi3d/datasource-data/Simple_Building.glb",
|
|
182
|
-
"attributes": {
|
|
183
|
-
"name": "einfaches Haus in Planten und Blomen"
|
|
184
|
-
},
|
|
185
|
-
"latitude": 53.5631,
|
|
186
|
-
"longitude": 9.9800,
|
|
187
|
-
"height": 16,
|
|
188
|
-
"heading": 0,
|
|
189
|
-
"pitch": 0,
|
|
190
|
-
"roll": 0,
|
|
191
|
-
"scale": 5,
|
|
192
|
-
"allowPicking": true,
|
|
193
|
-
"show": true
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
"url": "https://daten-hamburg.de/gdi3d/datasource-data/Simple_Building.glb",
|
|
197
|
-
"attributes": {
|
|
198
|
-
"name": "einfaches Haus im See"
|
|
199
|
-
},
|
|
200
|
-
"latitude": 53.5622,
|
|
201
|
-
"longitude": 9.9808,
|
|
202
|
-
"height": 16,
|
|
203
|
-
"heading": 0,
|
|
204
|
-
"pitch": 0,
|
|
205
|
-
"roll": 0,
|
|
206
|
-
"scale": 2,
|
|
207
|
-
"allowPicking": true,
|
|
208
|
-
"show": true
|
|
209
|
-
}
|
|
210
|
-
],
|
|
211
|
-
"gfiAttributes" : {
|
|
212
|
-
"name": "Name"
|
|
213
|
-
}
|
|
214
296
|
}
|
|
215
297
|
]
|
package/example/index.js
CHANGED
|
@@ -47,7 +47,7 @@ document.getElementById("enable").addEventListener("click", function () {
|
|
|
47
47
|
document.getElementById("layer-visibility").style.display = "none";
|
|
48
48
|
}
|
|
49
49
|
else {
|
|
50
|
-
const lib = portalConfig.cesiumLib ? portalConfig.cesiumLib : "https://geoportal-hamburg.de/mastercode/cesium/
|
|
50
|
+
const lib = portalConfig.cesiumLib ? portalConfig.cesiumLib : "https://geoportal-hamburg.de/mastercode/cesium/1_95/index.js";
|
|
51
51
|
|
|
52
52
|
document.getElementById("layer-visibility").style.display = "block";
|
|
53
53
|
|
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.5.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Basic functions of the Masterportal as api",
|
|
7
7
|
"repository": {
|
|
@@ -19,33 +19,33 @@
|
|
|
19
19
|
"prepare": "husky install"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"core-js": "^3.
|
|
23
|
-
"ol": "6.
|
|
22
|
+
"core-js": "^3.24.0",
|
|
23
|
+
"ol": "6.15.1",
|
|
24
24
|
"olcs": "^2.13.0",
|
|
25
|
-
"proj4": "^2.
|
|
25
|
+
"proj4": "^2.8.0",
|
|
26
26
|
"xml2js": "^0.4.23"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@babel/core": "^7.
|
|
30
|
-
"@babel/plugin-transform-modules-commonjs": "^7.
|
|
31
|
-
"@parcel/transformer-sass": "^2.2
|
|
29
|
+
"@babel/core": "^7.18.9",
|
|
30
|
+
"@babel/plugin-transform-modules-commonjs": "^7.18.6",
|
|
31
|
+
"@parcel/transformer-sass": "^2.6.2",
|
|
32
32
|
"buffer": "^6.0.3",
|
|
33
|
-
"canvas": "^2.
|
|
34
|
-
"eslint": "^
|
|
33
|
+
"canvas": "^2.9.3",
|
|
34
|
+
"eslint": "^8.20.0",
|
|
35
35
|
"events": "^3.3.0",
|
|
36
|
-
"husky": "^
|
|
37
|
-
"jest": "^
|
|
38
|
-
"jest-canvas-mock": "^2.
|
|
39
|
-
"
|
|
40
|
-
"
|
|
36
|
+
"husky": "^8.0.1",
|
|
37
|
+
"jest": "^28.1.3",
|
|
38
|
+
"jest-canvas-mock": "^2.4.0",
|
|
39
|
+
"jest-environment-jsdom": "^28.1.3",
|
|
40
|
+
"jsdoc": "^3.6.11",
|
|
41
|
+
"parcel": "^2.6.2",
|
|
41
42
|
"process": "^0.11.10",
|
|
42
|
-
"
|
|
43
|
-
"sass": "^1.37.5",
|
|
43
|
+
"sass": "^1.54.0",
|
|
44
44
|
"stream-browserify": "^3.0.0",
|
|
45
45
|
"timers-browserify": "^2.0.12"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"cesium": "^1.
|
|
48
|
+
"cesium": "^1.95.0"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": "^16.13.2",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"homepage": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi#readme",
|
|
55
55
|
"directories": {
|
|
56
|
+
"doc": "docs",
|
|
56
57
|
"example": "example",
|
|
57
58
|
"test": "test"
|
|
58
59
|
},
|
package/src/defaults.js
CHANGED
|
@@ -19,7 +19,7 @@ export default {
|
|
|
19
19
|
{resolution: 1.3229159522920524, scale: 5000, zoomLevel: 6},
|
|
20
20
|
{resolution: 0.6614579761460262, scale: 2500, zoomLevel: 7},
|
|
21
21
|
{resolution: 0.2645831904584105, scale: 1000, zoomLevel: 8},
|
|
22
|
-
{resolution: 0.
|
|
22
|
+
{resolution: 0.1322915952292052, scale: 500, zoomLevel: 9}
|
|
23
23
|
],
|
|
24
24
|
namedProjections: [
|
|
25
25
|
["EPSG:25832", "+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"]
|
package/src/layer/vectorTile.js
CHANGED
|
@@ -4,8 +4,8 @@ import VectorTileSource from "ol/source/VectorTile";
|
|
|
4
4
|
import OpenLayersTileGrid from "ol/tilegrid/TileGrid";
|
|
5
5
|
import {extentFromProjection} from "ol/tilegrid";
|
|
6
6
|
|
|
7
|
-
import stylefunction from "ol-mapbox-style
|
|
8
|
-
import {defaultResolutions} from "ol-mapbox-style
|
|
7
|
+
import {stylefunction} from "ol-mapbox-style";
|
|
8
|
+
import {defaultResolutions} from "ol-mapbox-style";
|
|
9
9
|
|
|
10
10
|
import defaults from "../defaults";
|
|
11
11
|
|
|
@@ -171,4 +171,4 @@ export function setStyle (layer, glStyle, {options = {}} = {}) {
|
|
|
171
171
|
options.spriteData,
|
|
172
172
|
options.spriteImageUrl,
|
|
173
173
|
options.getFonts);
|
|
174
|
-
}
|
|
174
|
+
}
|
|
@@ -135,7 +135,7 @@ describe("vectorTile.js", function () {
|
|
|
135
135
|
1.3229159522920524,
|
|
136
136
|
0.6614579761460262,
|
|
137
137
|
0.2645831904584105,
|
|
138
|
-
0.
|
|
138
|
+
0.1322915952292052
|
|
139
139
|
],
|
|
140
140
|
tileSize: 512
|
|
141
141
|
},
|
|
@@ -169,4 +169,4 @@ describe("vectorTile.js", function () {
|
|
|
169
169
|
expect(featureStyle[0].getFill().getColor()).toBe("rgba(255,253,238,1)");
|
|
170
170
|
});
|
|
171
171
|
});
|
|
172
|
-
});
|
|
172
|
+
});
|