@masterportal/masterportalapi 2.12.0 → 2.13.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,21 @@
|
|
|
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
|
+
- GeoJSON now also register a featuresloadend function if the source is a cluster.
|
|
10
|
+
### Deprecated
|
|
11
|
+
### Removed
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 2.13.0 - 2022-02-16
|
|
17
|
+
### Changed
|
|
18
|
+
- GeoJSON now also register a featuresloadend function if the source is a cluster.
|
|
19
|
+
|
|
20
|
+
---
|
|
6
21
|
|
|
7
22
|
## 2.12.0 - 2022-01-24
|
|
8
23
|
### Added
|
package/package.json
CHANGED
|
@@ -1,63 +1,62 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@masterportal/masterportalapi",
|
|
3
|
-
"author": "Implementierungspartnerschaft Masterportal <info@masterportal.org> (https://www.masterportal.org)",
|
|
4
|
-
"version": "2.
|
|
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/layer/wfs.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.27.1",
|
|
23
|
-
"ol": "7.1.0",
|
|
24
|
-
"olcs": "^2.13.1",
|
|
25
|
-
"proj4": "^2.8.1",
|
|
26
|
-
"xml2js": "^0.4.23"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@babel/core": "^7.20.12",
|
|
30
|
-
"@babel/plugin-transform-modules-commonjs": "^7.20.11",
|
|
31
|
-
"@parcel/transformer-sass": "^2.6.0",
|
|
32
|
-
"buffer": "^6.0.3",
|
|
33
|
-
"canvas": "^2.11.0",
|
|
34
|
-
"eslint": "^8.31.0",
|
|
35
|
-
"events": "^3.3.0",
|
|
36
|
-
"husky": "^8.0.3",
|
|
37
|
-
"jest": "^29.3.1",
|
|
38
|
-
"jest-canvas-mock": "^2.4.0",
|
|
39
|
-
"jest-environment-jsdom": "^29.3.1",
|
|
40
|
-
"jsdoc": "^4.0.0",
|
|
41
|
-
"parcel": "^2.6.0",
|
|
42
|
-
"process": "^0.11.10",
|
|
43
|
-
"sass": "^1.57.1",
|
|
44
|
-
"stream-browserify": "^3.0.0",
|
|
45
|
-
"timers-browserify": "^2.0.12"
|
|
46
|
-
},
|
|
47
|
-
"peerDependencies": {
|
|
48
|
-
"cesium": "^1.95.0"
|
|
49
|
-
},
|
|
50
|
-
"engines": {
|
|
51
|
-
"node": "^16.13.2 || ^18.12.0",
|
|
52
|
-
"npm": "^8.1.2"
|
|
53
|
-
},
|
|
54
|
-
"homepage": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi#readme",
|
|
55
|
-
"directories": {
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@masterportal/masterportalapi",
|
|
3
|
+
"author": "Implementierungspartnerschaft Masterportal <info@masterportal.org> (https://www.masterportal.org)",
|
|
4
|
+
"version": "2.13.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/layer/wfs.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.27.1",
|
|
23
|
+
"ol": "7.1.0",
|
|
24
|
+
"olcs": "^2.13.1",
|
|
25
|
+
"proj4": "^2.8.1",
|
|
26
|
+
"xml2js": "^0.4.23"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@babel/core": "^7.20.12",
|
|
30
|
+
"@babel/plugin-transform-modules-commonjs": "^7.20.11",
|
|
31
|
+
"@parcel/transformer-sass": "^2.6.0",
|
|
32
|
+
"buffer": "^6.0.3",
|
|
33
|
+
"canvas": "^2.11.0",
|
|
34
|
+
"eslint": "^8.31.0",
|
|
35
|
+
"events": "^3.3.0",
|
|
36
|
+
"husky": "^8.0.3",
|
|
37
|
+
"jest": "^29.3.1",
|
|
38
|
+
"jest-canvas-mock": "^2.4.0",
|
|
39
|
+
"jest-environment-jsdom": "^29.3.1",
|
|
40
|
+
"jsdoc": "^4.0.0",
|
|
41
|
+
"parcel": "^2.6.0",
|
|
42
|
+
"process": "^0.11.10",
|
|
43
|
+
"sass": "^1.57.1",
|
|
44
|
+
"stream-browserify": "^3.0.0",
|
|
45
|
+
"timers-browserify": "^2.0.12"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"cesium": "^1.95.0"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": "^16.13.2 || ^18.12.0",
|
|
52
|
+
"npm": "^8.1.2"
|
|
53
|
+
},
|
|
54
|
+
"homepage": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi#readme",
|
|
55
|
+
"directories": {
|
|
56
|
+
"example": "example",
|
|
57
|
+
"test": "test"
|
|
58
|
+
},
|
|
59
|
+
"bugs": {
|
|
60
|
+
"url": "https://bitbucket.org/geowerkstatt-hamburg/masterportalapi/issues"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -22,11 +22,11 @@ export function createLayerSource ({url, features, clusterDistance}, options) {
|
|
|
22
22
|
|
|
23
23
|
source = createVectorSource(url || features, options.loadingStrategy, format);
|
|
24
24
|
|
|
25
|
-
if (clusterDistance) {
|
|
26
|
-
|
|
25
|
+
if (typeof clusterDistance === "number") {
|
|
26
|
+
source = createClusterVectorSource(source, clusterDistance, options.clusterGeometryFunction);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
source.once("featuresloadend", event => {
|
|
29
|
+
(typeof clusterDistance === "number" ? source.getSource() : source).once("featuresloadend", event => {
|
|
30
30
|
if (typeof options.afterLoading === "function") {
|
|
31
31
|
options.afterLoading(event?.features);
|
|
32
32
|
}
|
|
@@ -118,6 +118,9 @@ class WMSRasterSynchronizer extends olcsAbstractSynchronizer {
|
|
|
118
118
|
provider = this.createProviderForStaticImageSource(source);
|
|
119
119
|
}
|
|
120
120
|
else if (source instanceof WMTS) {
|
|
121
|
+
if (typeof source.getUrls !== "function" || !Array.isArray(source.getUrls())) {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
121
124
|
provider = new Cesium.WebMapTileServiceImageryProvider({
|
|
122
125
|
url: source.getUrls()[0],
|
|
123
126
|
format: source.getFormat(),
|