Compare commits
313 Commits
d36185dbbf
...
master
Author | SHA1 | Date | |
---|---|---|---|
f66187d3a2 | |||
|
df77631299 | ||
a8d0f05c81 | |||
|
df0d13e5dd | ||
|
c79637be77 | ||
|
b347220dd4 | ||
|
b5e11da9a8 | ||
|
edeadef96f | ||
|
267a299589 | ||
|
9d45c25a95 | ||
|
2ffce50c47 | ||
|
f50ff878e0 | ||
09c74448a8 | |||
205b73b30e | |||
|
313cc59fe7 | ||
c3fb42c65f | |||
|
6b73fb0d55 | ||
ea641caf38 | |||
ac15b2018d | |||
|
fe73f615ad | ||
|
3e1b3ee78e | ||
|
58391b7828 | ||
|
b2b2a1e8be | ||
|
0d96a1be4f | ||
d599430cb0 | |||
|
e17911b339 | ||
|
9d6cbffb3d | ||
|
a11eb81e73 | ||
|
4fc3ad933c | ||
|
e6d90c9e61 | ||
250b3841fe | |||
51291cd86f | |||
|
e9e3b719a4 | ||
|
1c0ad57b0a | ||
|
8684ba25c8 | ||
78ca3044cf | |||
2e55b5a70e | |||
|
af0a3dca2d | ||
f039898c26 | |||
|
ab19b1c2ce | ||
a2641f8ea5 | |||
|
d6841c8f83 | ||
187b24ab97 | |||
b80ddf7854 | |||
|
79bc3d9082 | ||
1c92ad4c28 | |||
|
61e6de0052 | ||
fb25b92349 | |||
|
e78f2893ae | ||
51170b45e9 | |||
|
7365bea145 | ||
dc096065b4 | |||
|
b9850311ea | ||
ee9c050db3 | |||
|
95200d9920 | ||
|
ee1ce21cca | ||
|
467f7447bf | ||
|
1df4496058 | ||
|
134220d75f | ||
|
80ef4ed6fe | ||
|
2137f3f07e | ||
a46e8040b2 | |||
|
2ca9730735 | ||
3d2ca8fb9f | |||
6810da8b79 | |||
|
4866a6f22d | ||
84a1004977 | |||
39c619a837 | |||
|
758613aa12 | ||
6914a61bc4 | |||
9f43287433 | |||
|
10df983ae3 | ||
78249811ab | |||
df14427d60 | |||
|
c7c131d437 | ||
b2fe8f3bd7 | |||
|
3027c69fa8 | ||
5995d205a4 | |||
|
fd479c92d8 | ||
e9880d6eb2 | |||
|
a4438d8a90 | ||
89061774de | |||
|
362e6c8534 | ||
64a0e58238 | |||
|
a3d4dfbd59 | ||
4c106ebff3 | |||
|
d21f304081 | ||
2bad3274fd | |||
|
5c8fd64521 | ||
72ba8eca81 | |||
|
f89f741265 | ||
50af55acb2 | |||
|
cc879b85e5 | ||
b4a0a4584d | |||
8ab1611f39 | |||
|
475c522039 | ||
068396ac9a | |||
|
4a30707ec6 | ||
852b1db895 | |||
|
fcbd68eca0 | ||
3a42f9114e | |||
3f664b472c | |||
|
57811f3f2e | ||
5e1bc6d705 | |||
d4a230f96d | |||
|
ed1e1478b2 | ||
afe013a59a | |||
db3734f8a3 | |||
|
86f75c7f78 | ||
a7abb4072b | |||
|
61d6446d75 | ||
392008ae4b | |||
093c26c7f3 | |||
|
a8e1ba6c02 | ||
e64fbfd014 | |||
8cd7b85de2 | |||
|
ddc7f97e27 | ||
24e3765c28 | |||
|
86f3ddb34b | ||
d6c55ef82b | |||
d977ddfb7b | |||
|
0e8bd5343d | ||
ceeaa89ba3 | |||
|
c3dbf85eb6 | ||
ad5fe95b55 | |||
|
31d3e58062 | ||
0231421cef | |||
|
6b95fb7f77 | ||
da7e193219 | |||
31f9b48bd7 | |||
|
1d6b30edff | ||
349a76395b | |||
|
32b3b98f76 | ||
010ed6e010 | |||
a8675f5c49 | |||
|
f76ef44dee | ||
2387a0e39e | |||
98980fc857 | |||
|
6f7d8fe248 | ||
03a1ccd597 | |||
|
f2c133e9bd | ||
|
9c866e500f | ||
3b692359c6 | |||
3d4042e8c6 | |||
|
3db760dd96 | ||
b5828cd0fa | |||
af4e6f45d1 | |||
|
79def90bc7 | ||
53c60427f1 | |||
|
7d7e5bcd37 | ||
72a172ccb2 | |||
2728a91ab4 | |||
|
28d2b5d4a3 | ||
b70e385097 | |||
7392c6170c | |||
367348088a | |||
|
5efd5b78c9 | ||
0498d64c36 | |||
|
e17ac435b5 | ||
|
3e11c7cefd | ||
|
b3dcd1e58b | ||
|
681fc819a6 | ||
2a62d2df48 | |||
|
004bcea0b6 | ||
8efa46fa66 | |||
cefa788295 | |||
2da783d6be | |||
749be159f1 | |||
|
4e24527950 | ||
45263a59f4 | |||
|
5cdef30c71 | ||
cdba2af921 | |||
658c2c84cd | |||
3f9b4dcdaa | |||
|
a63159367f | ||
b9d1c8f61f | |||
|
eb34de193c | ||
5612bb3d66 | |||
0e42efac75 | |||
3247880b7c | |||
a250ecdcc1 | |||
93e497ec3f | |||
10a1f07622 | |||
07d6c1bc10 | |||
|
1bddc28767 | ||
a999c05631 | |||
|
f3252a378d | ||
4ab1e43d40 | |||
|
2719f2fcf4 | ||
55914bf7d2 | |||
26ca9be4e7 | |||
0ed342404e | |||
|
26ae1c7f06 | ||
f71d0fe256 | |||
|
7544203202 | ||
41a30e0b64 | |||
f14fc1a4fc | |||
|
21ebda4753 | ||
3a80a6f7f3 | |||
71a2ef44e6 | |||
|
1610391d56 | ||
b778e5726c | |||
fc4abf9a5b | |||
|
1274d96f1d | ||
35ccb4f4c5 | |||
|
d6587bd63b | ||
|
ede75f63f5 | ||
274f33e709 | |||
4384b12944 | |||
|
10ebdf276a | ||
9c270bfe75 | |||
9031d3e171 | |||
|
c3158c1064 | ||
315b64a561 | |||
|
030dbcec5d | ||
876020828e | |||
393b881e3b | |||
8594a94d62 | |||
|
c543ac7c94 | ||
97d6d569a0 | |||
023048a5bb | |||
4a685d675d | |||
|
1125f4586e | ||
3bdba527ec | |||
fb03cfce44 | |||
6f93cf254c | |||
b5a3a62cee | |||
d306d5c4c1 | |||
e79ae2f623 | |||
bdf4e03b49 | |||
7d5c10d902 | |||
fb192c6e4d | |||
|
6356f149a6 | ||
5c5914327c | |||
|
e306bf601f | ||
f8459aaca4 | |||
|
47fbc5eab9 | ||
564d08b5b9 | |||
7e17a49dc6 | |||
|
ce52cbdbed | ||
752e1e2c42 | |||
|
6b617ed4ad | ||
9b19950945 | |||
|
3f286ee042 | ||
747499d009 | |||
|
c74163976a | ||
|
c9f43b5b53 | ||
|
6a240abc0c | ||
|
7d8b18a27d | ||
|
4a328054dd | ||
|
3e482470b6 | ||
|
3bacb8a5d9 | ||
|
47afa20a01 | ||
|
f0646a8f6a | ||
36ebc03189 | |||
c0d40d2d5e | |||
|
14e504cc79 | ||
b060fd34bb | |||
0694d4e467 | |||
|
7c5867a332 | ||
8f958e33f1 | |||
aa2f305b27 | |||
|
d02da8f334 | ||
253553c534 | |||
4641e351fd | |||
|
84cf6a3f6e | ||
92b29135b5 | |||
|
f6aebb2f80 | ||
daf78f32b7 | |||
42245612d2 | |||
a05c1fa874 | |||
4bda94c360 | |||
feaad02c33 | |||
af9acebaff | |||
|
7ba35052ec | ||
2e40d023b1 | |||
|
c4f4a4f61e | ||
6b095b7f49 | |||
b2791eb80b | |||
|
4d5ed915ad | ||
2fb5967c26 | |||
|
820543913f | ||
ce2f06091b | |||
|
5714cdce72 | ||
10e43e1ea5 | |||
8fa84c6ea8 | |||
|
9f872d0af0 | ||
f6bed668f6 | |||
f70e30204d | |||
7339b91328 | |||
88667b3986 | |||
a996caa73b | |||
ed6f8f4231 | |||
94ef2e269b | |||
da624f0535 | |||
3da646dc4d | |||
778e40a26d | |||
|
94ff567567 | ||
b20ab34859 | |||
1988b3f74d | |||
b0587bc4c3 | |||
681d372ef3 | |||
b1922cdb10 | |||
|
5774bff8df | ||
6254a3be98 | |||
|
7943cefddf | ||
a2a287961c | |||
8e8f18ad7c | |||
|
4c93a9f766 | ||
93554bc7c4 | |||
d074cd81cf | |||
87547aafcc | |||
6ab5ba8a56 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -51,5 +51,5 @@ projects/common-map/node_modules/
|
|||||||
.angular/*
|
.angular/*
|
||||||
projects/common-map3d/node_modules/
|
projects/common-map3d/node_modules/
|
||||||
projects/common-map/node_modules/
|
projects/common-map/node_modules/
|
||||||
projects/common-aol/node_modules/
|
projects/ng-openlayers/node_modules/
|
||||||
projects/common/node_modules/
|
projects/common/node_modules/
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
This is a sample FarmMaps client in Angular 7.x.
|
This is a sample FarmMaps client in Angular 7.x.
|
||||||
|
|
||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
Use one of the two options below to get started.
|
Use one of the two options below to get started.
|
||||||
@@ -51,7 +50,7 @@ npm install -g @angular/cli
|
|||||||
npm install
|
npm install
|
||||||
ng serve
|
ng serve
|
||||||
```
|
```
|
||||||
*Go*
|
*Go*`
|
||||||
|
|
||||||
Point your browser to http://localhost:4200
|
Point your browser to http://localhost:4200
|
||||||
|
|
||||||
|
35
angular.json
35
angular.json
@@ -209,8 +209,8 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"tsConfig": "projects/common-map/tsconfig.lib.json",
|
"tsConfig": "projects/common-map/tsconfig.lib.json",
|
||||||
"project": "projects/common-map/ng-package.json"
|
"project": "projects/common-map/ng-package.json"
|
||||||
}
|
},
|
||||||
, "configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"tsConfig": "projects/common-map/tsconfig.lib.prod.json"
|
"tsConfig": "projects/common-map/tsconfig.lib.prod.json"
|
||||||
}
|
}
|
||||||
@@ -254,30 +254,39 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"common-aol": {
|
"ng-openlayers": {
|
||||||
"projectType": "library",
|
"projectType": "library",
|
||||||
"root": "projects/common-aol",
|
"root": "projects/ng-openlayers",
|
||||||
"sourceRoot": "projects/common-aol/src",
|
"sourceRoot": "projects/ng-openlayers/src",
|
||||||
"prefix": "fm-aol",
|
"prefix": "ng-openlayers",
|
||||||
"architect": {
|
"architect": {
|
||||||
"build": {
|
"build": {
|
||||||
"builder": "@angular-devkit/build-angular:ng-packagr:build",
|
"builder": "@angular-devkit/build-angular:ng-packagr",
|
||||||
"options": {
|
"options": {
|
||||||
"tsConfig": "projects/common-aol/tsconfig.lib.json",
|
"tsConfig": "projects/ng-openlayers/tsconfig.lib.json",
|
||||||
"project": "projects/common-aol/ng-package.json"
|
"project": "projects/ng-openlayers/ng-package.json"
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"tsConfig": "projects/common-aol/tsconfig.lib.prod.json"
|
"tsConfig": "projects/ng-openlayers/tsconfig.lib.prod.json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
"test": {
|
||||||
"builder": "@angular-devkit/build-angular:karma",
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
"options": {
|
"options": {
|
||||||
"main": "projects/common-aol/src/test.ts",
|
"main": "projects/ng-openlayers/src/test.ts",
|
||||||
"tsConfig": "projects/common-aol/tsconfig.spec.json",
|
"tsConfig": "projects/ng-openlayers/tsconfig.spec.json",
|
||||||
"karmaConfig": "projects/common-aol/karma.conf.js"
|
"karmaConfig": "projects/ng-openlayers/karma.conf.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-eslint/builder:lint",
|
||||||
|
"options": {
|
||||||
|
"lintFilePatterns": [
|
||||||
|
"projects/ng-openlayers/**/*.ts",
|
||||||
|
"projects/ng-openlayers/**/*.html"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
27282
package-lock.json
generated
27282
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
83
package.json
83
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "farmmaps-lib-app",
|
"name": "farmmaps-lib-app",
|
||||||
"version": "4.2.0",
|
"version": "4.18.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
@@ -11,40 +11,40 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular-eslint/eslint-plugin": "^15.2.1",
|
"@angular-eslint/eslint-plugin": "^18.2.0",
|
||||||
"@angular/animations": "^16.2.12",
|
"@angular/animations": "18.2.3",
|
||||||
"@angular/common": "^16.2.12",
|
"@angular/common": "18.2.3",
|
||||||
"@angular/compiler": "^16.2.12",
|
"@angular/compiler": "18.2.3",
|
||||||
"@angular/core": "^16.2.12",
|
"@angular/core": "18.2.3",
|
||||||
"@angular/forms": "^16.2.12",
|
"@angular/forms": "18.2.3",
|
||||||
"@angular/platform-browser": "^16.2.12",
|
"@angular/platform-browser": "18.2.3",
|
||||||
"@angular/platform-browser-dynamic": "^16.2.12",
|
"@angular/platform-browser-dynamic": "18.2.3",
|
||||||
"@angular/router": "^16.2.12",
|
"@angular/router": "18.2.3",
|
||||||
"@farmmaps/common": "file:dist/common",
|
"@farmmaps/common": "file:dist/common",
|
||||||
"@farmmaps/common-aol": "file:dist/common-aol",
|
|
||||||
"@farmmaps/common-map": "file:dist/common-map",
|
"@farmmaps/common-map": "file:dist/common-map",
|
||||||
"@farmmaps/common-map3d": "file:dist/common-map3d",
|
"@farmmaps/common-map3d": "file:dist/common-map3d",
|
||||||
"@microsoft/signalr": "^8.0.0",
|
"@farmmaps/ng-openlayers": "file:dist/ng-openlayers",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^15.0.0",
|
"@microsoft/signalr": "^3.1.16",
|
||||||
"@ngrx/effects": "^15",
|
"@ng-bootstrap/ng-bootstrap": "^17.0.1",
|
||||||
"@ngrx/router-store": "^15",
|
"@ngrx/effects": "^18.0.2",
|
||||||
"@ngrx/store": "^14",
|
"@ngrx/router-store": "^18.0.2",
|
||||||
"@popperjs/core": "^2.11.6",
|
"@ngrx/store": "^18.0.2",
|
||||||
"angular-oauth2-oidc": "^13",
|
"@popperjs/core": "^2.11.8",
|
||||||
|
"angular-oauth2-oidc": "^17.0.2",
|
||||||
"assert": "^2.0.0",
|
"assert": "^2.0.0",
|
||||||
"bootstrap": "^5.2.0",
|
"bootstrap": "^5.3.3",
|
||||||
"browserify-zlib": "^0.2.0",
|
"browserify-zlib": "^0.2.0",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
"cesium": "^1.97.0",
|
"cesium": "^1.97.0",
|
||||||
"core-js": "^2.6.12",
|
"core-js": "^2.6.12",
|
||||||
"https-browserify": "^1.0.0",
|
"https-browserify": "^1.0.0",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"ngrx-store-localstorage": "^14",
|
"ngrx-store-localstorage": "^18.0.0",
|
||||||
"ngx-avatars": "^1.7.0",
|
"ngx-avatars": "^1.8.0",
|
||||||
"ngx-clipboard": "^15.1.0",
|
"ngx-clipboard": "^16.0.0",
|
||||||
"ngx-image-cropper": "^6.0.2",
|
"ngx-image-cropper": "^7.0.0",
|
||||||
"ngx-uploadx": "^5.2.0",
|
"ngx-uploadx": "^6.2.0",
|
||||||
"ol": "6.14.1",
|
"ol": "^8.2.0",
|
||||||
"olcs": "^2.13.1",
|
"olcs": "^2.13.1",
|
||||||
"resumablejs": "^1.1.0",
|
"resumablejs": "^1.1.0",
|
||||||
"rxjs": "^7.8.1",
|
"rxjs": "^7.8.1",
|
||||||
@@ -54,22 +54,27 @@
|
|||||||
"tslib": "^2.4.0",
|
"tslib": "^2.4.0",
|
||||||
"url": "^0.11.0",
|
"url": "^0.11.0",
|
||||||
"util": "^0.12.4",
|
"util": "^0.12.4",
|
||||||
"zone.js": "~0.13.3"
|
"zone.js": "~0.14.10"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@lmdb/lmdb-linux-x64": "^3.1.0",
|
||||||
|
"@rollup/rollup-linux-x64-gnu": "^4.21.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-builders/custom-webpack": "^16.0.1",
|
"@angular-builders/custom-webpack": "^18.0.0",
|
||||||
"@angular-devkit/build-angular": "^16.2.11",
|
"@angular-devkit/build-angular": "18.2.3",
|
||||||
"@angular/cli": "^16.2.11",
|
"@angular/cli": "18.2.3",
|
||||||
"@angular/compiler-cli": "^16.2.12",
|
"@angular/compiler-cli": "18.2.3",
|
||||||
"@angular/language-service": "^16.2.12",
|
"@angular/language-service": "18.2.3",
|
||||||
"@angular/localize": "^16.2.12",
|
"@angular/localize": "18.2.3",
|
||||||
"@types/arcgis-rest-api": "^10.4.5",
|
"@types/arcgis-rest-api": "^10.4.5",
|
||||||
"@types/jasmine": "~2.8.8",
|
"@types/jasmine": "~2.8.8",
|
||||||
"@types/jasminewd2": "^2.0.9",
|
"@types/jasminewd2": "^2.0.9",
|
||||||
"@types/node": "^12.20.15",
|
"@types/node": "^22.5.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
"@typescript-eslint/eslint-plugin": "^6.18.0",
|
||||||
"@typescript-eslint/eslint-plugin-tslint": "^5.54.0",
|
"@typescript-eslint/eslint-plugin-tslint": "^6.18.0",
|
||||||
"@typescript-eslint/parser": "^5.54.0",
|
"@typescript-eslint/parser": "^6.18.0",
|
||||||
|
"codelyzer": "^6.0.2",
|
||||||
"eslint": "^8.35.0",
|
"eslint": "^8.35.0",
|
||||||
"eslint-config-prettier": "^8.6.0",
|
"eslint-config-prettier": "^8.6.0",
|
||||||
"eslint-plugin-import": "^2.27.5",
|
"eslint-plugin-import": "^2.27.5",
|
||||||
@@ -80,9 +85,9 @@
|
|||||||
"karma-coverage-istanbul-reporter": "^3.0.3",
|
"karma-coverage-istanbul-reporter": "^3.0.3",
|
||||||
"karma-jasmine": "^5.1.0",
|
"karma-jasmine": "^5.1.0",
|
||||||
"karma-jasmine-html-reporter": "^2.0.0",
|
"karma-jasmine-html-reporter": "^2.0.0",
|
||||||
"ng-packagr": "^16.2.3",
|
"ng-packagr": "^18.2.1",
|
||||||
"protractor": "^7.0.0",
|
"protractor": "~7.0.0",
|
||||||
"ts-node": "^8.8.1",
|
"ts-node": "^8.8.1",
|
||||||
"typescript": "~5.1.6"
|
"typescript": "~5.4.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,22 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
"env": {
|
|
||||||
"browser": true,
|
|
||||||
"es2021": true
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
"eslint:recommended",
|
|
||||||
"plugin:@typescript-eslint/recommended"
|
|
||||||
],
|
|
||||||
"overrides": [
|
|
||||||
],
|
|
||||||
"parser": "@typescript-eslint/parser",
|
|
||||||
"parserOptions": {
|
|
||||||
"ecmaVersion": "latest",
|
|
||||||
"sourceType": "module"
|
|
||||||
},
|
|
||||||
"plugins": [
|
|
||||||
"@typescript-eslint"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,24 +0,0 @@
|
|||||||
# CommonAol
|
|
||||||
|
|
||||||
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.
|
|
||||||
|
|
||||||
## Code scaffolding
|
|
||||||
|
|
||||||
Run `ng generate component component-name --project common-aol` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project common-aol`.
|
|
||||||
> Note: Don't forget to add `--project common-aol` or else it will be added to the default project in your `angular.json` file.
|
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
Run `ng build common-aol` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
||||||
|
|
||||||
## Publishing
|
|
||||||
|
|
||||||
After building your library with `ng build common-aol`, go to the dist folder `cd dist/common-aol` and run `npm publish`.
|
|
||||||
|
|
||||||
## Running unit tests
|
|
||||||
|
|
||||||
Run `ng test common-aol` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
||||||
|
|
||||||
## Further help
|
|
||||||
|
|
||||||
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
|
|
2548
projects/common-aol/package-lock.json
generated
2548
projects/common-aol/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@farmmaps/common-aol",
|
|
||||||
"version": "2.1.0",
|
|
||||||
"publishConfig": {
|
|
||||||
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.0.0",
|
|
||||||
"@types/openlayers": "4.3.x || 4.4.x",
|
|
||||||
"openlayers": "4.3.x || 4.4.x"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@angular/core": ">=16.0.0",
|
|
||||||
"ngrx-store-localstorage": ">=16.0.0",
|
|
||||||
"@ngrx/effects": ">=16.0.0",
|
|
||||||
"@ngrx/router-store":">=16.0.0",
|
|
||||||
"@ngrx/store":">=16.0.0",
|
|
||||||
"tassign": ">=1.0.0",
|
|
||||||
"ol": ">=6.8.1"
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,114 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import {
|
|
||||||
MapComponent, ViewComponent, GraticuleComponent,
|
|
||||||
LayerGroupComponent, LayerTileComponent, LayerVectorComponent, LayerVectorTileComponent, LayerImageComponent,
|
|
||||||
SourceClusterComponent, SourceRasterComponent,
|
|
||||||
SourceBingmapsComponent, SourceOsmComponent, SourceVectorComponent, SourceVectorTileComponent, SourceXYZComponent, SourceTileUTFGridComponent, SourceTileWMSComponent,
|
|
||||||
SourceGeoJSONComponent, SourceTileWMTSComponent, SourceTileJSONComponent, SourceImageStaticComponent, SourceImageWMSComponent, FeatureComponent,
|
|
||||||
GeometryLinestringComponent, GeometryPointComponent, GeometryPolygonComponent,
|
|
||||||
CollectionCoordinatesComponent, CoordinateComponent,
|
|
||||||
StyleCircleComponent, StyleComponent, StyleFillComponent, StyleIconComponent, StyleStrokeComponent, StyleTextComponent,
|
|
||||||
ControlAttributionComponent, ControlMousePositionComponent,
|
|
||||||
// ControlFullScreenComponent, ControlRotateComponent, ControlZoomSliderComponent,
|
|
||||||
ControlOverviewMapComponent, ControlScaleLineComponent, ControlZoomComponent,
|
|
||||||
ControlZoomToExtentComponent, DefaultControlComponent, ControlComponent,
|
|
||||||
FormatMVTComponent,
|
|
||||||
TileGridComponent, TileGridWMTSComponent,
|
|
||||||
DefaultInteractionComponent, DragRotateInteractionComponent, DragRotateAndZoomInteractionComponent,
|
|
||||||
DoubleClickZoomInteractionComponent, DragAndDropInteractionComponent, DragBoxInteractionComponent,
|
|
||||||
DragPanInteractionComponent, DragZoomInteractionComponent, MouseWheelZoomInteractionComponent,
|
|
||||||
PinchZoomInteractionComponent, DrawInteractionComponent, SelectInteractionComponent, ModifyInteractionComponent, TranslateInteractionComponent,
|
|
||||||
OverlayComponent,
|
|
||||||
ContentComponent,
|
|
||||||
AttributionComponent,
|
|
||||||
AttributionsComponent
|
|
||||||
} from './components';
|
|
||||||
|
|
||||||
export * from './components';
|
|
||||||
|
|
||||||
const COMPONENTS = [
|
|
||||||
MapComponent,
|
|
||||||
|
|
||||||
ViewComponent,
|
|
||||||
GraticuleComponent,
|
|
||||||
|
|
||||||
LayerGroupComponent,
|
|
||||||
LayerImageComponent,
|
|
||||||
LayerTileComponent,
|
|
||||||
LayerVectorComponent,
|
|
||||||
LayerVectorTileComponent,
|
|
||||||
|
|
||||||
SourceClusterComponent,
|
|
||||||
SourceRasterComponent,
|
|
||||||
SourceOsmComponent,
|
|
||||||
SourceBingmapsComponent,
|
|
||||||
SourceVectorComponent,
|
|
||||||
SourceXYZComponent,
|
|
||||||
SourceVectorTileComponent,
|
|
||||||
SourceTileUTFGridComponent,
|
|
||||||
SourceTileWMSComponent,
|
|
||||||
SourceTileWMTSComponent,
|
|
||||||
SourceTileJSONComponent,
|
|
||||||
SourceGeoJSONComponent,
|
|
||||||
SourceImageStaticComponent,
|
|
||||||
SourceImageWMSComponent,
|
|
||||||
FeatureComponent,
|
|
||||||
GeometryLinestringComponent,
|
|
||||||
GeometryPointComponent,
|
|
||||||
GeometryPolygonComponent,
|
|
||||||
CoordinateComponent,
|
|
||||||
CollectionCoordinatesComponent,
|
|
||||||
|
|
||||||
StyleComponent,
|
|
||||||
StyleCircleComponent,
|
|
||||||
StyleFillComponent,
|
|
||||||
StyleIconComponent,
|
|
||||||
StyleStrokeComponent,
|
|
||||||
StyleTextComponent,
|
|
||||||
|
|
||||||
DefaultControlComponent,
|
|
||||||
ControlComponent,
|
|
||||||
ControlAttributionComponent,
|
|
||||||
//ControlFullScreenComponent,
|
|
||||||
ControlMousePositionComponent,
|
|
||||||
ControlOverviewMapComponent,
|
|
||||||
//ControlRotateComponent,
|
|
||||||
ControlScaleLineComponent,
|
|
||||||
ControlZoomComponent,
|
|
||||||
//ControlZoomSliderComponent,
|
|
||||||
ControlZoomToExtentComponent,
|
|
||||||
|
|
||||||
FormatMVTComponent,
|
|
||||||
TileGridComponent,
|
|
||||||
TileGridWMTSComponent,
|
|
||||||
|
|
||||||
DefaultInteractionComponent,
|
|
||||||
DoubleClickZoomInteractionComponent,
|
|
||||||
DragAndDropInteractionComponent,
|
|
||||||
DragBoxInteractionComponent,
|
|
||||||
DragPanInteractionComponent,
|
|
||||||
DragRotateInteractionComponent,
|
|
||||||
DragRotateAndZoomInteractionComponent,
|
|
||||||
DragZoomInteractionComponent,
|
|
||||||
MouseWheelZoomInteractionComponent,
|
|
||||||
PinchZoomInteractionComponent,
|
|
||||||
DrawInteractionComponent,
|
|
||||||
SelectInteractionComponent,
|
|
||||||
ModifyInteractionComponent,
|
|
||||||
TranslateInteractionComponent,
|
|
||||||
|
|
||||||
OverlayComponent,
|
|
||||||
ContentComponent,
|
|
||||||
AttributionComponent,
|
|
||||||
AttributionsComponent
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: COMPONENTS,
|
|
||||||
imports: [CommonModule],
|
|
||||||
exports: COMPONENTS
|
|
||||||
})
|
|
||||||
|
|
||||||
export class AppCommonAolModule {
|
|
||||||
}
|
|
@@ -1,21 +0,0 @@
|
|||||||
import { Component, ElementRef, OnInit } from '@angular/core';
|
|
||||||
import { Attribution } from 'openlayers';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-attribution',
|
|
||||||
template: '<ng-content></ng-content>'
|
|
||||||
})
|
|
||||||
export class AttributionComponent implements OnInit {
|
|
||||||
instance: Attribution;
|
|
||||||
html: string;
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private elementRef: ElementRef
|
|
||||||
) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.html = this.elementRef.nativeElement.innerHTML;
|
|
||||||
this.instance = new Attribution(this);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,31 +0,0 @@
|
|||||||
import { Component, OnDestroy, OnInit, Input } from '@angular/core';
|
|
||||||
import { control, Collection } from 'openlayers';
|
|
||||||
import { MapComponent } from '../map.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-control-defaults',
|
|
||||||
template: ''
|
|
||||||
})
|
|
||||||
export class DefaultControlComponent implements OnInit, OnDestroy {
|
|
||||||
instance: Collection<control.Control>;
|
|
||||||
@Input() attribution: boolean;
|
|
||||||
@Input() attributionOptions: olx.control.AttributionOptions;
|
|
||||||
@Input() rotate: boolean;
|
|
||||||
@Input() rotateOptions: olx.control.RotateOptions;
|
|
||||||
@Input() zoom: boolean;
|
|
||||||
@Input() zoomOptions: olx.control.ZoomOptions;
|
|
||||||
|
|
||||||
constructor(private map: MapComponent) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
// console.log('ol.control.defaults init: ', this);
|
|
||||||
this.instance = control.defaults(this);
|
|
||||||
this.instance.forEach((control) => this.map.instance.addControl(control));
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
// console.log('removing aol-control-defaults');
|
|
||||||
this.instance.forEach((control) => this.map.instance.removeControl(control));
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,28 +0,0 @@
|
|||||||
// Commented-out due to error TS2345: Argument of type 'this' is not assignable to parameter of type 'FullScreenOptions'.
|
|
||||||
|
|
||||||
// import { Component, OnDestroy, OnInit } from '@angular/core';
|
|
||||||
// import { control } from 'openlayers';
|
|
||||||
// import { MapComponent } from '../map.component';
|
|
||||||
|
|
||||||
// @Component({
|
|
||||||
// selector: 'aol-control-fullscreen',
|
|
||||||
// template: `<ng-content></ng-content>`
|
|
||||||
// })
|
|
||||||
// export class ControlFullScreenComponent implements OnInit, OnDestroy {
|
|
||||||
// instance: control.FullScreen;
|
|
||||||
|
|
||||||
// constructor(private map: MapComponent) {
|
|
||||||
// // console.log('instancing aol-control-fullscreen');
|
|
||||||
// }
|
|
||||||
|
|
||||||
// ngOnInit() {
|
|
||||||
// this.instance = new control.FullScreen(this);
|
|
||||||
// this.map.instance.addControl(this.instance);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// ngOnDestroy() {
|
|
||||||
// // console.log('removing aol-control-fullscreen');
|
|
||||||
// this.map.instance.removeControl(this.instance);
|
|
||||||
// }
|
|
||||||
// }
|
|
@@ -1,11 +0,0 @@
|
|||||||
export * from './attribution.component';
|
|
||||||
export * from './control.component';
|
|
||||||
export * from './default.component';
|
|
||||||
//export * from './fullscreen.component';
|
|
||||||
export * from './mouseposition.component';
|
|
||||||
export * from './overviewmap.component';
|
|
||||||
//export * from './rotate.component';
|
|
||||||
export * from './scaleline.component';
|
|
||||||
export * from './zoom.component';
|
|
||||||
//export * from './zoomslider.component';
|
|
||||||
export * from './zoomtoextent.component';
|
|
@@ -1,33 +0,0 @@
|
|||||||
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
|
|
||||||
import { control, View, layer } from 'openlayers';
|
|
||||||
import { MapComponent } from '../map.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-control-overviewmap',
|
|
||||||
template: `<ng-content></ng-content>`
|
|
||||||
})
|
|
||||||
export class ControlOverviewMapComponent implements OnInit, OnDestroy {
|
|
||||||
instance: control.OverviewMap;
|
|
||||||
@Input() collapsed: boolean;
|
|
||||||
@Input() collapseLabel: string;
|
|
||||||
@Input() collapsible: boolean;
|
|
||||||
@Input() label: string;
|
|
||||||
@Input() layers: layer.Layer[];
|
|
||||||
@Input() target: Element;
|
|
||||||
@Input() tipLabel: string;
|
|
||||||
@Input() view: View;
|
|
||||||
|
|
||||||
constructor(private map: MapComponent) {
|
|
||||||
// console.log('instancing aol-control-overviewmap');
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new control.OverviewMap(this);
|
|
||||||
this.map.instance.addControl(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
// console.log('removing aol-control-overviewmap');
|
|
||||||
this.map.instance.removeControl(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,27 +0,0 @@
|
|||||||
// Commented-out due to error TS2345: Argument of type 'this' is not assignable to parameter of type 'RotateOptions'.
|
|
||||||
|
|
||||||
// import { Component, OnDestroy, OnInit } from '@angular/core';
|
|
||||||
// import { control } from 'openlayers';
|
|
||||||
// import { MapComponent } from '../map.component';
|
|
||||||
|
|
||||||
// @Component({
|
|
||||||
// selector: 'aol-control-rotate',
|
|
||||||
// template: `<ng-content></ng-content>`
|
|
||||||
// })
|
|
||||||
// export class ControlRotateComponent implements OnInit, OnDestroy {
|
|
||||||
// instance: control.Rotate;
|
|
||||||
|
|
||||||
// constructor(private map: MapComponent) {
|
|
||||||
// // console.log('instancing aol-control-rotate');
|
|
||||||
// }
|
|
||||||
|
|
||||||
// ngOnInit() {
|
|
||||||
// this.instance = new control.Rotate(this);
|
|
||||||
// this.map.instance.addControl(this.instance);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// ngOnDestroy() {
|
|
||||||
// // console.log('removing aol-control-rotate');
|
|
||||||
// this.map.instance.removeControl(this.instance);
|
|
||||||
// }
|
|
||||||
// }
|
|
@@ -1,27 +0,0 @@
|
|||||||
// Commented-out due to error TS2345: Argument of type 'this' is not assignable to parameter of type 'ZoomSliderOptions'.
|
|
||||||
|
|
||||||
// import { Component, OnDestroy, OnInit } from '@angular/core';
|
|
||||||
// import { control } from 'openlayers';
|
|
||||||
// import { MapComponent } from '../map.component';
|
|
||||||
|
|
||||||
// @Component({
|
|
||||||
// selector: 'aol-control-zoomslider',
|
|
||||||
// template: `<ng-content></ng-content>`
|
|
||||||
// })
|
|
||||||
// export class ControlZoomSliderComponent implements OnInit, OnDestroy {
|
|
||||||
// instance: control.ZoomSlider;
|
|
||||||
|
|
||||||
// constructor(private map: MapComponent) {
|
|
||||||
// // console.log('instancing aol-control-zoomslider');
|
|
||||||
// }
|
|
||||||
|
|
||||||
// ngOnInit() {
|
|
||||||
// this.instance = new control.ZoomSlider(this);
|
|
||||||
// this.map.instance.addControl(this.instance);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// ngOnDestroy() {
|
|
||||||
// // console.log('removing aol-control-zoomslider');
|
|
||||||
// this.map.instance.removeControl(this.instance);
|
|
||||||
// }
|
|
||||||
// }
|
|
@@ -1,118 +0,0 @@
|
|||||||
import { Component, Optional, OnChanges, Input, SimpleChanges } from '@angular/core';
|
|
||||||
import { proj, Coordinate } from 'openlayers';
|
|
||||||
import { MapComponent } from './map.component';
|
|
||||||
import { GeometryPointComponent, GeometryLinestringComponent, GeometryPolygonComponent } from './geometry.components';
|
|
||||||
import { ViewComponent } from './view.component';
|
|
||||||
import { OverlayComponent } from './overlay.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-coordinate',
|
|
||||||
template: `<div class="aol-coordinate"></div>`
|
|
||||||
})
|
|
||||||
export class CoordinateComponent implements OnChanges {
|
|
||||||
private host: any;
|
|
||||||
|
|
||||||
@Input() x: number;
|
|
||||||
@Input() y: number;
|
|
||||||
@Input() srid: string = 'EPSG:3857';
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private map: MapComponent,
|
|
||||||
@Optional() viewHost: ViewComponent,
|
|
||||||
@Optional() geometryPointHost: GeometryPointComponent,
|
|
||||||
@Optional() overlayHost: OverlayComponent
|
|
||||||
) {
|
|
||||||
// console.log('instancing aol-coordinate');
|
|
||||||
if (geometryPointHost !== null) {
|
|
||||||
this.host = geometryPointHost;
|
|
||||||
} else if (viewHost !== null) {
|
|
||||||
this.host = viewHost;
|
|
||||||
} else if (overlayHost !== null) {
|
|
||||||
this.host = overlayHost;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
|
||||||
let referenceProjection: proj.Projection;
|
|
||||||
let referenceProjectionCode: string;
|
|
||||||
let transformedCoordinates: number[];
|
|
||||||
|
|
||||||
referenceProjection = this.map.instance.getView().getProjection();
|
|
||||||
referenceProjectionCode = referenceProjection ? referenceProjection.getCode() : 'EPSG:3857';
|
|
||||||
|
|
||||||
if (this.srid === referenceProjectionCode) {
|
|
||||||
transformedCoordinates = [this.x, this.y];
|
|
||||||
} else {
|
|
||||||
transformedCoordinates = proj.transform([this.x, this.y], this.srid, referenceProjectionCode);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (this.host.componentType) {
|
|
||||||
case 'geometry-point':
|
|
||||||
this.host.instance.setCoordinates(transformedCoordinates);
|
|
||||||
break;
|
|
||||||
case 'view':
|
|
||||||
this.host.instance.setCenter(transformedCoordinates);
|
|
||||||
break;
|
|
||||||
case 'overlay':
|
|
||||||
this.host.instance.setPosition(transformedCoordinates);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-collection-coordinates',
|
|
||||||
template: `<div class="aol-collection-coordinates"></div>`
|
|
||||||
})
|
|
||||||
export class CollectionCoordinatesComponent implements OnChanges {
|
|
||||||
private host: any;
|
|
||||||
|
|
||||||
@Input() coordinates: [number, number][];
|
|
||||||
@Input() srid: string = 'EPSG:3857';
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private map: MapComponent,
|
|
||||||
@Optional() geometryLinestring: GeometryLinestringComponent,
|
|
||||||
@Optional() geometryPolygon: GeometryPolygonComponent
|
|
||||||
) {
|
|
||||||
// console.log('creating aol-collection-coordinates');
|
|
||||||
if (!!geometryLinestring) {
|
|
||||||
this.host = geometryLinestring;
|
|
||||||
} else if (!!geometryPolygon) {
|
|
||||||
this.host = geometryPolygon;
|
|
||||||
} else {
|
|
||||||
throw new Error('aol-collection-coordinates must be a child of a geometry component');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
|
||||||
let referenceProjection: proj.Projection;
|
|
||||||
let referenceProjectionCode: string;
|
|
||||||
let transformedCoordinates: Array<Coordinate>;
|
|
||||||
|
|
||||||
// console.log('coordinates change: ', this.coordinates);
|
|
||||||
|
|
||||||
referenceProjection = this.map.instance.getView().getProjection();
|
|
||||||
referenceProjectionCode = referenceProjection ? referenceProjection.getCode() : 'EPSG:3857';
|
|
||||||
|
|
||||||
if (this.srid === referenceProjectionCode) {
|
|
||||||
transformedCoordinates = this.coordinates;
|
|
||||||
} else {
|
|
||||||
transformedCoordinates = [];
|
|
||||||
this.coordinates.forEach(function (coordinate: Coordinate) {
|
|
||||||
transformedCoordinates.push(proj.transform(coordinate, this.srid, referenceProjectionCode));
|
|
||||||
}.bind(this));
|
|
||||||
}
|
|
||||||
switch (this.host.componentType) {
|
|
||||||
case 'geometry-linestring':
|
|
||||||
this.host.instance.setCoordinates(transformedCoordinates);
|
|
||||||
break;
|
|
||||||
case 'geometry-polygon':
|
|
||||||
this.host.instance.setCoordinates([transformedCoordinates]);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new Error('aol-collection-coordinates\' host is of unknown type: ' + this.host.componentType);
|
|
||||||
// break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,6 +0,0 @@
|
|||||||
import { format } from 'openlayers';
|
|
||||||
|
|
||||||
export class FormatComponent {
|
|
||||||
public instance: format.Feature;
|
|
||||||
public componentType = 'format';
|
|
||||||
}
|
|
@@ -1,2 +0,0 @@
|
|||||||
export * from './format.component';
|
|
||||||
export * from './mvt.component';
|
|
@@ -1,25 +0,0 @@
|
|||||||
import { Component, forwardRef, Input } from '@angular/core';
|
|
||||||
import { format, geom } from 'openlayers';
|
|
||||||
import { FormatComponent } from './format.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-format-mvt',
|
|
||||||
template: '',
|
|
||||||
providers: [
|
|
||||||
{ provide: FormatComponent, useExisting: forwardRef(() => FormatMVTComponent) }
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class FormatMVTComponent extends FormatComponent {
|
|
||||||
instance: format.MVT;
|
|
||||||
|
|
||||||
@Input() featureClass: (((geom: (geom.Geometry | { [k: string]: any })) => any) |
|
|
||||||
((geom: geom.GeometryType, arg2: number[], arg3: (number[] | number[][]), arg4: { [k: string]: any }) => any));
|
|
||||||
@Input() geometryName: string;
|
|
||||||
@Input() layerName: string;
|
|
||||||
@Input() layers: string[];
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
this.instance = new format.MVT(this);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,69 +0,0 @@
|
|||||||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
|
||||||
import { geom } from 'openlayers';
|
|
||||||
import { FeatureComponent } from './feature.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-geometry-linestring',
|
|
||||||
template: `<ng-content></ng-content>`
|
|
||||||
})
|
|
||||||
export class GeometryLinestringComponent implements OnInit, OnDestroy {
|
|
||||||
public componentType: string = 'geometry-linestring';
|
|
||||||
public instance: geom.LineString;
|
|
||||||
|
|
||||||
constructor(private host: FeatureComponent) {
|
|
||||||
// console.log('instancing aol-geometry-linestring');
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new geom.LineString([]);
|
|
||||||
this.host.instance.setGeometry(this.instance);
|
|
||||||
}
|
|
||||||
ngOnDestroy() {
|
|
||||||
// this.host.setGeometry(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-geometry-point',
|
|
||||||
template: `<ng-content></ng-content>`
|
|
||||||
})
|
|
||||||
export class GeometryPointComponent implements OnInit, OnDestroy {
|
|
||||||
public componentType: string = 'geometry-point';
|
|
||||||
public instance: geom.Point;
|
|
||||||
|
|
||||||
constructor(private host: FeatureComponent) {
|
|
||||||
// console.log('creating aol-geometry-point');
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new geom.Point([0, 0]); // defaulting coordinates to [0,0]. To be overridden in child component.
|
|
||||||
this.host.instance.setGeometry(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
// this.host.setGeometry(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-geometry-polygon',
|
|
||||||
template: `<ng-content></ng-content>`
|
|
||||||
})
|
|
||||||
export class GeometryPolygonComponent implements OnInit, OnDestroy {
|
|
||||||
public componentType: string = 'geometry-polygon';
|
|
||||||
public instance: geom.Polygon;
|
|
||||||
|
|
||||||
constructor(private host: FeatureComponent) {
|
|
||||||
// console.log('creating aol-geometry-polygon');
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
// defaulting coordinates to [0,0]. To be overridden in child component.
|
|
||||||
this.instance = new geom.Polygon([ [ [0, 0], [1, 0], [1, 1] ] ]);
|
|
||||||
this.host.instance.setGeometry(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
// this.host.setGeometry(null);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,19 +0,0 @@
|
|||||||
export * from './controls';
|
|
||||||
export * from './formats';
|
|
||||||
export * from './interactions';
|
|
||||||
export * from './layers';
|
|
||||||
export * from './sources';
|
|
||||||
export * from './styles';
|
|
||||||
|
|
||||||
export * from './attribution.component';
|
|
||||||
export * from './attributions.component';
|
|
||||||
export * from './content.component';
|
|
||||||
export * from './coordinate.component';
|
|
||||||
export * from './feature.component';
|
|
||||||
export * from './geometry.components';
|
|
||||||
export * from './graticule.component';
|
|
||||||
export * from './map.component';
|
|
||||||
export * from './overlay.component';
|
|
||||||
export * from './tilegrid.component';
|
|
||||||
export * from './tilegridwmts.component';
|
|
||||||
export * from './view.component';
|
|
@@ -1,23 +0,0 @@
|
|||||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
|
||||||
import { interaction, Collection } from 'openlayers';
|
|
||||||
import { MapComponent } from '../map.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-interaction-default',
|
|
||||||
template: ''
|
|
||||||
})
|
|
||||||
export class DefaultInteractionComponent implements OnInit, OnDestroy {
|
|
||||||
instance: Collection<interaction.Interaction>;
|
|
||||||
|
|
||||||
constructor(private map: MapComponent) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = interaction.defaults();
|
|
||||||
this.instance.forEach((interaction) => this.map.instance.addInteraction(interaction));
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this.instance.forEach((interaction) => this.map.instance.removeInteraction(interaction));
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,50 +0,0 @@
|
|||||||
import { Component, Input, OnDestroy, OnInit, EventEmitter, Output } from '@angular/core';
|
|
||||||
import { interaction } from 'openlayers';
|
|
||||||
import { MapComponent } from '../map.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-interaction-draw',
|
|
||||||
template: ''
|
|
||||||
})
|
|
||||||
export class DrawInteractionComponent implements OnInit, OnDestroy {
|
|
||||||
instance: interaction.Draw;
|
|
||||||
|
|
||||||
@Input() clickTolerance?: number;
|
|
||||||
@Input() features?: ol.Collection<ol.Feature>;
|
|
||||||
@Input() source?: ol.source.Vector;
|
|
||||||
@Input() snapTolerance?: number;
|
|
||||||
@Input() type: ol.geom.GeometryType;
|
|
||||||
@Input() maxPoints?: number;
|
|
||||||
@Input() minPoints?: number;
|
|
||||||
@Input() finishCondition?: ol.EventsConditionType;
|
|
||||||
@Input() style?: (ol.style.Style | ol.style.Style[] | ol.StyleFunction);
|
|
||||||
@Input() geometryFunction?: ol.DrawGeometryFunctionType;
|
|
||||||
@Input() geometryName?: string;
|
|
||||||
@Input() condition?: ol.EventsConditionType;
|
|
||||||
@Input() freehandCondition?: ol.EventsConditionType;
|
|
||||||
@Input() freehand?: boolean;
|
|
||||||
@Input() wrapX?: boolean;
|
|
||||||
|
|
||||||
@Output() onChange = new EventEmitter<ol.interaction.Draw.Event>();
|
|
||||||
@Output() onChangeActive = new EventEmitter<ol.interaction.Draw.Event>();
|
|
||||||
@Output() onDrawEnd = new EventEmitter<ol.interaction.Draw.Event>();
|
|
||||||
@Output() onDrawStart = new EventEmitter<ol.interaction.Draw.Event>();
|
|
||||||
@Output() onPropertyChange = new EventEmitter<ol.interaction.Draw.Event>();
|
|
||||||
|
|
||||||
constructor(private map: MapComponent) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new interaction.Draw(this);
|
|
||||||
this.instance.on('change', (event: ol.interaction.Draw.Event) => this.onChange.emit(event));
|
|
||||||
this.instance.on('change:active', (event: ol.interaction.Draw.Event) => this.onChangeActive.emit(event));
|
|
||||||
this.instance.on('drawend', (event: ol.interaction.Draw.Event) => this.onDrawEnd.emit(event));
|
|
||||||
this.instance.on('drawstart', (event: ol.interaction.Draw.Event) => this.onDrawStart.emit(event));
|
|
||||||
this.instance.on('propertychange', (event: ol.interaction.Draw.Event) => this.onPropertyChange.emit(event));
|
|
||||||
this.map.instance.addInteraction(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this.map.instance.removeInteraction(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,14 +0,0 @@
|
|||||||
export * from './default.component';
|
|
||||||
export * from './doubleclickzoom.component';
|
|
||||||
export * from './draganddrop.component';
|
|
||||||
export * from './dragbox.component';
|
|
||||||
export * from './dragpan.component';
|
|
||||||
export * from './dragrotate.component';
|
|
||||||
export * from './dragrotateandzoom.component';
|
|
||||||
export * from './dragzoom.component';
|
|
||||||
export * from './mousewheelzoom.component';
|
|
||||||
export * from './pinchzoom.component';
|
|
||||||
export * from './draw.component';
|
|
||||||
export * from './select.component';
|
|
||||||
export * from './translate.component';
|
|
||||||
export * from './modify.component';
|
|
@@ -1,42 +0,0 @@
|
|||||||
import { Component, OnDestroy, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
||||||
import { interaction, EventsConditionType, style, StyleFunction, Collection, Feature, source } from 'openlayers';
|
|
||||||
import { MapComponent } from '../map.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-interaction-modify',
|
|
||||||
template: ''
|
|
||||||
})
|
|
||||||
export class ModifyInteractionComponent implements OnInit, OnDestroy {
|
|
||||||
instance: interaction.Modify;
|
|
||||||
|
|
||||||
@Input() condition?: EventsConditionType;
|
|
||||||
@Input() deleteCondition?: EventsConditionType;
|
|
||||||
@Input() pixelTolerance?: number;
|
|
||||||
@Input() style?: (style.Style | style.Style[] | StyleFunction);
|
|
||||||
@Input() features: Collection<Feature>;
|
|
||||||
@Input() wrapX?: boolean;
|
|
||||||
@Input() source?: source.Vector;
|
|
||||||
|
|
||||||
@Output() onModifyEnd = new EventEmitter<interaction.Modify.Event>();
|
|
||||||
@Output() onModifyStart = new EventEmitter<interaction.Modify.Event>();
|
|
||||||
@Output() onChange = new EventEmitter<interaction.Modify.Event>();
|
|
||||||
@Output() onChangeActive = new EventEmitter<interaction.Modify.Event>();
|
|
||||||
@Output() onPropertyChange = new EventEmitter<interaction.Modify.Event>();
|
|
||||||
|
|
||||||
constructor(private map: MapComponent) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new interaction.Modify(this);
|
|
||||||
this.instance.on('change', (event: interaction.Modify.Event) => this.onChange.emit(event));
|
|
||||||
this.instance.on('change:active', (event: interaction.Modify.Event) => this.onChangeActive.emit(event));
|
|
||||||
this.instance.on('propertychange', (event: interaction.Modify.Event) => this.onPropertyChange.emit(event));
|
|
||||||
this.instance.on('modifyend', (event: interaction.Modify.Event) => this.onModifyEnd.emit(event));
|
|
||||||
this.instance.on('modifystart', (event: interaction.Modify.Event) => this.onModifyStart.emit(event));
|
|
||||||
this.map.instance.addInteraction(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this.map.instance.removeInteraction(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,36 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
var core_1 = require("@angular/core");
|
|
||||||
var openlayers_1 = require("openlayers");
|
|
||||||
var PinchZoomInteractionComponent = (function () {
|
|
||||||
function PinchZoomInteractionComponent(map) {
|
|
||||||
this.map = map;
|
|
||||||
}
|
|
||||||
PinchZoomInteractionComponent.prototype.ngOnInit = function () {
|
|
||||||
this.instance = new openlayers_1.interaction.PinchZoom(this);
|
|
||||||
this.map.instance.addInteraction(this.instance);
|
|
||||||
};
|
|
||||||
PinchZoomInteractionComponent.prototype.ngOnDestroy = function () {
|
|
||||||
this.map.instance.removeInteraction(this.instance);
|
|
||||||
};
|
|
||||||
return PinchZoomInteractionComponent;
|
|
||||||
}());
|
|
||||||
__decorate([
|
|
||||||
core_1.Input()
|
|
||||||
], PinchZoomInteractionComponent.prototype, "duration", void 0);
|
|
||||||
__decorate([
|
|
||||||
core_1.Input()
|
|
||||||
], PinchZoomInteractionComponent.prototype, "constrainResolution", void 0);
|
|
||||||
PinchZoomInteractionComponent = __decorate([
|
|
||||||
core_1.Component({
|
|
||||||
selector: 'aol-interaction-pinchzoom',
|
|
||||||
template: ''
|
|
||||||
})
|
|
||||||
], PinchZoomInteractionComponent);
|
|
||||||
exports.PinchZoomInteractionComponent = PinchZoomInteractionComponent;
|
|
@@ -1,44 +0,0 @@
|
|||||||
import { Component, OnDestroy, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
||||||
import { interaction, EventsConditionType, layer, style, Collection, SelectFilterFunction, StyleFunction, Feature } from 'openlayers';
|
|
||||||
import { MapComponent } from '../map.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-interaction-select',
|
|
||||||
template: ''
|
|
||||||
})
|
|
||||||
export class SelectInteractionComponent implements OnInit, OnDestroy {
|
|
||||||
instance: interaction.Select;
|
|
||||||
|
|
||||||
|
|
||||||
@Input() addCondition?: EventsConditionType;
|
|
||||||
@Input() condition?: EventsConditionType;
|
|
||||||
@Input() layers?: (layer.Layer[] | ((layer: layer.Layer) => boolean));
|
|
||||||
@Input() style?: (style.Style | style.Style[] | StyleFunction);
|
|
||||||
@Input() removeCondition?: EventsConditionType;
|
|
||||||
@Input() toggleCondition?: EventsConditionType;
|
|
||||||
@Input() multi?: boolean;
|
|
||||||
@Input() features?: Collection<Feature>;
|
|
||||||
@Input() filter?: SelectFilterFunction;
|
|
||||||
@Input() wrapX?: boolean;
|
|
||||||
|
|
||||||
@Output() onChange = new EventEmitter<interaction.Select.Event>();
|
|
||||||
@Output() onSelect = new EventEmitter<interaction.Select.Event>();
|
|
||||||
@Output() onPropertyChange = new EventEmitter<interaction.Select.Event>();
|
|
||||||
|
|
||||||
constructor(private map: MapComponent) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new interaction.Select(this);
|
|
||||||
|
|
||||||
this.instance.on('change', (event: interaction.Select.Event) => this.onChange.emit(event));
|
|
||||||
this.instance.on('select', (event: interaction.Select.Event) => this.onSelect.emit(event));
|
|
||||||
this.instance.on('propertychange', (event: interaction.Select.Event) => this.onPropertyChange.emit(event));
|
|
||||||
|
|
||||||
this.map.instance.addInteraction(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this.map.instance.removeInteraction(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,45 +0,0 @@
|
|||||||
import { Component, OnDestroy, OnInit, Input, Output, EventEmitter } from '@angular/core';
|
|
||||||
import { interaction, layer, Collection, Feature } from 'openlayers';
|
|
||||||
import { MapComponent } from '../map.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-interaction-translate',
|
|
||||||
template: ''
|
|
||||||
})
|
|
||||||
export class TranslateInteractionComponent implements OnInit, OnDestroy {
|
|
||||||
instance: interaction.Translate;
|
|
||||||
|
|
||||||
@Input() features?: Collection<Feature>;
|
|
||||||
@Input() layers?: (layer.Layer[] | ((layer: layer.Layer) => boolean));
|
|
||||||
@Input() hitTolerance?: number;
|
|
||||||
|
|
||||||
@Output() onChange: EventEmitter<interaction.Translate.Event>;
|
|
||||||
@Output() onPropertyChange: EventEmitter<interaction.Translate.Event>;
|
|
||||||
@Output() onTranslateEnd: EventEmitter<interaction.Translate.Event>;
|
|
||||||
@Output() onTranslateStart: EventEmitter<interaction.Translate.Event>;
|
|
||||||
@Output() onTranslating: EventEmitter<interaction.Translate.Event>;
|
|
||||||
|
|
||||||
constructor(private map: MapComponent) {
|
|
||||||
this.onChange = new EventEmitter<interaction.Translate.Event>();
|
|
||||||
this.onPropertyChange = new EventEmitter<interaction.Translate.Event>();
|
|
||||||
this.onTranslateEnd = new EventEmitter<interaction.Translate.Event>();
|
|
||||||
this.onTranslateStart = new EventEmitter<interaction.Translate.Event>();
|
|
||||||
this.onTranslating = new EventEmitter<interaction.Translate.Event>();
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new interaction.Translate(this);
|
|
||||||
|
|
||||||
this.instance.on('change', (event: interaction.Translate.Event) => this.onChange.emit(event));
|
|
||||||
this.instance.on('propertychange', (event: interaction.Translate.Event) => this.onPropertyChange.emit(event));
|
|
||||||
this.instance.on('translateend', (event: interaction.Translate.Event) => this.onTranslateEnd.emit(event));
|
|
||||||
this.instance.on('translatestart', (event: interaction.Translate.Event) => this.onTranslateStart.emit(event));
|
|
||||||
this.instance.on('translating', (event: interaction.Translate.Event) => this.onTranslating.emit(event));
|
|
||||||
|
|
||||||
this.map.instance.addInteraction(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this.map.instance.removeInteraction(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,6 +0,0 @@
|
|||||||
export * from './layer.component';
|
|
||||||
export * from './layergroup.component';
|
|
||||||
export * from './layerimage.component';
|
|
||||||
export * from './layertile.component';
|
|
||||||
export * from './layervector.component';
|
|
||||||
export * from './layervectortile.component';
|
|
@@ -1,59 +0,0 @@
|
|||||||
import { OnDestroy, OnInit, OnChanges, Input, SimpleChanges, Component, Injectable } from '@angular/core';
|
|
||||||
import { layer, Extent } from 'openlayers';
|
|
||||||
import { MapComponent } from '../map.component';
|
|
||||||
import { LayerGroupComponent } from './layergroup.component';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export abstract class LayerComponent implements OnInit, OnChanges, OnDestroy {
|
|
||||||
public instance: any;
|
|
||||||
public componentType: string = 'layer';
|
|
||||||
|
|
||||||
@Input() opacity: number;
|
|
||||||
@Input() visible: boolean;
|
|
||||||
@Input() extent: Extent;
|
|
||||||
@Input() zIndex: number;
|
|
||||||
@Input() minResolution: number;
|
|
||||||
@Input() maxResolution: number;
|
|
||||||
|
|
||||||
@Input() precompose: (evt: ol.events.Event) => void;
|
|
||||||
@Input() postcompose: (evt: ol.events.Event) => void;
|
|
||||||
|
|
||||||
constructor(protected host: LayerGroupComponent | MapComponent) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
if (this.precompose !== null && this.precompose !== undefined) {
|
|
||||||
this.instance.on('precompose', this.precompose);
|
|
||||||
}
|
|
||||||
if (this.postcompose !== null && this.postcompose !== undefined) {
|
|
||||||
this.instance.on('postcompose', this.postcompose);
|
|
||||||
}
|
|
||||||
this.host.instance.getLayers().push(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this.host.instance.getLayers().remove(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
|
||||||
let properties: { [index: string]: any } = {};
|
|
||||||
if (!this.instance) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (let key in changes) {
|
|
||||||
if (changes.hasOwnProperty(key)) {
|
|
||||||
properties[key] = changes[key].currentValue;
|
|
||||||
if (key === 'precompose') {
|
|
||||||
this.instance.un('precompose', changes[key].previousValue)
|
|
||||||
this.instance.on('precompose', changes[key].currentValue);
|
|
||||||
}
|
|
||||||
if (key === 'postcompose') {
|
|
||||||
this.instance.un('postcompose', changes[key].previousValue)
|
|
||||||
this.instance.on('postcompose', changes[key].currentValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// console.log('changes detected in aol-layer, setting new properties: ', properties);
|
|
||||||
this.instance.setProperties(properties, false);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,37 +0,0 @@
|
|||||||
import {
|
|
||||||
Component, EventEmitter, Input, OnChanges, OnInit, Optional,
|
|
||||||
SimpleChanges
|
|
||||||
} from '@angular/core';
|
|
||||||
import { Extent, layer, source } from 'openlayers';
|
|
||||||
import { MapComponent } from '../map.component';
|
|
||||||
import { LayerComponent } from './layer.component';
|
|
||||||
import { LayerGroupComponent } from './layergroup.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-layer-image',
|
|
||||||
template: `<ng-content></ng-content>`
|
|
||||||
})
|
|
||||||
export class LayerImageComponent extends LayerComponent implements OnInit, OnChanges {
|
|
||||||
public source: source.Image;
|
|
||||||
|
|
||||||
@Input() opacity: number;
|
|
||||||
@Input() visible: boolean;
|
|
||||||
@Input() extent: Extent;
|
|
||||||
@Input() minResolution: number;
|
|
||||||
@Input() maxResolution: number;
|
|
||||||
@Input() zIndex: number;
|
|
||||||
|
|
||||||
constructor(map: MapComponent,
|
|
||||||
@Optional() group?: LayerGroupComponent) {
|
|
||||||
super(group || map);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new layer.Image(this);
|
|
||||||
super.ngOnInit();
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
|
||||||
super.ngOnChanges(changes);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,33 +0,0 @@
|
|||||||
import {
|
|
||||||
Component, OnDestroy, OnInit, Input, Optional, OnChanges,
|
|
||||||
SimpleChanges
|
|
||||||
} from '@angular/core';
|
|
||||||
import { layer, source } from 'openlayers';
|
|
||||||
import { MapComponent } from '../map.component';
|
|
||||||
import { LayerComponent } from './layer.component';
|
|
||||||
import { LayerGroupComponent } from './layergroup.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-layer-vector',
|
|
||||||
template: `<ng-content></ng-content>`
|
|
||||||
})
|
|
||||||
export class LayerVectorComponent extends LayerComponent implements OnInit, OnDestroy, OnChanges {
|
|
||||||
public source: source.Vector;
|
|
||||||
|
|
||||||
@Input() renderBuffer: number;
|
|
||||||
|
|
||||||
constructor(map: MapComponent,
|
|
||||||
@Optional() group?: LayerGroupComponent) {
|
|
||||||
super(group || map);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
// console.log('creating ol.layer.Vector instance with:', this);
|
|
||||||
this.instance = new layer.Vector(this);
|
|
||||||
super.ngOnInit();
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
|
||||||
super.ngOnChanges(changes);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,90 +0,0 @@
|
|||||||
import {
|
|
||||||
Component, OnInit, ElementRef, Input, Output, EventEmitter, AfterViewInit,
|
|
||||||
SimpleChanges, OnChanges
|
|
||||||
} from '@angular/core';
|
|
||||||
import {
|
|
||||||
Map, MapBrowserEvent, MapEvent, render, ObjectEvent, control,
|
|
||||||
interaction
|
|
||||||
} from 'openlayers';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-map',
|
|
||||||
template: `<div [style.width]="width" [style.height]="height"></div><ng-content></ng-content>`
|
|
||||||
})
|
|
||||||
|
|
||||||
export class MapComponent implements OnInit, AfterViewInit, OnChanges {
|
|
||||||
public instance: Map;
|
|
||||||
public componentType: string = 'map';
|
|
||||||
|
|
||||||
@Input() width: string = '100%';
|
|
||||||
@Input() height: string = '100%';
|
|
||||||
@Input() pixelRatio: number;
|
|
||||||
@Input() keyboardEventTarget: Element|string;
|
|
||||||
@Input() loadTilesWhileAnimating: boolean;
|
|
||||||
@Input() loadTilesWhileInteracting: boolean;
|
|
||||||
@Input() logo: string|boolean;
|
|
||||||
@Input() renderer: 'canvas'|'webgl';
|
|
||||||
|
|
||||||
|
|
||||||
@Output() onClick: EventEmitter<MapBrowserEvent>;
|
|
||||||
@Output() onDblClick: EventEmitter<MapBrowserEvent>;
|
|
||||||
@Output() onMoveEnd: EventEmitter<MapEvent>;
|
|
||||||
@Output() onPointerDrag: EventEmitter<MapBrowserEvent>;
|
|
||||||
@Output() onPointerMove: EventEmitter<MapBrowserEvent>;
|
|
||||||
@Output() onPostCompose: EventEmitter<render.Event>;
|
|
||||||
@Output() onPostRender: EventEmitter<MapEvent>;
|
|
||||||
@Output() onPreCompose: EventEmitter<render.Event>;
|
|
||||||
@Output() onPropertyChange: EventEmitter<ObjectEvent>;
|
|
||||||
@Output() onSingleClick: EventEmitter<MapBrowserEvent>;
|
|
||||||
|
|
||||||
// we pass empty arrays to not get default controls/interactions because we have our own directives
|
|
||||||
controls: control.Control[] = [];
|
|
||||||
interactions: interaction.Interaction[] = [];
|
|
||||||
|
|
||||||
constructor(private host: ElementRef) {
|
|
||||||
this.onClick = new EventEmitter<MapBrowserEvent>();
|
|
||||||
this.onDblClick = new EventEmitter<MapBrowserEvent>();
|
|
||||||
this.onMoveEnd = new EventEmitter<MapEvent>();
|
|
||||||
this.onPointerDrag = new EventEmitter<MapBrowserEvent>();
|
|
||||||
this.onPointerMove = new EventEmitter<MapBrowserEvent>();
|
|
||||||
this.onPostCompose = new EventEmitter<render.Event>();
|
|
||||||
this.onPostRender = new EventEmitter<MapEvent>();
|
|
||||||
this.onPreCompose = new EventEmitter<render.Event>();
|
|
||||||
this.onPropertyChange = new EventEmitter<ObjectEvent>();
|
|
||||||
this.onSingleClick = new EventEmitter<MapBrowserEvent>();
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
// console.log('creating ol.Map instance with:', this);
|
|
||||||
this.instance = new Map(this);
|
|
||||||
this.instance.setTarget(this.host.nativeElement.firstElementChild);
|
|
||||||
this.instance.on('click', (event: MapBrowserEvent) => this.onClick.emit(event));
|
|
||||||
this.instance.on('dblclick', (event: MapBrowserEvent) => this.onDblClick.emit(event));
|
|
||||||
this.instance.on('moveend', (event: MapEvent) => this.onMoveEnd.emit(event));
|
|
||||||
this.instance.on('pointerdrag', (event: MapBrowserEvent) => this.onPointerDrag.emit(event));
|
|
||||||
this.instance.on('pointermove', (event: MapBrowserEvent) => this.onPointerMove.emit(event));
|
|
||||||
this.instance.on('postcompose', (event: render.Event) => this.onPostCompose.emit(event));
|
|
||||||
this.instance.on('postrender', (event: MapEvent) => this.onPostRender.emit(event));
|
|
||||||
this.instance.on('precompose', (event: render.Event) => this.onPreCompose.emit(event));
|
|
||||||
this.instance.on('propertychange', (event: ObjectEvent) => this.onPropertyChange.emit(event));
|
|
||||||
this.instance.on('singleclick', (event: MapBrowserEvent) => this.onSingleClick.emit(event));
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
|
||||||
let properties: { [index: string]: any } = {};
|
|
||||||
if (!this.instance) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (let key in changes) {
|
|
||||||
if (changes.hasOwnProperty(key)) {
|
|
||||||
properties[key] = changes[key].currentValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// console.log('changes detected in aol-map, setting new properties: ', properties);
|
|
||||||
this.instance.setProperties(properties, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngAfterViewInit() {
|
|
||||||
this.instance.updateSize();
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,34 +0,0 @@
|
|||||||
import { Component, Host, Input, OnInit, forwardRef } from '@angular/core';
|
|
||||||
import { source, TileLoadFunctionType } from 'openlayers';
|
|
||||||
import { LayerTileComponent } from '../layers';
|
|
||||||
import { SourceComponent } from './source.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-source-bingmaps',
|
|
||||||
template: `<div class="aol-source-bingmaps"></div>`,
|
|
||||||
providers: [
|
|
||||||
{ provide: SourceComponent, useExisting: forwardRef(() => SourceBingmapsComponent) }
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SourceBingmapsComponent extends SourceComponent implements OnInit {
|
|
||||||
instance: source.BingMaps;
|
|
||||||
|
|
||||||
@Input() cacheSize: number;
|
|
||||||
@Input() hidpi: boolean;
|
|
||||||
@Input() culture: string;
|
|
||||||
@Input() key: string;
|
|
||||||
@Input() imagerySet: 'Road'|'Aerial'|'AerialWithLabels'|'collinsBart'|'ordnanceSurvey' = 'Aerial';
|
|
||||||
@Input() maxZoom: number;
|
|
||||||
@Input() reprojectionErrorThreshold: number;
|
|
||||||
@Input() tileLoadFunction: TileLoadFunctionType;
|
|
||||||
@Input() wrapX: boolean;
|
|
||||||
|
|
||||||
constructor(@Host() layer: LayerTileComponent) {
|
|
||||||
super(layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new source.BingMaps(this);
|
|
||||||
this.host.instance.setSource(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,34 +0,0 @@
|
|||||||
import {Component, Host, Input, OnInit, forwardRef, ContentChild, AfterContentInit} from '@angular/core';
|
|
||||||
import { source, Feature, geom } from 'openlayers';
|
|
||||||
import { LayerVectorComponent } from '../layers';
|
|
||||||
import { SourceComponent } from './source.component';
|
|
||||||
import { SourceVectorComponent } from './vector.component';
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-source-cluster',
|
|
||||||
template: `<ng-content></ng-content>`,
|
|
||||||
providers: [
|
|
||||||
{ provide: SourceComponent, useExisting: forwardRef(() => SourceClusterComponent) }
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SourceClusterComponent extends SourceComponent implements AfterContentInit {
|
|
||||||
instance: source.Cluster;
|
|
||||||
|
|
||||||
@Input() distance: number;
|
|
||||||
@Input() geometryFunction?: ((feature: Feature) => geom.Point);
|
|
||||||
|
|
||||||
@ContentChild(SourceVectorComponent) sourceVectorComponent: SourceVectorComponent;
|
|
||||||
source: source.Vector;
|
|
||||||
|
|
||||||
constructor(@Host() layer: LayerVectorComponent) {
|
|
||||||
super(layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngAfterContentInit() {
|
|
||||||
this.source = this.sourceVectorComponent.instance;
|
|
||||||
|
|
||||||
this.instance = new source.Cluster(this);
|
|
||||||
this.host.instance.setSource(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,32 +0,0 @@
|
|||||||
import { Component, Host, Input, OnInit, forwardRef } from '@angular/core';
|
|
||||||
import { source, ProjectionLike, format } from 'openlayers';
|
|
||||||
import { LayerVectorComponent } from '../layers';
|
|
||||||
import { FormatComponent } from '../formats';
|
|
||||||
import { SourceComponent } from './source.component';
|
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-source-geojson',
|
|
||||||
template: `<ng-content></ng-content>`,
|
|
||||||
providers: [
|
|
||||||
{ provide: SourceComponent, useExisting: forwardRef(() => SourceGeoJSONComponent) }
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SourceGeoJSONComponent extends SourceComponent implements OnInit {
|
|
||||||
instance: source.Vector;
|
|
||||||
format: format.Feature;
|
|
||||||
@Input() defaultDataProjection: ProjectionLike;
|
|
||||||
@Input() featureProjection: ProjectionLike;
|
|
||||||
@Input() geometryName: string;
|
|
||||||
@Input() url: string;
|
|
||||||
|
|
||||||
constructor( @Host() layer: LayerVectorComponent) {
|
|
||||||
super(layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.format = new format.GeoJSON(this);
|
|
||||||
this.instance = new source.Vector(this);
|
|
||||||
this.host.instance.setSource(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,31 +0,0 @@
|
|||||||
import { Component, Host, Input, OnInit, forwardRef } from '@angular/core';
|
|
||||||
import { ProjectionLike, source, Extent, AttributionLike, ImageLoadFunctionType, Size } from 'openlayers';
|
|
||||||
import { SourceComponent } from './source.component';
|
|
||||||
import { LayerImageComponent } from '../layers/layerimage.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-source-imagestatic',
|
|
||||||
template: `<ng-content></ng-content>`,
|
|
||||||
providers: [{ provide: SourceComponent, useExisting: forwardRef(() => SourceImageStaticComponent) }],
|
|
||||||
})
|
|
||||||
export class SourceImageStaticComponent extends SourceComponent implements OnInit {
|
|
||||||
instance: source.ImageStatic;
|
|
||||||
|
|
||||||
@Input() projection: (ProjectionLike | string);
|
|
||||||
@Input() imageExtent: Extent;
|
|
||||||
@Input() url: string;
|
|
||||||
@Input() attributions: AttributionLike;
|
|
||||||
@Input() crossOrigin?: string;
|
|
||||||
@Input() imageLoadFunction?: ImageLoadFunctionType;
|
|
||||||
@Input() logo?: (string | olx.LogoOptions);
|
|
||||||
@Input() imageSize?: Size;
|
|
||||||
|
|
||||||
constructor(@Host() layer: LayerImageComponent) {
|
|
||||||
super(layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new source.ImageStatic(this);
|
|
||||||
this.host.instance.setSource(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,36 +0,0 @@
|
|||||||
import { Component, Host, Input, OnInit, forwardRef } from '@angular/core';
|
|
||||||
import { AttributionLike, ImageLoadFunctionType, ProjectionLike, source } from 'openlayers';
|
|
||||||
import { LayerImageComponent } from '../layers';
|
|
||||||
import { SourceComponent } from './source.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-source-imagewms',
|
|
||||||
template: `<ng-content></ng-content>`,
|
|
||||||
providers: [
|
|
||||||
{ provide: SourceComponent, useExisting: forwardRef(() => SourceImageWMSComponent) }
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SourceImageWMSComponent extends SourceComponent implements OnInit {
|
|
||||||
instance: source.ImageWMS;
|
|
||||||
|
|
||||||
@Input() attributions: AttributionLike;
|
|
||||||
@Input() crossOrigin: string;
|
|
||||||
@Input() hidpi: boolean;
|
|
||||||
@Input() serverType: string;
|
|
||||||
@Input() imageLoadFunction?: ImageLoadFunctionType;
|
|
||||||
@Input() logo: (string | olx.LogoOptions);
|
|
||||||
@Input() params: Object;
|
|
||||||
@Input() projection: (ProjectionLike | string);
|
|
||||||
@Input() ratio: number;
|
|
||||||
@Input() resolutions: Array<number>;
|
|
||||||
@Input() url: string;
|
|
||||||
|
|
||||||
constructor(@Host() layer: LayerImageComponent) {
|
|
||||||
super(layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new source.ImageWMS(this);
|
|
||||||
this.host.instance.setSource(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,15 +0,0 @@
|
|||||||
export * from './bingmaps.component';
|
|
||||||
export * from './osm.component';
|
|
||||||
export * from './source.component';
|
|
||||||
export * from './vector.component';
|
|
||||||
export * from './vectortile.component';
|
|
||||||
export * from './xyz.component';
|
|
||||||
export * from './tilewms.component';
|
|
||||||
export * from './geojson.component';
|
|
||||||
export * from './tilejson.component';
|
|
||||||
export * from './tileutfgrid.component';
|
|
||||||
export * from './tilewmts.component';
|
|
||||||
export * from './imagewms.component';
|
|
||||||
export * from './imagestatic.component';
|
|
||||||
export * from './cluster.component';
|
|
||||||
export * from './raster.component';
|
|
@@ -1,40 +0,0 @@
|
|||||||
import {Component, Host, forwardRef, Input, AfterContentInit, Optional, OnInit} from '@angular/core';
|
|
||||||
import { source, AttributionLike, TileLoadFunctionType } from 'openlayers';
|
|
||||||
import { LayerTileComponent } from '../layers';
|
|
||||||
import { SourceComponent } from './source.component';
|
|
||||||
import { SourceXYZComponent } from './xyz.component';
|
|
||||||
import {SourceRasterComponent} from './raster.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-source-osm',
|
|
||||||
template: `<div class="aol-source-osm"></div>`,
|
|
||||||
providers: [
|
|
||||||
{ provide: SourceComponent, useExisting: forwardRef(() => SourceOsmComponent) }
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SourceOsmComponent extends SourceXYZComponent implements AfterContentInit {
|
|
||||||
instance: source.OSM;
|
|
||||||
|
|
||||||
@Input() attributions: AttributionLike;
|
|
||||||
@Input() cacheSize: number;
|
|
||||||
@Input() crossOrigin: string;
|
|
||||||
@Input() maxZoom: number;
|
|
||||||
@Input() opaque: boolean;
|
|
||||||
@Input() reprojectionErrorThreshold: number;
|
|
||||||
@Input() tileLoadFunction: TileLoadFunctionType;
|
|
||||||
@Input() url: string;
|
|
||||||
@Input() wrapX: boolean;
|
|
||||||
|
|
||||||
constructor(@Host() @Optional() layer: LayerTileComponent,
|
|
||||||
@Host() @Optional() raster?: SourceRasterComponent) {
|
|
||||||
super(layer, raster);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngAfterContentInit() {
|
|
||||||
if (this.tileGridXYZ) {
|
|
||||||
this.tileGrid = this.tileGridXYZ.instance;
|
|
||||||
}
|
|
||||||
this.instance = new source.OSM(this);
|
|
||||||
this._register(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,42 +0,0 @@
|
|||||||
import { AfterContentInit, Component, EventEmitter, forwardRef, Host, Input, Output } from '@angular/core';
|
|
||||||
import { RasterOperation, RasterOperationType, source } from 'openlayers';
|
|
||||||
|
|
||||||
import { LayerImageComponent } from '../layers/layerimage.component';
|
|
||||||
import { SourceComponent } from './source.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-source-raster',
|
|
||||||
template: `<ng-content></ng-content>`,
|
|
||||||
providers: [
|
|
||||||
{
|
|
||||||
provide: SourceComponent,
|
|
||||||
useExisting: forwardRef(() => SourceRasterComponent)
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SourceRasterComponent extends SourceComponent implements AfterContentInit {
|
|
||||||
instance: source.Raster;
|
|
||||||
|
|
||||||
@Input() operation?: RasterOperation;
|
|
||||||
@Input() threads?: number;
|
|
||||||
@Input() lib?: Object;
|
|
||||||
@Input() operationType?: RasterOperationType;
|
|
||||||
|
|
||||||
@Output() beforeOperations: EventEmitter<source.RasterEvent> = new EventEmitter<source.RasterEvent>();
|
|
||||||
@Output() afterOperations: EventEmitter<source.RasterEvent> = new EventEmitter<source.RasterEvent>();
|
|
||||||
|
|
||||||
sources: source.Source[] = [];
|
|
||||||
|
|
||||||
constructor(@Host() layer: LayerImageComponent) {
|
|
||||||
super(layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngAfterContentInit() {
|
|
||||||
this.instance = new source.Raster(this);
|
|
||||||
|
|
||||||
this.instance.on('beforeoperations', (event: source.RasterEvent) => this.beforeOperations.emit(event));
|
|
||||||
this.instance.on('afteroperations', (event: source.RasterEvent) => this.afterOperations.emit(event));
|
|
||||||
|
|
||||||
this._register(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,39 +0,0 @@
|
|||||||
import {AfterContentInit, Component, Host, Input, OnDestroy, OnInit, Optional} from '@angular/core';
|
|
||||||
import { source } from 'openlayers';
|
|
||||||
import { LayerComponent } from '../layers';
|
|
||||||
import AttributionLike = ol.AttributionLike;
|
|
||||||
import { SourceRasterComponent } from './raster.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'required-for-ivy-2',
|
|
||||||
template: `<ng-content></ng-content>`
|
|
||||||
})
|
|
||||||
export class SourceComponent implements OnDestroy {
|
|
||||||
public instance: source.Source;
|
|
||||||
public componentType: string = 'source';
|
|
||||||
|
|
||||||
@Input() attributions: AttributionLike;
|
|
||||||
|
|
||||||
constructor(protected host: LayerComponent, protected raster?: SourceRasterComponent) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
if (this.host) {
|
|
||||||
this.host.instance.setSource(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.raster) {
|
|
||||||
this.raster.sources = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected _register(source: source.Source) {
|
|
||||||
if (this.host) {
|
|
||||||
this.host.instance.setSource(source);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.raster) {
|
|
||||||
this.raster.sources = [source];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,25 +0,0 @@
|
|||||||
import { Component, Host, Input, OnInit, forwardRef } from '@angular/core';
|
|
||||||
import { source } from 'openlayers';
|
|
||||||
import { LayerTileComponent } from '../layers';
|
|
||||||
import { SourceComponent } from './source.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-source-tileutfgrid',
|
|
||||||
template: `<ng-content></ng-content>`,
|
|
||||||
providers: [
|
|
||||||
{ provide: SourceComponent, useExisting: forwardRef(() => SourceTileUTFGridComponent) }
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SourceTileUTFGridComponent extends SourceComponent implements OnInit {
|
|
||||||
instance: source.TileUTFGrid;
|
|
||||||
@Input() tileJSON: JSON;
|
|
||||||
|
|
||||||
constructor(@Host() layer: LayerTileComponent) {
|
|
||||||
super(layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new source.TileUTFGrid(this);
|
|
||||||
this.host.instance.setSource(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,37 +0,0 @@
|
|||||||
import { Component, Host, Input, OnInit, forwardRef } from '@angular/core';
|
|
||||||
import { source, TileLoadFunctionType, tilegrid } from 'openlayers';
|
|
||||||
import { LayerTileComponent } from '../layers';
|
|
||||||
import { SourceComponent } from './source.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-source-tilewms',
|
|
||||||
template: `<ng-content></ng-content>`,
|
|
||||||
providers: [
|
|
||||||
{ provide: SourceComponent, useExisting: forwardRef(() => SourceTileWMSComponent) }
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SourceTileWMSComponent extends SourceComponent implements OnInit {
|
|
||||||
instance: source.TileWMS;
|
|
||||||
@Input() cacheSize: number;
|
|
||||||
@Input() crossOrigin: string;
|
|
||||||
@Input() gutter: number;
|
|
||||||
@Input() hidpi: boolean;
|
|
||||||
@Input() params: Object;
|
|
||||||
@Input() projection: string;
|
|
||||||
@Input() reprojectionErrorThreshold: number;
|
|
||||||
@Input() serverType: string;
|
|
||||||
@Input() tileGrid: tilegrid.TileGrid;
|
|
||||||
@Input() tileLoadFunction: TileLoadFunctionType;
|
|
||||||
@Input() url: string;
|
|
||||||
@Input() urls: string[];
|
|
||||||
@Input() wrapX: boolean;
|
|
||||||
|
|
||||||
constructor(@Host() layer: LayerTileComponent) {
|
|
||||||
super(layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new source.TileWMS(this);
|
|
||||||
this.host.instance.setSource(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,84 +0,0 @@
|
|||||||
import {Component, Host, Input, forwardRef, AfterContentInit, ContentChild, SimpleChanges} from '@angular/core';
|
|
||||||
import {
|
|
||||||
TileLoadFunctionType,
|
|
||||||
tilegrid,
|
|
||||||
ProjectionLike,
|
|
||||||
source,
|
|
||||||
ImageTile,
|
|
||||||
TileCoord,
|
|
||||||
Tile
|
|
||||||
} from 'openlayers';
|
|
||||||
import {LayerTileComponent} from '../layers';
|
|
||||||
import {SourceComponent} from './source.component';
|
|
||||||
import {TileGridWMTSComponent} from '../tilegridwmts.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-source-tilewmts',
|
|
||||||
template: `<ng-content></ng-content>`,
|
|
||||||
providers: [
|
|
||||||
{provide: SourceComponent, useExisting: forwardRef(() => SourceTileWMTSComponent)}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SourceTileWMTSComponent extends SourceComponent implements AfterContentInit {
|
|
||||||
|
|
||||||
instance: source.WMTS;
|
|
||||||
@Input() cacheSize?: number;
|
|
||||||
@Input() crossOrigin?: (string);
|
|
||||||
@Input() logo?: (string | olx.LogoOptions);
|
|
||||||
@Input() tileGrid: tilegrid.WMTS;
|
|
||||||
@Input() projection: ProjectionLike;
|
|
||||||
@Input() reprojectionErrorThreshold?: number;
|
|
||||||
@Input() requestEncoding?: (source.WMTSRequestEncoding | string);
|
|
||||||
@Input() layer: string;
|
|
||||||
@Input() style: string;
|
|
||||||
@Input() tileClass?: ((n: ImageTile, coords: TileCoord, state: Tile.State, s1: string, s2: string, type: TileLoadFunctionType) => any);
|
|
||||||
@Input() tilePixelRatio?: number;
|
|
||||||
@Input() version?: string;
|
|
||||||
@Input() format?: string;
|
|
||||||
@Input() matrixSet: string;
|
|
||||||
@Input() dimensions?: GlobalObject;
|
|
||||||
@Input() url?: string;
|
|
||||||
@Input() tileLoadFunction?: TileLoadFunctionType;
|
|
||||||
@Input() urls?: string[];
|
|
||||||
@Input() wrapX?: boolean;
|
|
||||||
|
|
||||||
@ContentChild(TileGridWMTSComponent) tileGridWMTS: TileGridWMTSComponent;
|
|
||||||
|
|
||||||
constructor(@Host() layer: LayerTileComponent) {
|
|
||||||
super(layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
|
||||||
let properties: {[index: string]: any} = {};
|
|
||||||
if (!this.instance) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (let key in changes) {
|
|
||||||
if (changes.hasOwnProperty(key)) {
|
|
||||||
switch (key) {
|
|
||||||
case 'url':
|
|
||||||
this.url = changes[key].currentValue;
|
|
||||||
this.setLayerSource();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
properties[key] = changes[key].currentValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.instance.setProperties(properties, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
setLayerSource(): void {
|
|
||||||
this.instance = new source.WMTS(this);
|
|
||||||
this.host.instance.setSource(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngAfterContentInit(): void {
|
|
||||||
if (this.tileGridWMTS) {
|
|
||||||
this.tileGrid = this.tileGridWMTS.instance;
|
|
||||||
this.setLayerSource();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,30 +0,0 @@
|
|||||||
import { Component, Host, Input, OnInit, forwardRef } from '@angular/core';
|
|
||||||
import { source } from 'openlayers';
|
|
||||||
import { LayerVectorComponent } from '../layers';
|
|
||||||
import { SourceComponent } from './source.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-source-vector',
|
|
||||||
template: `<ng-content></ng-content>`,
|
|
||||||
providers: [
|
|
||||||
{ provide: SourceComponent, useExisting: forwardRef(() => SourceVectorComponent) }
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SourceVectorComponent extends SourceComponent implements OnInit {
|
|
||||||
instance: source.Vector;
|
|
||||||
@Input() overlaps: boolean;
|
|
||||||
@Input() useSpatialIndex: boolean;
|
|
||||||
@Input() wrapX: boolean;
|
|
||||||
@Input() url: string;
|
|
||||||
@Input() format: ol.format.Feature;
|
|
||||||
@Input() strategy: ol.LoadingStrategy;
|
|
||||||
|
|
||||||
constructor(@Host() layer: LayerVectorComponent) {
|
|
||||||
super(layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new source.Vector(this);
|
|
||||||
this.host.instance.setSource(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,43 +0,0 @@
|
|||||||
import { Component, Host, Input, forwardRef, ContentChild, AfterContentInit } from '@angular/core';
|
|
||||||
import { source, ProjectionLike, TileUrlFunctionType, format, tilegrid } from 'openlayers';
|
|
||||||
import { LayerVectorTileComponent } from '../layers';
|
|
||||||
import { FormatComponent } from '../formats';
|
|
||||||
import { TileGridComponent } from '../tilegrid.component';
|
|
||||||
import { SourceComponent } from './source.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-source-vectortile',
|
|
||||||
template: `<ng-content></ng-content>`,
|
|
||||||
providers: [
|
|
||||||
{ provide: SourceComponent, useExisting: forwardRef(() => SourceVectorTileComponent) }
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SourceVectorTileComponent extends SourceComponent implements AfterContentInit {
|
|
||||||
public instance: source.VectorTile;
|
|
||||||
@Input() cacheSize: number;
|
|
||||||
@Input() overlaps: boolean;
|
|
||||||
@Input() projection: ProjectionLike;
|
|
||||||
@Input() tilePixelRatio: number;
|
|
||||||
@Input() tileUrlFunction: TileUrlFunctionType;
|
|
||||||
@Input() url: string;
|
|
||||||
@Input() urls: string[];
|
|
||||||
@Input() wrapX: boolean;
|
|
||||||
|
|
||||||
@ContentChild(FormatComponent) formatComponent: FormatComponent;
|
|
||||||
format: format.Feature;
|
|
||||||
@ContentChild(TileGridComponent) tileGridComponent: TileGridComponent;
|
|
||||||
tileGrid: tilegrid.TileGrid;
|
|
||||||
|
|
||||||
constructor(@Host() layer: LayerVectorTileComponent) {
|
|
||||||
super(layer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* need the children to construct the OL3 object */
|
|
||||||
ngAfterContentInit() {
|
|
||||||
this.format = this.formatComponent.instance;
|
|
||||||
this.tileGrid = this.tileGridComponent.instance;
|
|
||||||
// console.log('creating ol.source.VectorTile instance with:', this);
|
|
||||||
this.instance = new source.VectorTile(this);
|
|
||||||
this.host.instance.setSource(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,77 +0,0 @@
|
|||||||
import {
|
|
||||||
Component,
|
|
||||||
Host,
|
|
||||||
Input,
|
|
||||||
AfterContentInit,
|
|
||||||
forwardRef,
|
|
||||||
OnChanges,
|
|
||||||
ContentChild,
|
|
||||||
SimpleChanges,
|
|
||||||
Optional,
|
|
||||||
OnInit
|
|
||||||
} from '@angular/core';
|
|
||||||
import { source, Size, TileUrlFunctionType, TileLoadFunctionType, tilegrid } from 'openlayers';
|
|
||||||
import { LayerTileComponent } from '../layers';
|
|
||||||
import { SourceComponent } from './source.component';
|
|
||||||
import { TileGridComponent } from '../tilegrid.component';
|
|
||||||
import { SourceRasterComponent } from './raster.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-source-xyz',
|
|
||||||
template: `<ng-content></ng-content>`,
|
|
||||||
providers: [
|
|
||||||
{ provide: SourceComponent, useExisting: forwardRef(() => SourceXYZComponent) }
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SourceXYZComponent extends SourceComponent implements AfterContentInit, OnChanges {
|
|
||||||
instance: source.XYZ;
|
|
||||||
@Input() cacheSize: number;
|
|
||||||
@Input() crossOrigin: string;
|
|
||||||
@Input() opaque: boolean;
|
|
||||||
@Input() projection: string;
|
|
||||||
@Input() reprojectionErrorThreshold: number;
|
|
||||||
@Input() minZoom: number;
|
|
||||||
@Input() maxZoom: number;
|
|
||||||
@Input() tileGrid: tilegrid.TileGrid;
|
|
||||||
@Input() tileLoadFunction?: TileLoadFunctionType;
|
|
||||||
@Input() tilePixelRatio: number;
|
|
||||||
@Input() tileSize: number|Size;
|
|
||||||
@Input() tileUrlFunction: TileUrlFunctionType;
|
|
||||||
@Input() url: string;
|
|
||||||
@Input() urls: string[];
|
|
||||||
@Input() wrapX: boolean;
|
|
||||||
|
|
||||||
@ContentChild(TileGridComponent) tileGridXYZ: TileGridComponent;
|
|
||||||
|
|
||||||
constructor(@Optional() @Host() layer: LayerTileComponent,
|
|
||||||
@Optional() @Host() raster?: SourceRasterComponent) {
|
|
||||||
super(layer, raster);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngAfterContentInit() {
|
|
||||||
if (this.tileGridXYZ) {
|
|
||||||
this.tileGrid = this.tileGridXYZ.instance;
|
|
||||||
}
|
|
||||||
this.instance = new source.XYZ(this);
|
|
||||||
this._register(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
|
||||||
let properties: {[index: string]: any} = {};
|
|
||||||
|
|
||||||
if (!this.instance) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (let key in changes) {
|
|
||||||
if (changes.hasOwnProperty(key)) {
|
|
||||||
properties[key] = changes[key].currentValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.instance.setProperties(properties, false);
|
|
||||||
if (changes.hasOwnProperty('url')) {
|
|
||||||
this.instance = new source.XYZ(this);
|
|
||||||
this._register(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,90 +0,0 @@
|
|||||||
import {
|
|
||||||
Component, Directive, EventEmitter, Host, OnDestroy, OnChanges, AfterContentInit,
|
|
||||||
Input, Output, ContentChild, SimpleChanges
|
|
||||||
} from '@angular/core';
|
|
||||||
import { style } from 'openlayers';
|
|
||||||
import { FeatureComponent } from './feature.component';
|
|
||||||
|
|
||||||
@Directive({
|
|
||||||
selector: 'aol-style-icon'
|
|
||||||
})
|
|
||||||
export class StyleIconDirective implements OnChanges {
|
|
||||||
|
|
||||||
// For usage info see: http://openlayers.org/en/latest/apidoc/ol.style.Icon.html
|
|
||||||
@Input() anchor: [number, number];
|
|
||||||
@Input() anchorXUnits: style.IconAnchorUnits;
|
|
||||||
@Input() anchorYUnits: style.IconAnchorUnits;
|
|
||||||
@Input() anchorOrigin: style.IconOrigin;
|
|
||||||
@Input() color: [number, number, number, number];
|
|
||||||
@Input() crossOrigin: style.IconOrigin;
|
|
||||||
@Input() img: string;
|
|
||||||
@Input() offset: [number, number];
|
|
||||||
@Input() offsetOrigin: style.IconOrigin;
|
|
||||||
@Input() opacity: number;
|
|
||||||
@Input() scale: number;
|
|
||||||
@Input() snapToPixel: boolean;
|
|
||||||
@Input() rotateWithView: boolean;
|
|
||||||
@Input() rotation: number;
|
|
||||||
@Input() size: [number, number];
|
|
||||||
@Input() imgSize: [number, number];
|
|
||||||
@Input() src: string;
|
|
||||||
|
|
||||||
@Output() onChanged = new EventEmitter<any>();
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
|
||||||
this.onChanged.emit(this.src);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-style',
|
|
||||||
template: `<ng-content></ng-content>`
|
|
||||||
})
|
|
||||||
export class StyleComponent implements OnDestroy, AfterContentInit {
|
|
||||||
private _host_: FeatureComponent;
|
|
||||||
private childSubscription$: any;
|
|
||||||
|
|
||||||
@ContentChild(StyleIconDirective) iconStyleDirective: StyleIconDirective;
|
|
||||||
|
|
||||||
constructor( @Host() feature: FeatureComponent) {
|
|
||||||
console.log('instancing aol-style');
|
|
||||||
this._host_ = feature;
|
|
||||||
}
|
|
||||||
|
|
||||||
ngAfterContentInit() {
|
|
||||||
this.update();
|
|
||||||
this.childSubscription$ = this.iconStyleDirective.onChanged.subscribe((): void => {
|
|
||||||
this.update();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
update() {
|
|
||||||
this._host_.setStyle(new style.Style({
|
|
||||||
image: new style.Icon({
|
|
||||||
anchor: this.iconStyleDirective.anchor,
|
|
||||||
anchorOrigin: this.iconStyleDirective.anchorOrigin,
|
|
||||||
anchorXUnits: this.iconStyleDirective.anchorXUnits,
|
|
||||||
anchorYUnits: this.iconStyleDirective.anchorYUnits,
|
|
||||||
color: this.iconStyleDirective.color,
|
|
||||||
crossOrigin: this.iconStyleDirective.crossOrigin,
|
|
||||||
img: this.iconStyleDirective.img,
|
|
||||||
offset: this.iconStyleDirective.offset,
|
|
||||||
offsetOrigin: this.iconStyleDirective.offsetOrigin,
|
|
||||||
opacity: this.iconStyleDirective.opacity,
|
|
||||||
scale: this.iconStyleDirective.scale,
|
|
||||||
snapToPixel: this.iconStyleDirective.snapToPixel,
|
|
||||||
rotateWithView: this.iconStyleDirective.rotateWithView,
|
|
||||||
rotation: this.iconStyleDirective.rotation,
|
|
||||||
size: this.iconStyleDirective.size,
|
|
||||||
imgSize: this.iconStyleDirective.imgSize,
|
|
||||||
src: this.iconStyleDirective.src
|
|
||||||
})
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
this.childSubscription$.unsubscribe();
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,60 +0,0 @@
|
|||||||
import { Component, Input, Host, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
||||||
import { style } from 'openlayers';
|
|
||||||
import { StyleComponent } from './style.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-style-icon',
|
|
||||||
template: `<div class="aol-style-icon"></div>`,
|
|
||||||
})
|
|
||||||
export class StyleIconComponent implements OnInit, OnChanges {
|
|
||||||
public instance: style.Icon;
|
|
||||||
|
|
||||||
@Input() anchor: [number, number];
|
|
||||||
@Input() anchorXUnits: style.IconAnchorUnits;
|
|
||||||
@Input() anchorYUnits: style.IconAnchorUnits;
|
|
||||||
@Input() anchorOrigin: style.IconOrigin;
|
|
||||||
@Input() color: [number, number, number, number];
|
|
||||||
@Input() crossOrigin: style.IconOrigin;
|
|
||||||
@Input() img: string;
|
|
||||||
@Input() offset: [number, number];
|
|
||||||
@Input() offsetOrigin: style.IconOrigin;
|
|
||||||
@Input() opacity: number;
|
|
||||||
@Input() scale: number;
|
|
||||||
@Input() snapToPixel: boolean;
|
|
||||||
@Input() rotateWithView: boolean;
|
|
||||||
@Input() rotation: number;
|
|
||||||
@Input() size: [number, number];
|
|
||||||
@Input() imgSize: [number, number];
|
|
||||||
@Input() src: string;
|
|
||||||
|
|
||||||
|
|
||||||
constructor(@Host() private host: StyleComponent) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
// console.log('creating ol.style.Icon instance with: ', this);
|
|
||||||
this.instance = new style.Icon(this);
|
|
||||||
this.host.instance.setImage(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
|
||||||
if (!this.instance) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (changes['opacity']) {
|
|
||||||
this.instance.setOpacity(changes['opacity'].currentValue);
|
|
||||||
}
|
|
||||||
if (changes['rotation']) {
|
|
||||||
this.instance.setRotation(changes['rotation'].currentValue);
|
|
||||||
}
|
|
||||||
if (changes['scale']) {
|
|
||||||
this.instance.setScale(changes['scale'].currentValue);
|
|
||||||
}
|
|
||||||
if (changes['src']) {
|
|
||||||
this.instance = new style.Icon(this);
|
|
||||||
this.host.instance.setImage(this.instance);
|
|
||||||
}
|
|
||||||
this.host.update();
|
|
||||||
// console.log('changes detected in aol-style-icon: ', changes);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,6 +0,0 @@
|
|||||||
export * from './circle.component';
|
|
||||||
export * from './fill.component';
|
|
||||||
export * from './icon.component';
|
|
||||||
export * from './stroke.component';
|
|
||||||
export * from './style.component';
|
|
||||||
export * from './text.component';
|
|
@@ -1,43 +0,0 @@
|
|||||||
import { Component, Input, Optional, OnInit } from '@angular/core';
|
|
||||||
import { style, StyleGeometryFunction, geom } from 'openlayers';
|
|
||||||
import { FeatureComponent } from '../feature.component';
|
|
||||||
import { LayerVectorComponent } from '../layers';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-style',
|
|
||||||
template: `<ng-content></ng-content>`
|
|
||||||
})
|
|
||||||
export class StyleComponent implements OnInit {
|
|
||||||
private host: FeatureComponent|LayerVectorComponent;
|
|
||||||
public instance: style.Style;
|
|
||||||
public componentType: string = 'style';
|
|
||||||
|
|
||||||
@Input() geometry: string | geom.Geometry | StyleGeometryFunction;
|
|
||||||
@Input() fill: style.Fill;
|
|
||||||
@Input() image: style.Image;
|
|
||||||
@Input() stroke: style.Stroke;
|
|
||||||
@Input() text: style.Text;
|
|
||||||
@Input() zIndex: number;
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
@Optional() featureHost: FeatureComponent,
|
|
||||||
@Optional() layerHost: LayerVectorComponent
|
|
||||||
) {
|
|
||||||
// console.log('creating aol-style');
|
|
||||||
this.host = !!featureHost ? featureHost : layerHost;
|
|
||||||
if (!this.host) {
|
|
||||||
throw new Error('aol-style must be applied to a feature or a layer');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
update() {
|
|
||||||
// console.log('updating style\'s host: ', this.host);
|
|
||||||
this.host.instance.changed();
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
// console.log('creating aol-style instance with: ', this);
|
|
||||||
this.instance = new style.Style(this);
|
|
||||||
this.host.instance.setStyle(this.instance);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,67 +0,0 @@
|
|||||||
import { Component, Input, Optional, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
||||||
import { style } from 'openlayers';
|
|
||||||
import { StyleComponent } from './style.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-style-text',
|
|
||||||
template: `<div class="aol-style-text"></div>`,
|
|
||||||
})
|
|
||||||
export class StyleTextComponent implements OnInit, OnChanges {
|
|
||||||
public instance: style.Text;
|
|
||||||
public componentType: string = 'style-text';
|
|
||||||
|
|
||||||
@Input() font: string|undefined;
|
|
||||||
@Input() offsetX: number|undefined;
|
|
||||||
@Input() offsetY: number|undefined;
|
|
||||||
@Input() scale: number|undefined;
|
|
||||||
@Input() rotateWithView: boolean|undefined;
|
|
||||||
@Input() rotation: number|undefined;
|
|
||||||
@Input() text: string|undefined;
|
|
||||||
@Input() textAlign: string|undefined;
|
|
||||||
@Input() textBaseLine: string|undefined;
|
|
||||||
|
|
||||||
constructor(@Optional() private host: StyleComponent) {
|
|
||||||
if (!host) {
|
|
||||||
throw new Error('aol-style-text must be a descendant of aol-style');
|
|
||||||
}
|
|
||||||
// console.log('creating aol-style-text with: ', this);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
// console.log('creating ol.style.Text instance with: ', this);
|
|
||||||
this.instance = new style.Text(this);
|
|
||||||
this.host.instance.setText(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
|
||||||
if (!this.instance) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (changes['font']) {
|
|
||||||
this.instance.setFont(changes['font'].currentValue);
|
|
||||||
}
|
|
||||||
if (changes['offsetX']) {
|
|
||||||
this.instance.setOffsetX(changes['offsetX'].currentValue);
|
|
||||||
}
|
|
||||||
if (changes['offsetY']) {
|
|
||||||
this.instance.setOffsetY(changes['offsetY'].currentValue);
|
|
||||||
}
|
|
||||||
if (changes['scale']) {
|
|
||||||
this.instance.setScale(changes['scale'].currentValue);
|
|
||||||
}
|
|
||||||
if (changes['rotation']) {
|
|
||||||
this.instance.setRotation(changes['rotation'].currentValue);
|
|
||||||
}
|
|
||||||
if (changes['text']) {
|
|
||||||
this.instance.setText(changes['text'].currentValue);
|
|
||||||
}
|
|
||||||
if (changes['textAlign']) {
|
|
||||||
this.instance.setTextAlign(changes['textAlign'].currentValue);
|
|
||||||
}
|
|
||||||
if (changes['textBaseLine']) {
|
|
||||||
this.instance.setTextBaseline(changes['textBaseLine'].currentValue);
|
|
||||||
}
|
|
||||||
this.host.update();
|
|
||||||
// console.log('changes detected in aol-style-text, setting new properties: ', changes);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,33 +0,0 @@
|
|||||||
import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
||||||
import { tilegrid, Extent, Size , Coordinate} from 'openlayers';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-tilegrid',
|
|
||||||
template: ''
|
|
||||||
})
|
|
||||||
export class TileGridComponent implements OnInit, OnChanges {
|
|
||||||
instance: tilegrid.TileGrid;
|
|
||||||
|
|
||||||
@Input() extent: Extent;
|
|
||||||
@Input() maxZoom: number;
|
|
||||||
@Input() minZoom: number;
|
|
||||||
@Input() tileSize: number|Size;
|
|
||||||
@Input() origin?: Coordinate;
|
|
||||||
@Input() resolutions: number[];
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
if (!this.resolutions) {
|
|
||||||
this.instance = tilegrid.createXYZ(this)
|
|
||||||
} else {
|
|
||||||
this.instance = new tilegrid.TileGrid(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
|
||||||
if (!this.resolutions) {
|
|
||||||
this.instance = tilegrid.createXYZ(this)
|
|
||||||
} else {
|
|
||||||
this.instance = new tilegrid.TileGrid(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,23 +0,0 @@
|
|||||||
import { Component, Input, OnInit } from '@angular/core';
|
|
||||||
import { tilegrid, Extent, Size, Coordinate } from 'openlayers';
|
|
||||||
import { TileGridComponent } from './tilegrid.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-tilegrid-wmts',
|
|
||||||
template: ''
|
|
||||||
})
|
|
||||||
export class TileGridWMTSComponent extends TileGridComponent implements OnInit {
|
|
||||||
instance: tilegrid.WMTS;
|
|
||||||
|
|
||||||
@Input() origin?: Coordinate;
|
|
||||||
@Input() origins?: Coordinate[];
|
|
||||||
@Input() resolutions: number[];
|
|
||||||
@Input() matrixIds: string[];
|
|
||||||
@Input() sizes?: Size[];
|
|
||||||
@Input() tileSizes?: ((number | Size)[]);
|
|
||||||
@Input() widths?: number[];
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.instance = new tilegrid.WMTS(this);
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,68 +0,0 @@
|
|||||||
import { Component, Input, OnInit, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
|
||||||
import { View, Extent, Coordinate } from 'openlayers';
|
|
||||||
import { MapComponent } from './map.component';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'aol-view',
|
|
||||||
template: `<ng-content></ng-content>`
|
|
||||||
})
|
|
||||||
export class ViewComponent implements OnInit, OnChanges, OnDestroy {
|
|
||||||
public instance: View;
|
|
||||||
public componentType: string = 'view';
|
|
||||||
|
|
||||||
@Input() constrainRotation: boolean|number;
|
|
||||||
@Input() enableRotation: boolean;
|
|
||||||
@Input() extent: Extent;
|
|
||||||
@Input() maxResolution: number;
|
|
||||||
@Input() minResolution: number;
|
|
||||||
@Input() maxZoom: number;
|
|
||||||
@Input() minZoom: number;
|
|
||||||
@Input() resolution: number;
|
|
||||||
@Input() resolutions: number[];
|
|
||||||
@Input() rotation: number;
|
|
||||||
@Input() zoom: number;
|
|
||||||
@Input() zoomFactor: number;
|
|
||||||
@Input() center: Coordinate;
|
|
||||||
@Input() projection: string;
|
|
||||||
|
|
||||||
@Input() zoomAnimation = false;
|
|
||||||
|
|
||||||
constructor(private host: MapComponent) {
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
// console.log('creating ol.View instance with: ', this);
|
|
||||||
this.instance = new View(this);
|
|
||||||
this.host.instance.setView(this.instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
|
||||||
let properties: { [index: string]: any } = {};
|
|
||||||
if (!this.instance) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (let key in changes) {
|
|
||||||
if (changes.hasOwnProperty(key)) {
|
|
||||||
switch (key) {
|
|
||||||
case 'zoom':
|
|
||||||
/** Work-around: setting the zoom via setProperties does not work. */
|
|
||||||
if (this.zoomAnimation) {
|
|
||||||
this.instance.animate({zoom: changes[key].currentValue});
|
|
||||||
} else {
|
|
||||||
this.instance.setZoom(changes[key].currentValue);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
properties[key] = changes[key].currentValue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// console.log('changes detected in aol-view, setting new properties: ', properties);
|
|
||||||
this.instance.setProperties(properties, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy() {
|
|
||||||
// console.log('removing aol-view');
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1 +0,0 @@
|
|||||||
export const MODULE_NAME = "FarmMapsCommonAol";
|
|
@@ -1,5 +0,0 @@
|
|||||||
/*
|
|
||||||
* Public API Surface of common-aol
|
|
||||||
*/
|
|
||||||
|
|
||||||
export * from './fm-aol/common-aol.module';
|
|
@@ -1,100 +0,0 @@
|
|||||||
{
|
|
||||||
"rulesDirectory": [
|
|
||||||
"node_modules/codelyzer"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"class-name": true,
|
|
||||||
"comment-format": [
|
|
||||||
true,
|
|
||||||
"check-space"
|
|
||||||
],
|
|
||||||
"curly": true,
|
|
||||||
"eofline": true,
|
|
||||||
"forin": true,
|
|
||||||
"indent": [
|
|
||||||
true,
|
|
||||||
"spaces"
|
|
||||||
],
|
|
||||||
"label-position": true,
|
|
||||||
"max-line-length": [
|
|
||||||
true,
|
|
||||||
140
|
|
||||||
],
|
|
||||||
"member-access": false,
|
|
||||||
"member-ordering": [
|
|
||||||
true,
|
|
||||||
"static-before-instance",
|
|
||||||
"variables-before-functions"
|
|
||||||
],
|
|
||||||
"no-arg": true,
|
|
||||||
"no-bitwise": true,
|
|
||||||
"no-console": [
|
|
||||||
true,
|
|
||||||
"debug",
|
|
||||||
"info",
|
|
||||||
"time",
|
|
||||||
"timeEnd",
|
|
||||||
"trace"
|
|
||||||
],
|
|
||||||
"no-construct": true,
|
|
||||||
"no-debugger": true,
|
|
||||||
"no-duplicate-variable": true,
|
|
||||||
"no-empty": false,
|
|
||||||
"no-eval": true,
|
|
||||||
"no-inferrable-types": true,
|
|
||||||
"no-shadowed-variable": true,
|
|
||||||
"no-string-literal": false,
|
|
||||||
"no-switch-case-fall-through": true,
|
|
||||||
"no-trailing-whitespace": true,
|
|
||||||
"no-use-before-declare": true,
|
|
||||||
"no-var-keyword": true,
|
|
||||||
"object-literal-sort-keys": false,
|
|
||||||
"one-line": [
|
|
||||||
true,
|
|
||||||
"check-open-brace",
|
|
||||||
"check-catch",
|
|
||||||
"check-else",
|
|
||||||
"check-whitespace"
|
|
||||||
],
|
|
||||||
"quotemark": [
|
|
||||||
true,
|
|
||||||
"single"
|
|
||||||
],
|
|
||||||
"radix": true,
|
|
||||||
"semicolon": [
|
|
||||||
"always"
|
|
||||||
],
|
|
||||||
"triple-equals": [
|
|
||||||
true,
|
|
||||||
"allow-null-check"
|
|
||||||
],
|
|
||||||
"typedef-whitespace": [
|
|
||||||
true,
|
|
||||||
{
|
|
||||||
"call-signature": "nospace",
|
|
||||||
"index-signature": "nospace",
|
|
||||||
"parameter": "nospace",
|
|
||||||
"property-declaration": "nospace",
|
|
||||||
"variable-declaration": "nospace"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"variable-name": false,
|
|
||||||
"whitespace": [
|
|
||||||
true,
|
|
||||||
"check-branch",
|
|
||||||
"check-decl",
|
|
||||||
"check-operator",
|
|
||||||
"check-separator",
|
|
||||||
"check-type"
|
|
||||||
],
|
|
||||||
"use-input-property-decorator": true,
|
|
||||||
"use-output-property-decorator": true,
|
|
||||||
"use-host-property-decorator": true,
|
|
||||||
"no-input-rename": true,
|
|
||||||
"no-output-rename": true,
|
|
||||||
"use-life-cycle-interface": true,
|
|
||||||
"use-pipe-transform-interface": true,
|
|
||||||
"component-class-suffix": true,
|
|
||||||
"directive-class-suffix": true
|
|
||||||
}
|
|
||||||
}
|
|
212
projects/common-map/package-lock.json
generated
212
projects/common-map/package-lock.json
generated
@@ -1,29 +1,217 @@
|
|||||||
{
|
{
|
||||||
"name": "@farmmaps/common-map",
|
"name": "@farmmaps/common-map",
|
||||||
"version": "2.1.0",
|
"version": "2.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@farmmaps/common-map",
|
"name": "@farmmaps/common-map",
|
||||||
"version": "2.1.0",
|
"version": "2.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/core": ">=16.0.0",
|
"@angular/core": "^18.2.3",
|
||||||
"@ngrx/effects": ">=16.0.0",
|
"@ngrx/effects": "^18.0.2",
|
||||||
"@ngrx/router-store": ">=16.0.0",
|
"@ngrx/router-store": "^18.0.2",
|
||||||
"@ngrx/store": ">=16.0.0",
|
"@ngrx/store": "^18.0.2",
|
||||||
"ngrx-store-localstorage": ">=16.0.0",
|
"ngrx-store-localstorage": "^18",
|
||||||
"ol": ">=6.8.1",
|
"tassign": "^1.0.0"
|
||||||
"tassign": ">=1.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"../../dist/libs/ng-openlayers": {
|
||||||
|
"version": "18.0.0",
|
||||||
|
"extraneous": true,
|
||||||
|
"license": "MPL-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.3.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/common": "^18.2.3",
|
||||||
|
"@angular/core": "^18.2.3",
|
||||||
|
"ol": "^8.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dist/ng-openlayers": {
|
||||||
|
"extraneous": true
|
||||||
|
},
|
||||||
|
"node_modules/@angular/common": {
|
||||||
|
"version": "18.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@angular/common/-/common-18.2.3.tgz",
|
||||||
|
"integrity": "sha512-NFL4yXXImSCH7i1xnHykUjHa9vl9827fGiwSV2mnf7LjSUsyDzFD8/54dNuYN9OY8AUD+PnK0YdNro6cczVyIA==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.3.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/core": "18.2.3",
|
||||||
|
"rxjs": "^6.5.3 || ^7.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@angular/core": {
|
||||||
|
"version": "18.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@angular/core/-/core-18.2.3.tgz",
|
||||||
|
"integrity": "sha512-VGhMJxj7d0rYpqVfQrcGRB7EE/BCziotft/I/YPl6bOMPSAvMukG7DXQuJdYpNrr62ks78mlzHlZX/cdmB9Prw==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.3.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"rxjs": "^6.5.3 || ^7.4.0",
|
||||||
|
"zone.js": "~0.14.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@angular/platform-browser": {
|
||||||
|
"version": "18.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-18.2.3.tgz",
|
||||||
|
"integrity": "sha512-M2ob4zN7tAcL2mx7U6KnZNqNFPFl9MlPBE0FrjQjIzAjU0wSYPIJXmaPu9aMUp9niyo+He5iX98I+URi2Yc99g==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.3.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/animations": "18.2.3",
|
||||||
|
"@angular/common": "18.2.3",
|
||||||
|
"@angular/core": "18.2.3"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@angular/animations": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@angular/router": {
|
||||||
|
"version": "18.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@angular/router/-/router-18.2.3.tgz",
|
||||||
|
"integrity": "sha512-fvD9eSDIiIbeYoUokoWkXzu7/ZaxlzKPUHFqX1JuKuH5ciQDeT/d7lp4mj31Bxammhohzi3+z12THJYsCkj/iQ==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.3.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/common": "18.2.3",
|
||||||
|
"@angular/core": "18.2.3",
|
||||||
|
"@angular/platform-browser": "18.2.3",
|
||||||
|
"rxjs": "^6.5.3 || ^7.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@ngrx/effects": {
|
||||||
|
"version": "18.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ngrx/effects/-/effects-18.0.2.tgz",
|
||||||
|
"integrity": "sha512-YojXcOD9Lsq4kl2HCjENccyUM/mOlgBdtddsg9j/ojzSUgu3ZuBVKLN3atrL2TJYkbMX1MN0RzafSkL3TPGFIA==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@ngrx/operators": "18.0.1",
|
||||||
|
"tslib": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/core": "^18.0.0",
|
||||||
|
"@ngrx/store": "18.0.2",
|
||||||
|
"rxjs": "^6.5.3 || ^7.5.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@ngrx/operators": {
|
||||||
|
"version": "18.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ngrx/operators/-/operators-18.0.1.tgz",
|
||||||
|
"integrity": "sha512-M+QMrHNKgcuiLaRGZxJ4aQi5/OCRfKC4+T/63dsHyLFZ53/FFpF6a/ytSO1Q+tzOplZ5o99S+i8FVaZqNQ3LmQ==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.3.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"rxjs": "^6.5.3 || ^7.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@ngrx/router-store": {
|
||||||
|
"version": "18.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ngrx/router-store/-/router-store-18.0.2.tgz",
|
||||||
|
"integrity": "sha512-jUrQ/uJJ53x8O1XbN2YxH2GpRREZlwS5gRxlCoc4fWL4Us/uS1/K6+QfRmKBPtpTKBIixqsOb+dIUV5iwBrivA==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/common": "^18.0.0",
|
||||||
|
"@angular/core": "^18.0.0",
|
||||||
|
"@angular/router": "^18.0.0",
|
||||||
|
"@ngrx/store": "18.0.2",
|
||||||
|
"rxjs": "^6.5.3 || ^7.5.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@ngrx/store": {
|
||||||
|
"version": "18.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ngrx/store/-/store-18.0.2.tgz",
|
||||||
|
"integrity": "sha512-ajwv0+njsO4vzArp9esnFvs1wyUb1U1W8E8LSCKrcW2hWWo9o1Pezj+JRsdQwatxHfrrPFuTDyajsl6GQM/JSA==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/core": "^18.0.0",
|
||||||
|
"rxjs": "^6.5.3 || ^7.5.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/deepmerge": {
|
||||||
|
"version": "4.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
||||||
|
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ngrx-store-localstorage": {
|
||||||
|
"version": "18.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ngrx-store-localstorage/-/ngrx-store-localstorage-18.0.0.tgz",
|
||||||
|
"integrity": "sha512-WoDePvMWiWF9LQHe+dTqbpm8lxoKCPoIvA0/1enIPTmdLQsOpdDKhMSD5YgwuqDusNfEik3QslProTFGyXZwtw==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"deepmerge": "^4.2.2",
|
||||||
|
"tslib": "^2.3.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/common": "^18.0.1",
|
||||||
|
"@angular/core": "^18.0.1",
|
||||||
|
"@ngrx/store": "^18.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/rxjs": {
|
||||||
|
"version": "7.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
|
||||||
|
"integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tassign": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tassign/-/tassign-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-k0Ti9f+A1R0BRdArEbiUHldd+A40kZ5qsiNSNk4czx61wkAoSZYjqkaQs0jC63AfgPdCXVPstDq2ZW5ZLRTCgw==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/tslib": {
|
"node_modules/tslib": {
|
||||||
"version": "2.0.1",
|
"version": "2.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz",
|
||||||
"integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ=="
|
"integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA=="
|
||||||
|
},
|
||||||
|
"node_modules/zone.js": {
|
||||||
|
"version": "0.14.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.10.tgz",
|
||||||
|
"integrity": "sha512-YGAhaO7J5ywOXW6InXNlLmfU194F8lVgu7bRntUF3TiG8Y3nBK0x1UJJuHUP/e8IyihkjCYqhCScpSwnlaSRkQ==",
|
||||||
|
"peer": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@farmmaps/common-map",
|
"name": "@farmmaps/common-map",
|
||||||
"version": "2.1.0",
|
"version": "2.0.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
||||||
},
|
},
|
||||||
@@ -8,12 +8,11 @@
|
|||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/core": ">=16.0.0",
|
"@angular/core": "18.2.3",
|
||||||
"ngrx-store-localstorage": ">=16.0.0",
|
"ngrx-store-localstorage": "^18.0.0",
|
||||||
"@ngrx/effects": ">=16.0.0",
|
"@ngrx/effects": "^18.0.2",
|
||||||
"@ngrx/router-store":">=16.0.0",
|
"@ngrx/router-store": "^18.0.2",
|
||||||
"@ngrx/store":">=16.0.0",
|
"@ngrx/store": "^18.0.2",
|
||||||
"tassign": ">=1.0.0",
|
"tassign": "^1.0.0"
|
||||||
"ol": ">=6.8.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -58,7 +58,7 @@ export const GETLAYERVALUESUCCESS = '[Map] GetLayerValueSuccess'
|
|||||||
export const TOGGLESHOWDATALAYERSLIDE = '[Map] ToggleShowDataLayerSlide'
|
export const TOGGLESHOWDATALAYERSLIDE = '[Map] ToggleShowDataLayerSlide'
|
||||||
export const SETVIEWSTATE = '[Map] SetViewState'
|
export const SETVIEWSTATE = '[Map] SetViewState'
|
||||||
export const CLEARFEATURES = '[Map] ClearFeatures';
|
export const CLEARFEATURES = '[Map] ClearFeatures';
|
||||||
|
export const SETPANELEXTRAWIDE = '[Map] SetPanelExtraWide';
|
||||||
|
|
||||||
export class Clear implements Action {
|
export class Clear implements Action {
|
||||||
readonly type = CLEAR;
|
readonly type = CLEAR;
|
||||||
@@ -342,6 +342,11 @@ export class ClearFeatures implements Action {
|
|||||||
constructor() {}
|
constructor() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class SetPanelExtraWide implements Action {
|
||||||
|
readonly type = SETPANELEXTRAWIDE;
|
||||||
|
constructor(public panelExtraWide:boolean) {}
|
||||||
|
}
|
||||||
|
|
||||||
export type Actions = SetMapState
|
export type Actions = SetMapState
|
||||||
| Init
|
| Init
|
||||||
| Clear
|
| Clear
|
||||||
@@ -389,5 +394,6 @@ export type Actions = SetMapState
|
|||||||
| SetPeriod
|
| SetPeriod
|
||||||
| ToggleShowDataLayerSlide
|
| ToggleShowDataLayerSlide
|
||||||
| SetViewState
|
| SetViewState
|
||||||
| ClearFeatures;
|
| ClearFeatures
|
||||||
|
| SetPanelExtraWide;
|
||||||
|
|
||||||
|
@@ -1,78 +1,80 @@
|
|||||||
import { NgModule ,ModuleWithProviders} from '@angular/core';
|
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { NgModule } from '@angular/core';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
|
|
||||||
//external modules
|
//external modules
|
||||||
import { AppCommonAolModule } from '@farmmaps/common-aol';
|
|
||||||
import { StoreModule, ActionReducer, MetaReducer } from '@ngrx/store';
|
|
||||||
import { EffectsModule } from '@ngrx/effects';
|
|
||||||
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
|
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
|
||||||
|
import { EffectsModule } from '@ngrx/effects';
|
||||||
|
import { ActionReducer, MetaReducer, StoreModule } from '@ngrx/store';
|
||||||
|
import { AngularOpenlayersModule } from '@farmmaps/ng-openlayers';
|
||||||
|
|
||||||
//common modules
|
//common modules
|
||||||
import { AppCommonModule } from '@farmmaps/common';
|
import { AppCommonModule } from '@farmmaps/common';
|
||||||
|
|
||||||
import { MODULE_NAME } from './module-name';
|
|
||||||
import * as mapReducers from './reducers/map.reducer';
|
|
||||||
import * as mapActions from './actions/map.actions';
|
import * as mapActions from './actions/map.actions';
|
||||||
import * as mapEffects from './effects/map.effects';
|
import * as mapEffects from './effects/map.effects';
|
||||||
|
import { MODULE_NAME } from './module-name';
|
||||||
|
import * as mapReducers from './reducers/map.reducer';
|
||||||
|
|
||||||
import { IMapState} from './models/map.state';
|
|
||||||
import { ISelectedFeatures } from './models/selected.features';
|
|
||||||
import { IItemLayer,ItemLayer,ITemporalItemLayer,TemporalItemLayer } from './models/item.layer';
|
|
||||||
import { IClickedFeature } from './models/clicked.feature';
|
import { IClickedFeature } from './models/clicked.feature';
|
||||||
|
import { IItemLayer, ItemLayer, ITemporalItemLayer, TemporalItemLayer } from './models/item.layer';
|
||||||
|
import { IMapState } from './models/map.state';
|
||||||
import { IPeriodState } from './models/period.state';
|
import { IPeriodState } from './models/period.state';
|
||||||
|
import { ISelectedFeatures } from './models/selected.features';
|
||||||
|
|
||||||
// components
|
// components
|
||||||
|
import { MapRoutingModule } from './common-map-routing.module';
|
||||||
|
import { FileDropTargetComponent } from './components/aol/file-drop-target/file-drop-target.component';
|
||||||
import { GpsLocation } from './components/aol/gps-location/gps-location.component';
|
import { GpsLocation } from './components/aol/gps-location/gps-location.component';
|
||||||
|
import { ItemLayersComponent } from './components/aol/item-layers/item-layers.component';
|
||||||
|
import { ItemVectorSourceComponent } from './components/aol/item-vector-source/item-vector-source.component';
|
||||||
|
import { LayerListComponent } from './components/aol/layer-list/layer-list.component';
|
||||||
|
import { LayerValuesComponent } from './components/aol/layer-values/layer-values.component';
|
||||||
|
import { LayerVectorImageComponent } from './components/aol/layer-vector-image/layer-vector-image.component';
|
||||||
|
import { PanToLocation } from './components/aol/pan-to-location/pan-to-location.component';
|
||||||
|
import { RotationResetComponent } from './components/aol/rotation-reset/rotation-reset.component';
|
||||||
|
import { ZoomToExtentComponent } from './components/aol/zoom-to-extent/zoom-to-extent.component';
|
||||||
|
import { FeatureListContainerComponent } from './components/feature-list-container/feature-list-container.component';
|
||||||
|
import { FeatureListCropfieldComponent } from './components/feature-list-cropfield/feature-list-cropfield.component';
|
||||||
|
import { FeatureListObservationComponent } from './components/feature-list-observation/feature-list-observation.component';
|
||||||
|
import { FeatureListCroppingschemeComponent } from './components/feature-list-croppingscheme/feature-list-croppingscheme.component';
|
||||||
|
import { FeatureListFeatureContainerComponent } from './components/feature-list-feature-container/feature-list-feature-container.component';
|
||||||
import { FeatureListFeatureCropfieldComponent } from './components/feature-list-feature-cropfield/feature-list-feature-cropfield.component';
|
import { FeatureListFeatureCropfieldComponent } from './components/feature-list-feature-cropfield/feature-list-feature-cropfield.component';
|
||||||
import { FeatureListFeatureCroppingschemeComponent } from './components/feature-list-feature-croppingscheme/feature-list-feature-croppingscheme.component';
|
import { FeatureListFeatureCroppingschemeComponent } from './components/feature-list-feature-croppingscheme/feature-list-feature-croppingscheme.component';
|
||||||
import { ItemWidgetListComponent} from './components/item-widget-list/item-widget-list.component';
|
import { FeatureListFeatureObservationComponent } from './components/feature-list-feature-observation/feature-list-feature-observation.component';
|
||||||
import { AbstractItemListItemComponent, ItemListItemComponent, AbstractItemWidgetComponent } from './components/item-list-item/item-list-item.component';
|
|
||||||
import { ItemListItemContainerComponent } from './components/item-list-item-container/item-list-item-container.component';
|
|
||||||
import { AbstractItemListComponent,ItemListComponent} from './components/item-list/item-list.component';
|
|
||||||
import { AbstractSelectedItemComponent, SelectedItemComponent } from './components/selected-item/selected-item.component';
|
|
||||||
import { SelectedItemCropfieldComponent } from './components/selected-item-cropfield/selected-item-cropfield.component';
|
|
||||||
import { SelectedItemGeotiffComponent } from './components/selected-item-geotiff/selected-item-geotiff.component';
|
|
||||||
import { SelectedItemTemporalComponent} from './components/selected-item-temporal/selected-item-temporal.component';
|
|
||||||
import {SelectedItemShapeComponent } from './components/selected-item-shape/selected-item-shape.component';
|
|
||||||
import { SelectedItemContainerComponent } from './components/selected-item-container/selected-item-container.component';
|
|
||||||
import { AbstractFeatureListFeatureComponent, FeatureListFeatureComponent } from './components/feature-list-feature/feature-list-feature.component';
|
import { AbstractFeatureListFeatureComponent, FeatureListFeatureComponent } from './components/feature-list-feature/feature-list-feature.component';
|
||||||
import {FeatureListFeatureContainerComponent } from './components/feature-list-feature-container/feature-list-feature-container.component';
|
import { AbstractFeatureListComponent, FeatureListComponent } from './components/feature-list/feature-list.component';
|
||||||
import { FeatureListCroppingschemeComponent } from './components/feature-list-croppingscheme/feature-list-croppingscheme.component';
|
import { GeometryThumbnailComponent } from './components/feature-thumbnail/feature-thumbnail.component';
|
||||||
import {FeatureListCropfieldComponent } from './components/feature-list-cropfield/feature-list-cropfield.component';
|
|
||||||
import {FeatureListContainerComponent } from './components/feature-list-container/feature-list-container.component';
|
|
||||||
import { WidgetHostDirective} from './components/widget-host/widget-host.directive';
|
|
||||||
import { FeatureListComponent,AbstractFeatureListComponent} from './components/feature-list/feature-list.component';
|
|
||||||
import { FileDropTargetComponent } from './components/aol/file-drop-target/file-drop-target.component';
|
|
||||||
import { ItemVectorSourceComponent } from './components/aol/item-vector-source/item-vector-source.component';
|
|
||||||
import { ItemLayersComponent } from './components/aol/item-layers/item-layers.component';
|
|
||||||
import { ZoomToExtentComponent } from './components/aol/zoom-to-extent/zoom-to-extent.component';
|
|
||||||
import { RotationResetComponent } from './components/aol/rotation-reset/rotation-reset.component';
|
|
||||||
import { LayerListComponent } from './components/aol/layer-list/layer-list.component';
|
|
||||||
import { MetaDataModalComponent } from './components/meta-data-modal/meta-data-modal.component';
|
|
||||||
import { SelectPeriodModalComponent } from './components/select-period-modal/select-period-modal.component';
|
|
||||||
import { MapComponent } from './components/map/map.component';
|
|
||||||
import { MapSearchComponent } from './components/map-search/map-search.component';
|
|
||||||
import { MapRoutingModule } from './common-map-routing.module';
|
|
||||||
import { LegendComponent } from './components/legend/legend.component';
|
|
||||||
import { LayerVectorImageComponent } from './components/aol/layer-vector-image/layer-vector-image.component';
|
|
||||||
import {FeatureIconService} from './services/feature-icon.service';
|
|
||||||
import { GeolocationService } from './services/geolocation.service';
|
|
||||||
import {DeviceOrientationService} from './services/device-orientation.service';
|
|
||||||
import { TemporalService} from './services/temporal.service';
|
|
||||||
import { WidgetStatusComponent } from './components/widget-status/widget-status.component';
|
|
||||||
import { ForChild } from './components/for-item/for-child.decorator';
|
import { ForChild } from './components/for-item/for-child.decorator';
|
||||||
import { ForItemType } from './components/for-item/for-itemtype.decorator';
|
import { ForItemType } from './components/for-item/for-itemtype.decorator';
|
||||||
import { ForSourceTask} from './components/for-item/for-sourcetask.decorator';
|
|
||||||
import { ForPackage } from './components/for-item/for-package.decorator';
|
import { ForPackage } from './components/for-item/for-package.decorator';
|
||||||
import { PanToLocation} from './components/aol/pan-to-location/pan-to-location.component';
|
import { ForSourceTask } from './components/for-item/for-sourcetask.decorator';
|
||||||
|
import { ifZoomToShowDirective } from './components/if-zoom-to-show/if-zoom-to-show.directive';
|
||||||
|
import { ItemListItemContainerComponent } from './components/item-list-item-container/item-list-item-container.component';
|
||||||
|
import { AbstractItemListItemComponent, AbstractItemWidgetComponent, ItemListItemComponent } from './components/item-list-item/item-list-item.component';
|
||||||
|
import { AbstractItemListComponent, ItemListComponent } from './components/item-list/item-list.component';
|
||||||
|
import { ItemWidgetListComponent } from './components/item-widget-list/item-widget-list.component';
|
||||||
import { LayerSwitcher } from './components/layer-switcher/layer-switcher.component';
|
import { LayerSwitcher } from './components/layer-switcher/layer-switcher.component';
|
||||||
import { HistogramDetailsComponent } from './components/legend/histogram-details/histogram-details.component';
|
import { HistogramDetailsComponent } from './components/legend/histogram-details/histogram-details.component';
|
||||||
|
import { LegendComponent } from './components/legend/legend.component';
|
||||||
import { StatisticsDetailsComponent } from './components/legend/statistics-details/statistics-details.component';
|
import { StatisticsDetailsComponent } from './components/legend/statistics-details/statistics-details.component';
|
||||||
import { ifZoomToShowDirective} from './components/if-zoom-to-show/if-zoom-to-show.directive';
|
import { MapSearchComponent } from './components/map-search/map-search.component';
|
||||||
|
import { MapComponent } from './components/map/map.component';
|
||||||
|
import { MetaDataModalComponent } from './components/meta-data-modal/meta-data-modal.component';
|
||||||
|
import { SelectPeriodModalComponent } from './components/select-period-modal/select-period-modal.component';
|
||||||
|
import { SelectedItemContainerComponent } from './components/selected-item-container/selected-item-container.component';
|
||||||
|
import { SelectedItemCropfieldComponent } from './components/selected-item-cropfield/selected-item-cropfield.component';
|
||||||
|
import { SelectedItemGeotiffComponent } from './components/selected-item-geotiff/selected-item-geotiff.component';
|
||||||
|
import { SelectedItemShapeComponent } from './components/selected-item-shape/selected-item-shape.component';
|
||||||
|
import { SelectedItemTemporalComponent } from './components/selected-item-temporal/selected-item-temporal.component';
|
||||||
|
import { AbstractSelectedItemComponent, SelectedItemComponent } from './components/selected-item/selected-item.component';
|
||||||
|
import { WidgetHostDirective } from './components/widget-host/widget-host.directive';
|
||||||
|
import { WidgetStatusComponent } from './components/widget-status/widget-status.component';
|
||||||
import { ZoomToShowAlert } from './components/zoom-to-show-alert/zoom-to-show-alert.component';
|
import { ZoomToShowAlert } from './components/zoom-to-show-alert/zoom-to-show-alert.component';
|
||||||
import { LayerValuesComponent } from './components/aol/layer-values/layer-values.component';
|
import { DeviceOrientationService } from './services/device-orientation.service';
|
||||||
import { GeometryThumbnailComponent } from './components/feature-thumbnail/feature-thumbnail.component';
|
import { FeatureIconService } from './services/feature-icon.service';
|
||||||
|
import { GeolocationService } from './services/geolocation.service';
|
||||||
|
import { TemporalService } from './services/temporal.service';
|
||||||
|
|
||||||
export function LocalStorageSync(reducer: ActionReducer<any>): ActionReducer<any> {
|
export function LocalStorageSync(reducer: ActionReducer<any>): ActionReducer<any> {
|
||||||
const r = function(state, action) {
|
const r = function(state, action) {
|
||||||
@@ -104,75 +106,18 @@ export function LocalStorageSync(reducer: ActionReducer<any>): ActionReducer<any
|
|||||||
const metaReducers: Array<MetaReducer<any, any>> = [LocalStorageSync];
|
const metaReducers: Array<MetaReducer<any, any>> = [LocalStorageSync];
|
||||||
|
|
||||||
export {
|
export {
|
||||||
mapEffects,
|
|
||||||
mapReducers,
|
|
||||||
mapActions,
|
|
||||||
ZoomToExtentComponent,
|
|
||||||
ItemVectorSourceComponent,
|
|
||||||
ItemLayersComponent,
|
|
||||||
FileDropTargetComponent,
|
|
||||||
MapComponent,
|
|
||||||
MetaDataModalComponent,
|
|
||||||
RotationResetComponent,
|
|
||||||
MapSearchComponent,
|
|
||||||
SelectPeriodModalComponent,
|
|
||||||
LayerListComponent,
|
|
||||||
LegendComponent,
|
|
||||||
LayerVectorImageComponent,
|
|
||||||
FeatureListComponent,
|
|
||||||
WidgetHostDirective,
|
|
||||||
FeatureListContainerComponent,
|
|
||||||
FeatureListCroppingschemeComponent,
|
|
||||||
FeatureListCropfieldComponent,
|
|
||||||
FeatureListFeatureContainerComponent,
|
|
||||||
FeatureListFeatureComponent,
|
|
||||||
FeatureListFeatureCroppingschemeComponent,
|
|
||||||
FeatureListFeatureCropfieldComponent,
|
|
||||||
SelectedItemContainerComponent,
|
|
||||||
SelectedItemComponent,
|
|
||||||
SelectedItemCropfieldComponent,
|
|
||||||
SelectedItemGeotiffComponent,
|
|
||||||
SelectedItemTemporalComponent,
|
|
||||||
SelectedItemShapeComponent,
|
|
||||||
ItemListItemComponent,
|
|
||||||
ItemListItemContainerComponent,
|
|
||||||
ItemListComponent,
|
|
||||||
ItemWidgetListComponent,
|
|
||||||
WidgetStatusComponent,
|
|
||||||
GpsLocation,
|
|
||||||
PanToLocation,
|
|
||||||
LayerSwitcher,
|
|
||||||
AbstractFeatureListComponent,
|
AbstractFeatureListComponent,
|
||||||
AbstractFeatureListFeatureComponent,
|
AbstractFeatureListFeatureComponent, AbstractItemListComponent, AbstractItemListItemComponent, AbstractItemWidgetComponent, AbstractSelectedItemComponent, DeviceOrientationService, FeatureIconService, FeatureListComponent, FeatureListContainerComponent, FeatureListCropfieldComponent, FeatureListObservationComponent, FeatureListCroppingschemeComponent, FeatureListFeatureComponent, FeatureListFeatureContainerComponent, FeatureListFeatureCropfieldComponent, FeatureListFeatureObservationComponent, FeatureListFeatureCroppingschemeComponent, FileDropTargetComponent, ForChild,
|
||||||
AbstractSelectedItemComponent,
|
ForItemType, ForPackage, ForSourceTask, GeolocationService, GeometryThumbnailComponent, GpsLocation, IClickedFeature, ifZoomToShowDirective, IItemLayer, IMapState, IPeriodState, ISelectedFeatures, ItemLayer, ItemLayersComponent, ItemListComponent, ItemListItemComponent,
|
||||||
AbstractItemWidgetComponent,
|
ItemListItemContainerComponent, ITemporalItemLayer, ItemVectorSourceComponent, ItemWidgetListComponent, LayerListComponent, LayerSwitcher, LayerVectorImageComponent, LegendComponent, mapActions, MapComponent, mapEffects,
|
||||||
AbstractItemListItemComponent,
|
mapReducers, MapSearchComponent, MetaDataModalComponent, PanToLocation, RotationResetComponent, SelectedItemComponent, SelectedItemContainerComponent, SelectedItemCropfieldComponent,
|
||||||
AbstractItemListComponent,
|
SelectedItemGeotiffComponent, SelectedItemShapeComponent, SelectedItemTemporalComponent, SelectPeriodModalComponent, TemporalItemLayer, TemporalService, WidgetHostDirective, WidgetStatusComponent, ZoomToExtentComponent, ZoomToShowAlert
|
||||||
FeatureIconService,
|
};
|
||||||
GeolocationService,
|
|
||||||
DeviceOrientationService,
|
|
||||||
TemporalService,
|
|
||||||
IMapState,
|
|
||||||
ISelectedFeatures,
|
|
||||||
IItemLayer,
|
|
||||||
ItemLayer,
|
|
||||||
IPeriodState,
|
|
||||||
ForChild,
|
|
||||||
ForItemType,
|
|
||||||
ForSourceTask,
|
|
||||||
ForPackage ,
|
|
||||||
ITemporalItemLayer,
|
|
||||||
TemporalItemLayer,
|
|
||||||
ifZoomToShowDirective,
|
|
||||||
ZoomToShowAlert,
|
|
||||||
IClickedFeature,
|
|
||||||
GeometryThumbnailComponent
|
|
||||||
}
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
AppCommonAolModule,
|
AngularOpenlayersModule,
|
||||||
MapRoutingModule,
|
MapRoutingModule,
|
||||||
StoreModule.forFeature(MODULE_NAME, mapReducers.reducer, { metaReducers: metaReducers }),
|
StoreModule.forFeature(MODULE_NAME, mapReducers.reducer, { metaReducers: metaReducers }),
|
||||||
EffectsModule.forFeature([mapEffects.MapEffects]),
|
EffectsModule.forFeature([mapEffects.MapEffects]),
|
||||||
@@ -199,10 +144,12 @@ export {
|
|||||||
FeatureListContainerComponent,
|
FeatureListContainerComponent,
|
||||||
FeatureListCroppingschemeComponent,
|
FeatureListCroppingschemeComponent,
|
||||||
FeatureListCropfieldComponent,
|
FeatureListCropfieldComponent,
|
||||||
|
FeatureListObservationComponent,
|
||||||
FeatureListFeatureContainerComponent,
|
FeatureListFeatureContainerComponent,
|
||||||
FeatureListFeatureComponent,
|
FeatureListFeatureComponent,
|
||||||
FeatureListFeatureCroppingschemeComponent,
|
FeatureListFeatureCroppingschemeComponent,
|
||||||
FeatureListFeatureCropfieldComponent,
|
FeatureListFeatureCropfieldComponent,
|
||||||
|
FeatureListFeatureObservationComponent,
|
||||||
SelectedItemContainerComponent,
|
SelectedItemContainerComponent,
|
||||||
SelectedItemComponent,
|
SelectedItemComponent,
|
||||||
SelectedItemCropfieldComponent,
|
SelectedItemCropfieldComponent,
|
||||||
@@ -235,6 +182,7 @@ export {
|
|||||||
LayerSwitcher,
|
LayerSwitcher,
|
||||||
FeatureListFeatureComponent,
|
FeatureListFeatureComponent,
|
||||||
FeatureListFeatureCropfieldComponent,
|
FeatureListFeatureCropfieldComponent,
|
||||||
|
FeatureListFeatureObservationComponent,
|
||||||
FeatureListFeatureCroppingschemeComponent,
|
FeatureListFeatureCroppingschemeComponent,
|
||||||
SelectedItemContainerComponent,
|
SelectedItemContainerComponent,
|
||||||
SelectedItemComponent,
|
SelectedItemComponent,
|
||||||
@@ -258,6 +206,7 @@ export {
|
|||||||
FeatureListContainerComponent,
|
FeatureListContainerComponent,
|
||||||
FeatureListCroppingschemeComponent,
|
FeatureListCroppingschemeComponent,
|
||||||
FeatureListCropfieldComponent,
|
FeatureListCropfieldComponent,
|
||||||
|
FeatureListObservationComponent,
|
||||||
FeatureListFeatureContainerComponent,
|
FeatureListFeatureContainerComponent,
|
||||||
ZoomToExtentComponent,
|
ZoomToExtentComponent,
|
||||||
ifZoomToShowDirective,
|
ifZoomToShowDirective,
|
||||||
@@ -271,9 +220,11 @@ export {
|
|||||||
TemporalService,
|
TemporalService,
|
||||||
{ provide: AbstractFeatureListComponent, useClass: FeatureListCroppingschemeComponent, multi: true },
|
{ provide: AbstractFeatureListComponent, useClass: FeatureListCroppingschemeComponent, multi: true },
|
||||||
{ provide: AbstractFeatureListComponent, useClass: FeatureListCropfieldComponent, multi: true },
|
{ provide: AbstractFeatureListComponent, useClass: FeatureListCropfieldComponent, multi: true },
|
||||||
|
{ provide: AbstractFeatureListComponent, useClass: FeatureListObservationComponent, multi: true },
|
||||||
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureComponent, multi: true },
|
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureComponent, multi: true },
|
||||||
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCroppingschemeComponent, multi: true },
|
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCroppingschemeComponent, multi: true },
|
||||||
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCropfieldComponent, multi: true },
|
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCropfieldComponent, multi: true },
|
||||||
|
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureObservationComponent, multi: true },
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemComponent, multi: true },
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemComponent, multi: true },
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemCropfieldComponent, multi: true },
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemCropfieldComponent, multi: true },
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemGeotiffComponent, multi: true },
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemGeotiffComponent, multi: true },
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, Input, OnDestroy, OnInit, EventEmitter, Output, Inject } from '@angular/core';
|
import { Component, Input, OnDestroy, OnInit, EventEmitter, Output, Inject } from '@angular/core';
|
||||||
import { MapComponent } from 'ngx-openlayers';
|
import { MapComponent } from '@farmmaps/ng-openlayers';
|
||||||
|
|
||||||
import * as proj from 'ol/proj';
|
import * as proj from 'ol/proj';
|
||||||
import {Point,Geometry} from 'ol/geom';
|
import {Point,Geometry} from 'ol/geom';
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, OnInit, Input, ViewChild, ElementRef, OnChanges, SimpleChanges ,Host} from '@angular/core';
|
import { Component, OnInit, Input, ViewChild, ElementRef, OnChanges, SimpleChanges ,Host} from '@angular/core';
|
||||||
import { MapComponent } from 'ngx-openlayers';
|
import { MapComponent } from '@farmmaps/ng-openlayers';
|
||||||
import Overlay from 'ol/Overlay';
|
import Overlay from 'ol/Overlay';
|
||||||
import { fromLonLat, toLonLat } from 'ol/proj';
|
import { fromLonLat, toLonLat } from 'ol/proj';
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, Host, Input, Output, EventEmitter,OnDestroy, OnInit, OnChanges, SimpleChanges, forwardRef } from '@angular/core';
|
import { Component, Host, Input, Output, EventEmitter,OnDestroy, OnInit, OnChanges, SimpleChanges, forwardRef } from '@angular/core';
|
||||||
import { LayerGroupComponent, MapComponent } from 'ngx-openlayers';
|
import { LayerGroupComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
||||||
import { ItemService,IItem,AppConfig } from '@farmmaps/common';
|
import { ItemService,IItem,AppConfig } from '@farmmaps/common';
|
||||||
import { IItemLayer, ITemporalItemLayer} from '../../../models/item.layer';
|
import { IItemLayer, ITemporalItemLayer} from '../../../models/item.layer';
|
||||||
import { ILayerData} from '../../../models/layer.data';
|
import { ILayerData} from '../../../models/layer.data';
|
||||||
@@ -19,6 +19,7 @@ import VectorTileLayer from 'ol/layer/VectorTile';
|
|||||||
import {GeoJSON,MVT} from 'ol/format';
|
import {GeoJSON,MVT} from 'ol/format';
|
||||||
import { Geometry } from 'ol/geom';
|
import { Geometry } from 'ol/geom';
|
||||||
import BaseLayer from 'ol/layer/Base';
|
import BaseLayer from 'ol/layer/Base';
|
||||||
|
import Feature from 'ol/Feature';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-item-layers',
|
selector: 'fm-map-item-layers',
|
||||||
@@ -180,9 +181,9 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
const source = new VectorSource({
|
const source = new VectorSource({
|
||||||
strategy: loadingstrategy.bbox,
|
strategy: loadingstrategy.bbox,
|
||||||
loader: function (extent: Extent, resolution: number, projection: Projection) {
|
loader: function (extent: Extent, resolution: number, projection: Projection) {
|
||||||
const source = this as VectorSource<Geometry>;
|
const source = this as VectorSource<Feature<Geometry>>;
|
||||||
__this.itemService.getItemFeatures(item.code, extent, projection.getCode(), layerIndex).subscribe(function (data) {
|
__this.itemService.getItemFeatures(item.code, extent, projection.getCode(), layerIndex).subscribe(function (data) {
|
||||||
const features = format.readFeatures(data);
|
const features = format.readFeatures(data).filter(feature => feature instanceof Feature) as Feature[];
|
||||||
for (const f of features) {
|
for (const f of features) {
|
||||||
if (f.get("code")) {
|
if (f.get("code")) {
|
||||||
f.setId(f.get("code"));
|
f.setId(f.get("code"));
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, Host, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, forwardRef, Inject, InjectionToken, OnDestroy, LOCALE_ID } from '@angular/core';
|
import { Component, Host, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, forwardRef, Inject, InjectionToken, OnDestroy, LOCALE_ID } from '@angular/core';
|
||||||
import { LayerVectorComponent, SourceVectorComponent, MapComponent } from 'ngx-openlayers';
|
import { LayerVectorComponent, SourceVectorComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
||||||
import { ItemService, ItemTypeService, IItem, IItemType, FolderService } from '@farmmaps/common';
|
import { ItemService, ItemTypeService, IItem, IItemType, FolderService } from '@farmmaps/common';
|
||||||
|
|
||||||
import { Feature } from 'ol';
|
import { Feature } from 'ol';
|
||||||
@@ -29,7 +29,7 @@ import { formatNumber } from '@angular/common';
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class ItemVectorSourceComponent extends SourceVectorComponent implements OnInit, OnDestroy, OnChanges {
|
export class ItemVectorSourceComponent extends SourceVectorComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
instance: Vector<Geometry>;
|
instance: Vector<Feature<Geometry>>;
|
||||||
private _format: GeoJSON;
|
private _format: GeoJSON;
|
||||||
private _select: Select;
|
private _select: Select;
|
||||||
private _hoverSelect: Select;
|
private _hoverSelect: Select;
|
||||||
@@ -83,6 +83,7 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.sub = this.folderService.getFolder('my_settings').subscribe(
|
this.sub = this.folderService.getFolder('my_settings').subscribe(
|
||||||
userSettingsRoot => {
|
userSettingsRoot => {
|
||||||
|
if (userSettingsRoot == undefined) return;
|
||||||
this.itemService.getChildItemList(userSettingsRoot.code, 'vnd.farmmaps.itemtype.settings.general').subscribe(
|
this.itemService.getChildItemList(userSettingsRoot.code, 'vnd.farmmaps.itemtype.settings.general').subscribe(
|
||||||
items => {
|
items => {
|
||||||
if (items && items.length > 0 && items[0].data?.displayMapFeatureSettings) {
|
if (items && items.length > 0 && items[0].data?.displayMapFeatureSettings) {
|
||||||
|
@@ -3,7 +3,7 @@ import { IItemLayer } from '../../../models/item.layer';
|
|||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import * as mapReducers from '../../../reducers/map.reducer';
|
import * as mapReducers from '../../../reducers/map.reducer';
|
||||||
import * as mapActions from '../../../actions/map.actions';
|
import * as mapActions from '../../../actions/map.actions';
|
||||||
import { MapComponent } from 'ngx-openlayers';
|
import { MapComponent } from '@farmmaps/ng-openlayers';
|
||||||
import { ILayervalue } from '../../../models/layer.value';
|
import { ILayervalue } from '../../../models/layer.value';
|
||||||
import { Observable, interval, Subject } from 'rxjs';
|
import { Observable, interval, Subject } from 'rxjs';
|
||||||
import { debounce, throttle } from 'rxjs/operators';
|
import { debounce, throttle } from 'rxjs/operators';
|
||||||
|
@@ -1,8 +1,9 @@
|
|||||||
import { Component, OnDestroy, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, OnDestroy, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { LayerVectorComponent, MapComponent } from 'ngx-openlayers';
|
import { LayerVectorComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
||||||
import RenderType from 'ol/layer/Vector';
|
import RenderType from 'ol/layer/Vector';
|
||||||
import { Vector as VectorSource } from 'ol/source';
|
import { Vector as VectorSource } from 'ol/source';
|
||||||
import { Geometry } from 'ol/geom';
|
import { Geometry } from 'ol/geom';
|
||||||
|
import Feature from 'ol/Feature';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-aol-layer-vector-image',
|
selector: 'fm-map-aol-layer-vector-image',
|
||||||
@@ -14,7 +15,7 @@ export class LayerVectorImageComponent extends LayerVectorComponent implements O
|
|||||||
//public source: Vector;
|
//public source: Vector;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
renderMode: RenderType<VectorSource<Geometry>> | string = "image";
|
renderMode: RenderType<VectorSource<Feature<Geometry>>> | string = "image";
|
||||||
|
|
||||||
constructor(map: MapComponent) {
|
constructor(map: MapComponent) {
|
||||||
super(map);
|
super(map);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, OnInit, Input, Host, OnChanges, SimpleChanges,ChangeDetectorRef } from '@angular/core';
|
import { Component, OnInit, Input, Host, OnChanges, SimpleChanges,ChangeDetectorRef } from '@angular/core';
|
||||||
import { MapComponent } from 'ngx-openlayers';
|
import { MapComponent } from '@farmmaps/ng-openlayers';
|
||||||
import {IMapState} from '../../../models/map.state'
|
import {IMapState} from '../../../models/map.state'
|
||||||
import {View} from 'ol';
|
import {View} from 'ol';
|
||||||
import { fromLonLat } from 'ol/proj';
|
import { fromLonLat } from 'ol/proj';
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, Host, Input, OnInit, ChangeDetectorRef } from '@angular/core';
|
import { Component, Host, Input, OnInit, ChangeDetectorRef } from '@angular/core';
|
||||||
import { ViewComponent, MapComponent } from 'ngx-openlayers';
|
import { ViewComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
||||||
|
|
||||||
import {View} from 'ol';
|
import {View} from 'ol';
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
import { Component, Host, Input, OnInit, OnChanges, SimpleChanges, forwardRef } from '@angular/core';
|
import { Component, Host, Input, OnInit, OnChanges, SimpleChanges, forwardRef } from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { ViewComponent, MapComponent } from 'ngx-openlayers';
|
import { ViewComponent, MapComponent } from '@farmmaps/ng-openlayers';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -0,0 +1,10 @@
|
|||||||
|
<div *ngIf="feature;let feature">
|
||||||
|
<div class="row m-0">
|
||||||
|
<div class="col-3 m-0 p-2 thumbnail">
|
||||||
|
<img [src]="getSource(feature)" style="width: 34px">
|
||||||
|
</div>
|
||||||
|
<div class="col p-2" style="margin: auto;">
|
||||||
|
<h1 class="card-title" title="{{feature.get('name')}}">{{feature.get('name')}}</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@@ -0,0 +1,22 @@
|
|||||||
|
.card-title {
|
||||||
|
font-size: 1rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-text {
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.col {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thumbnail {
|
||||||
|
width: 4em;
|
||||||
|
height: 4em;
|
||||||
|
}
|
||||||
|
|
@@ -0,0 +1,29 @@
|
|||||||
|
import { Component, Injectable } from '@angular/core';
|
||||||
|
import { AppConfig, commonReducers, ItemTypeService } from '@farmmaps/common';
|
||||||
|
import { Store } from '@ngrx/store';
|
||||||
|
import { Feature } from 'ol';
|
||||||
|
import { Geometry } from 'ol/geom';
|
||||||
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
|
import { AbstractFeatureListFeatureComponent } from '../feature-list-feature/feature-list-feature.component';
|
||||||
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
|
|
||||||
|
@ForItemType("vnd.farmmaps.itemtype.observation")
|
||||||
|
@Injectable()
|
||||||
|
@Component({
|
||||||
|
selector: 'fm-map-feature-list-feature-observation',
|
||||||
|
templateUrl: './feature-list-feature-observation.component.html',
|
||||||
|
styleUrls: ['./feature-list-feature-observation.component.scss']
|
||||||
|
})
|
||||||
|
export class FeatureListFeatureObservationComponent extends AbstractFeatureListFeatureComponent {
|
||||||
|
|
||||||
|
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService,config:AppConfig) {
|
||||||
|
super(store, itemTypeService,config);
|
||||||
|
}
|
||||||
|
|
||||||
|
getSource(feature: Feature<Geometry>): string {
|
||||||
|
let source = "/images/decease.png";
|
||||||
|
var type = feature.get('type');
|
||||||
|
source = '/images/' + type + '.png';
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,14 @@
|
|||||||
|
<div class="card border-0">
|
||||||
|
<div class="card-body" *ngIf="(schemeItem|async);let schemeItem">
|
||||||
|
<fm-back-button></fm-back-button>
|
||||||
|
<h4 i18n>Farm</h4>
|
||||||
|
<h3>{{schemeItem.name}}</h3>
|
||||||
|
<div *ngIf="features;let features">
|
||||||
|
<div class="cropfields">
|
||||||
|
<div class="row m-0 ps-3 pe-3" *ngFor="let feature of features" [ngClass]="{'selected':isFeatureSelected(feature)}" (click)="handleFeatureClick(feature)" (mouseenter)="handleFeatureMouseEnter(feature)" (mouseleave)="handleFeatureMouseLeave(feature)">
|
||||||
|
<fm-map-feature-list-feature-container [feature]="feature"></fm-map-feature-list-feature-container>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
@@ -0,0 +1,20 @@
|
|||||||
|
fm-map-feature-list-feature-container {
|
||||||
|
width:100%;
|
||||||
|
pointer-events:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
border-bottom: 1px solid var(--bs-gray-500);
|
||||||
|
user-select: none;
|
||||||
|
padding-left:1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row.selected {
|
||||||
|
background-color: var(--bs-gray-100);
|
||||||
|
}
|
||||||
|
|
||||||
|
.cropfields {
|
||||||
|
border-top: 1px solid var(--bs-gray-500);
|
||||||
|
margin-left: -1.25rem;
|
||||||
|
margin-right: -1.25rem;
|
||||||
|
}
|
@@ -0,0 +1,30 @@
|
|||||||
|
import { Component, Injectable,AfterViewInit, OnInit,SimpleChanges, ChangeDetectorRef} from '@angular/core';
|
||||||
|
import { Location } from '@angular/common';
|
||||||
|
import { AbstractFeatureListComponent } from '../feature-list/feature-list.component';
|
||||||
|
import {ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
|
import {ForChild } from '../for-item/for-child.decorator';
|
||||||
|
import { Store } from '@ngrx/store';
|
||||||
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
|
import { commonReducers, ItemTypeService, IItem,ItemService } from '@farmmaps/common';
|
||||||
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
|
@ForChild()
|
||||||
|
@ForItemType("vnd.farmmaps.itemtype.observation")
|
||||||
|
@Injectable()
|
||||||
|
@Component({
|
||||||
|
selector: 'fm-map-feature-list-observation',
|
||||||
|
templateUrl: './feature-list-observation.component.html',
|
||||||
|
styleUrls: ['./feature-list-observation.component.scss']
|
||||||
|
})
|
||||||
|
export class FeatureListObservationComponent extends AbstractFeatureListComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, private itemService: ItemService) {
|
||||||
|
super(store, itemTypeService,location);
|
||||||
|
}
|
||||||
|
|
||||||
|
public schemeItem: Observable<IItem>
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.schemeItem = this.itemService.getItem(this.queryState.parentCode);
|
||||||
|
}
|
||||||
|
}
|
@@ -1,7 +1,7 @@
|
|||||||
import { Directive, ViewContainerRef,TemplateRef,OnInit,Input, OnChanges } from '@angular/core';
|
import { Directive, ViewContainerRef,TemplateRef,OnInit,Input, OnChanges } from '@angular/core';
|
||||||
import { Layer } from 'ol/layer';
|
import { Layer } from 'ol/layer';
|
||||||
import { Source } from 'ol/source';
|
import { Source } from 'ol/source';
|
||||||
import { MapComponent } from 'ngx-openlayers';
|
import { MapComponent } from '@farmmaps/ng-openlayers';
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[fmMapIfZoomToShow]',
|
selector: '[fmMapIfZoomToShow]',
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<li class="nav-item py-0">
|
<li class="nav-item py-0">
|
||||||
<span><i class="fal fa-layer-group" aria-hidden="true"></i> <span i18n>Base maps</span></span>
|
<span><i class="fal fa-layer-group" aria-hidden="true"></i> <span i18n>Base maps</span></span>
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<fm-map-layer-list [baseLayers]="true" [itemLayers]="baseLayers|async" [selectedLayer]="selectedBaseLayer|async" (onSelectLayer)="handleSelectBaseLayer($event)"></fm-map-layer-list>
|
<fm-map-layer-list [baseLayers]="true" [itemLayers]="baseMaps|async" [selectedLayer]="selectedBaseLayer|async" (onSelectLayer)="handleSelectBaseLayer($event)"></fm-map-layer-list>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item py-0">
|
<li class="nav-item py-0">
|
||||||
@@ -20,12 +20,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item py-0" *ngIf="selectedItemLayer$ | async as selectedItemLayer">
|
<li class="nav-item py-0" *ngIf="selectedItemLayer$ | async as selectedItemLayer">
|
||||||
<span><i class="fal fa-layer-group" aria-hidden="true"></i> <span i18n>Data</span><span class="slideButton"><a href="#" title="Compare" class="btn btn-light btn-sm" (click)="handleToggleShowDatalayerSlide($event)"><i class="fal fa-sliders-h-square"></i></a></span></span>
|
<span><i class="fal fa-layer-group" aria-hidden="true"></i> <span i18n>Overlay slider</span><span class="slideButton"><a href="#" title="Compare" class="btn btn-light btn-sm" (click)="handleToggleShowDatalayerSlide($event)"><i class="fal fa-sliders-h-square"></i></a></span></span>
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<fm-map-layer-list [dataLayers]="true" [itemLayers]="[selectedItemLayer]" [selectedLayer]="selectedItemLayer" (onToggleVisibility)="handleOnToggleVisibility($event)" (onSetOpacity)="handleOnSetOpacity($event)" (onZoomToExtent)="handleZoomToExtent($event)" (onSelectLayer)="handleSelectOverlayLayer($event)"></fm-map-layer-list>
|
<fm-map-layer-list [dataLayers]="true" [itemLayers]="[selectedItemLayer]" [selectedLayer]="selectedItemLayer" (onToggleVisibility)="handleOnToggleVisibility($event)" (onSetOpacity)="handleOnSetOpacity($event)" (onZoomToExtent)="handleZoomToExtent($event)" (onSelectLayer)="handleSelectOverlayLayer($event)"></fm-map-layer-list>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item py-0">
|
||||||
|
<span><i class="fal fa-layer-group" aria-hidden="true"></i> <span i18n>Aerial photos</span></span>
|
||||||
|
<div class="mb-4">
|
||||||
|
<fm-map-layer-list [baseLayers]="true" [itemLayers]="aerialMaps|async" [selectedLayer]="selectedBaseLayer|async" (onSelectLayer)="handleSelectBaseLayer($event)"></fm-map-layer-list>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -4,7 +4,7 @@ import { Store } from '@ngrx/store';
|
|||||||
import * as mapReducers from '../../reducers/map.reducer';
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import * as mapActions from '../../actions/map.actions';
|
import * as mapActions from '../../actions/map.actions';
|
||||||
import {createEmpty,extend } from 'ol/extent';
|
import {createEmpty,extend } from 'ol/extent';
|
||||||
import { Observable } from 'rxjs';
|
import { filter, map, Observable } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-layer-switcher',
|
selector: 'fm-map-layer-switcher',
|
||||||
@@ -17,7 +17,8 @@ export class LayerSwitcher implements OnInit,OnChanges{
|
|||||||
public overlayLayers: Observable<Array<IItemLayer>>;
|
public overlayLayers: Observable<Array<IItemLayer>>;
|
||||||
public selectedOverlayLayer: Observable<IItemLayer>;
|
public selectedOverlayLayer: Observable<IItemLayer>;
|
||||||
public selectedItemLayer$: Observable<IItemLayer>;
|
public selectedItemLayer$: Observable<IItemLayer>;
|
||||||
public baseLayers: Observable<Array<IItemLayer>>;
|
public baseMaps: Observable<Array<IItemLayer>>;
|
||||||
|
public aerialMaps: Observable<Array<IItemLayer>>;
|
||||||
public selectedBaseLayer: Observable<IItemLayer>;
|
public selectedBaseLayer: Observable<IItemLayer>;
|
||||||
|
|
||||||
constructor( private store: Store<mapReducers.State>) {
|
constructor( private store: Store<mapReducers.State>) {
|
||||||
@@ -26,7 +27,8 @@ export class LayerSwitcher implements OnInit,OnChanges{
|
|||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.overlayLayers = this.store.select(mapReducers.selectGetOverlayLayers);
|
this.overlayLayers = this.store.select(mapReducers.selectGetOverlayLayers);
|
||||||
this.selectedOverlayLayer = this.store.select(mapReducers.selectGetSelectedOverlayLayer);
|
this.selectedOverlayLayer = this.store.select(mapReducers.selectGetSelectedOverlayLayer);
|
||||||
this.baseLayers = this.store.select(mapReducers.selectGetBaseLayers);
|
this.baseMaps = this.store.select(mapReducers.selectGetBaseMaps);
|
||||||
|
this.aerialMaps = this.store.select(mapReducers.selectGetArealMaps);
|
||||||
this.selectedBaseLayer = this.store.select(mapReducers.selectGetSelectedBaseLayer);
|
this.selectedBaseLayer = this.store.select(mapReducers.selectGetSelectedBaseLayer);
|
||||||
this.selectedItemLayer$ = this.store.select(mapReducers.selectGetSelectedItemLayer)
|
this.selectedItemLayer$ = this.store.select(mapReducers.selectGetSelectedItemLayer)
|
||||||
this.showLayerSwitcher = this.store.select(mapReducers.selectGetShowLayerSwitcher);
|
this.showLayerSwitcher = this.store.select(mapReducers.selectGetShowLayerSwitcher);
|
||||||
@@ -83,3 +85,4 @@ export class LayerSwitcher implements OnInit,OnChanges{
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@@ -10,6 +10,7 @@
|
|||||||
panelVisible:panelVisible$|async,
|
panelVisible:panelVisible$|async,
|
||||||
openedModalName:openedModalName$|async,
|
openedModalName:openedModalName$|async,
|
||||||
panelCollapsed:panelCollapsed$|async,
|
panelCollapsed:panelCollapsed$|async,
|
||||||
|
panelExtraWide:panelExtraWide$|async,
|
||||||
searchMinified:searchMinified$|async,
|
searchMinified:searchMinified$|async,
|
||||||
selectedItem:selectedItem$|async,
|
selectedItem:selectedItem$|async,
|
||||||
parentItem:parentItem$|async,
|
parentItem:parentItem$|async,
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="side-panel-container">
|
<div class="side-panel-container">
|
||||||
|
|
||||||
<fm-side-panel [resizeable]="true" (onResize)="handlePanelResize($event)" [visible]="state.panelVisible && noContent" [collapsed]="state.panelCollapsed" [collapsable]="false">
|
<fm-side-panel [resizeable]="true" (onResize)="handlePanelResize($event)" [visible]="state.panelVisible && noContent" [collapsed]="state.panelCollapsed" [collapsable]="false" [extrawide]="state.panelExtraWide">
|
||||||
<div class="panel-wrapper" *ngIf="noContent">
|
<div class="panel-wrapper" *ngIf="noContent">
|
||||||
<div class="panel-top bg-secondary" *ngIf="!(state.searchMinified)">
|
<div class="panel-top bg-secondary" *ngIf="!(state.searchMinified)">
|
||||||
</div>
|
</div>
|
||||||
@@ -84,7 +85,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fm-side-panel>
|
</fm-side-panel>
|
||||||
<fm-side-panel [resizeable]="true" [visible]="!noContent">
|
<fm-side-panel [resizeable]="true" [visible]="!noContent" [extrawide]="state.panelExtraWide">
|
||||||
<router-outlet (activate)="handleSidepaneloutletActivate($event)" (deactivate)="handleSidepaneloutletDeactivate($event)"></router-outlet>
|
<router-outlet (activate)="handleSidepaneloutletActivate($event)" (deactivate)="handleSidepaneloutletDeactivate($event)"></router-outlet>
|
||||||
</fm-side-panel>
|
</fm-side-panel>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -52,12 +52,21 @@ aol-map { position:absolute;width:100%;height:calc( 100vh );}
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
.control-container {
|
||||||
|
margin-left: 1em;
|
||||||
|
margin-right: 1em;
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 768px) {
|
||||||
.control-container {
|
.control-container {
|
||||||
float: right;
|
float: right;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
pointer-events: all;
|
pointer-events: all;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.fullscreen .viewport-container {
|
.fullscreen .viewport-container {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
|
@@ -66,6 +66,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
public parentCode$: Observable<string> = this.store.select(mapReducers.selectGetParentCode);
|
public parentCode$: Observable<string> = this.store.select(mapReducers.selectGetParentCode);
|
||||||
public panelVisible$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelVisible);
|
public panelVisible$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelVisible);
|
||||||
public panelCollapsed$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelCollapsed);
|
public panelCollapsed$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelCollapsed);
|
||||||
|
public panelExtraWide$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelExtraWide);
|
||||||
public selectedFeature$: Observable<Feature<Geometry>> = this.store.select(mapReducers.selectGetSelectedFeature);
|
public selectedFeature$: Observable<Feature<Geometry>> = this.store.select(mapReducers.selectGetSelectedFeature);
|
||||||
public clickedFeature: Subject<Feature<Geometry>> = new Subject<Feature<Geometry>>();
|
public clickedFeature: Subject<Feature<Geometry>> = new Subject<Feature<Geometry>>();
|
||||||
public selectedItem$: Observable<IItem> = this.store.select(mapReducers.selectGetSelectedItem);
|
public selectedItem$: Observable<IItem> = this.store.select(mapReducers.selectGetSelectedItem);
|
||||||
@@ -91,6 +92,8 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
public noContent = false;
|
public noContent = false;
|
||||||
public overrideSelectedItemLayer = false;
|
public overrideSelectedItemLayer = false;
|
||||||
public overrideOverlayLayers = false;
|
public overrideOverlayLayers = false;
|
||||||
|
public hideShowLayerValues = false;
|
||||||
|
public const
|
||||||
public dataLayerSlideValue = 50;
|
public dataLayerSlideValue = 50;
|
||||||
public dataLayerSlideEnabled = false;
|
public dataLayerSlideEnabled = false;
|
||||||
private visibleAreaBottom = 0;
|
private visibleAreaBottom = 0;
|
||||||
@@ -115,6 +118,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
const params = route.snapshot.data["fm-map-map"];
|
const params = route.snapshot.data["fm-map-map"];
|
||||||
this.overrideSelectedItemLayer = params["overrideSelectedItemlayer"] ? params["overrideSelectedItemlayer"] : false;
|
this.overrideSelectedItemLayer = params["overrideSelectedItemlayer"] ? params["overrideSelectedItemlayer"] : false;
|
||||||
this.overrideOverlayLayers = params["overrideOverlayLayers"] ? params["overrideOverlayLayers"] : false;
|
this.overrideOverlayLayers = params["overrideOverlayLayers"] ? params["overrideOverlayLayers"] : false;
|
||||||
|
this.hideShowLayerValues = params["hideShowLayerValues"] ? params["hideShowLayerValues"] : false;
|
||||||
}
|
}
|
||||||
this.querySub = this.query$.pipe(skip(1), withLatestFrom(this.mapState$)).subscribe(([query, mapState]) => {
|
this.querySub = this.query$.pipe(skip(1), withLatestFrom(this.mapState$)).subscribe(([query, mapState]) => {
|
||||||
if (query && query.querystate) {
|
if (query && query.querystate) {
|
||||||
@@ -208,12 +212,18 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
if (component && component.hasOwnProperty('clickedFeature')) {
|
if (component && component.hasOwnProperty('clickedFeature')) {
|
||||||
(component as IClickedFeature).clickedFeature = this.clickedFeature;
|
(component as IClickedFeature).clickedFeature = this.clickedFeature;
|
||||||
}
|
}
|
||||||
|
if (component && component.hasOwnProperty('extrawide')) {
|
||||||
|
this.store.dispatch(new mapActions.SetPanelExtraWide(true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSidepaneloutletDeactivate(component: any) {
|
handleSidepaneloutletDeactivate(component: any) {
|
||||||
if (component && component.hasOwnProperty('clickedFeature')) {
|
if (component && component.hasOwnProperty('clickedFeature')) {
|
||||||
(component as IClickedFeature).clickedFeature = null;
|
(component as IClickedFeature).clickedFeature = null;
|
||||||
}
|
}
|
||||||
|
if (component && component.hasOwnProperty('extrawide')) {
|
||||||
|
this.store.dispatch(new mapActions.SetPanelExtraWide(false));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handlePrerender(event: any) {
|
handlePrerender(event: any) {
|
||||||
@@ -290,11 +300,13 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
|
|
||||||
normalizeMapState(mapState: IMapState): IMapState {
|
normalizeMapState(mapState: IMapState): IMapState {
|
||||||
if (!mapState) return null;
|
if (!mapState) return null;
|
||||||
return {zoom: this.round(mapState.zoom,0),
|
return {
|
||||||
|
zoom: this.round(mapState.zoom, 0),
|
||||||
rotation: this.round(mapState.rotation, 2),
|
rotation: this.round(mapState.rotation, 2),
|
||||||
xCenter: this.round(mapState.xCenter, 5),
|
xCenter: this.round(mapState.xCenter, 5),
|
||||||
yCenter: this.round(mapState.yCenter, 5),
|
yCenter: this.round(mapState.yCenter, 5),
|
||||||
baseLayerCode: mapState.baseLayerCode };
|
baseLayerCode: mapState.baseLayerCode
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
serializeMapState(mapState: IMapState): string {
|
serializeMapState(mapState: IMapState): string {
|
||||||
@@ -465,11 +477,13 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleShowLayerValues(event: MouseEvent) {
|
handleShowLayerValues(event: MouseEvent) {
|
||||||
|
if (!this.hideShowLayerValues) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
this.zone.run(() => {
|
this.zone.run(() => {
|
||||||
this.store.dispatch(new mapActions.ToggleLayerValuesEnabled());
|
this.store.dispatch(new mapActions.ToggleLayerValuesEnabled());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
handleOnDownload(event) {
|
handleOnDownload(event) {
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ export class SelectedItemCropfieldComponent extends AbstractSelectedItemComponen
|
|||||||
public items: Observable<IListItem[]>;
|
public items: Observable<IListItem[]>;
|
||||||
|
|
||||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService,private folderService$: FolderService) {
|
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService,private folderService$: FolderService) {
|
||||||
super(store, itemTypeService,location,router);
|
super(store, itemTypeService, itemService$, location,router);
|
||||||
}
|
}
|
||||||
|
|
||||||
areaInHa(item:IItem):number {
|
areaInHa(item:IItem):number {
|
||||||
|
@@ -7,7 +7,8 @@
|
|||||||
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
|
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
|
||||||
<h1>{{item.name}}</h1>
|
<h1>{{item.name}}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
<ng-container *ngIf="item?.data.layers;let layers">
|
||||||
|
<div class="legend-container">
|
||||||
<div class="card menu-card">
|
<div class="card menu-card">
|
||||||
<div *ngIf="layers.length>1">
|
<div *ngIf="layers.length>1">
|
||||||
<select (change)="onLayerChanged($event.target.value)">
|
<select (change)="onLayerChanged($event.target.value)">
|
||||||
@@ -26,9 +27,11 @@
|
|||||||
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<li><fm-item-link class="text-primary p-0" [itemCode]="item.code" pathSuffix="data" [showText]="true"></fm-item-link></li>
|
<li><fm-item-link class="text-primary p-0" [itemCode]="item.code" pathSuffix="data" [showText]="true"></fm-item-link></li>
|
||||||
|
<li><a href="#" (click)="download($event,item,layers,itemLayer.layerIndex)"><i class="fal fa-download" aria-hidden="true" i18n-title title="Download"></i> <span i18n>Download</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<fm-map-zoom-to-show-alert [layer]="itemLayer?.layer"></fm-map-zoom-to-show-alert>
|
<fm-map-zoom-to-show-alert [layer]="itemLayer?.layer"></fm-map-zoom-to-show-alert>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,12 +1,13 @@
|
|||||||
import { Component, Injectable } from '@angular/core';
|
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { Store } from '@ngrx/store';
|
import { Component, Injectable, OnDestroy } from '@angular/core';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
|
||||||
import { commonReducers, ItemTypeService, ItemService, FolderService } from '@farmmaps/common';
|
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
import { commonReducers, FolderService, IItem, IItemLinkType, ItemService, ItemTypeService, IUrlType } from '@farmmaps/common';
|
||||||
|
import { Store } from '@ngrx/store';
|
||||||
|
import { Subscription } from 'rxjs';
|
||||||
|
import * as mapActions from '../../actions/map.actions';
|
||||||
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
|
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
|
||||||
import * as mapActions from '../../actions/map.actions';
|
|
||||||
|
|
||||||
|
|
||||||
@ForItemType("vnd.farmmaps.itemtype.geotiff.processed")
|
@ForItemType("vnd.farmmaps.itemtype.geotiff.processed")
|
||||||
@@ -16,10 +17,15 @@ import * as mapActions from '../../actions/map.actions';
|
|||||||
templateUrl: './selected-item-geotiff.component.html',
|
templateUrl: './selected-item-geotiff.component.html',
|
||||||
styleUrls: ['./selected-item-geotiff.component.scss']
|
styleUrls: ['./selected-item-geotiff.component.scss']
|
||||||
})
|
})
|
||||||
export class SelectedItemGeotiffComponent extends AbstractSelectedItemComponent {
|
export class SelectedItemGeotiffComponent extends AbstractSelectedItemComponent implements OnDestroy {
|
||||||
|
sub: Subscription;
|
||||||
|
|
||||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService,private folderService$: FolderService) {
|
constructor(store: Store<mapReducers.State | commonReducers.State>, public itemService: ItemService, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService,private folderService$: FolderService) {
|
||||||
super(store, itemTypeService,location,router);
|
super(store, itemTypeService,itemService,location,router);
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
if (this.sub) this.sub.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
onLayerChanged(layerIndex: number) {
|
onLayerChanged(layerIndex: number) {
|
||||||
@@ -29,4 +35,13 @@ export class SelectedItemGeotiffComponent extends AbstractSelectedItemComponent
|
|||||||
layer(layers:any,layerIndex:number) {
|
layer(layers:any,layerIndex:number) {
|
||||||
return layers.find(l => l.index == layerIndex);
|
return layers.find(l => l.index == layerIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
download(event:MouseEvent,item:IItem,layers:any,layerIndex:number) {
|
||||||
|
event.stopPropagation();
|
||||||
|
event.preventDefault();
|
||||||
|
const itemLink : IItemLinkType = {itemcode:item.code,query:`layer=${this.layer(layers,layerIndex).name}`,pathsuffix:"download", validminutes:10}
|
||||||
|
this.sub = this.itemService.getItemLink(itemLink).subscribe((itemLinkUrl:IUrlType) => {
|
||||||
|
window.location.href = itemLinkUrl.url;
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,8 @@
|
|||||||
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
|
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
|
||||||
<h1>{{item.name}}</h1>
|
<h1>{{item.name}}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
<ng-container *ngIf="item?.data.layers;let layers">
|
||||||
|
<div class="legend-container">
|
||||||
<div class="card menu-card">
|
<div class="card menu-card">
|
||||||
<div *ngIf="layers.length>1">
|
<div *ngIf="layers.length>1">
|
||||||
<select (change)="onLayerChanged($event.target.value)">
|
<select (change)="onLayerChanged($event.target.value)">
|
||||||
@@ -24,8 +25,10 @@
|
|||||||
<li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)" ><i class="fas fa-layer-olus" aria-hidden="true" i18n-title title="Add as layer"></i> <span i18n>Add as overlay</span></a></li>
|
<li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)" ><i class="fas fa-layer-olus" aria-hidden="true" i18n-title title="Add as layer"></i> <span i18n>Add as overlay</span></a></li>
|
||||||
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)" ><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)" ><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
<li><a href="#" (click)="download($event,item,layers,itemLayer.layerIndex)"><i class="fal fa-download" aria-hidden="true" i18n-title title="Download"></i> <span i18n>Download</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
</ng-container>
|
||||||
<fm-map-zoom-to-show-alert [layer]="itemLayer?.layer"></fm-map-zoom-to-show-alert>
|
<fm-map-zoom-to-show-alert [layer]="itemLayer?.layer"></fm-map-zoom-to-show-alert>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,14 +1,13 @@
|
|||||||
import { Component, Input, Injectable, OnInit } from '@angular/core';
|
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { Feature } from 'ol';
|
import { Component, Injectable, OnDestroy } from '@angular/core';
|
||||||
|
import { Router } from '@angular/router';
|
||||||
|
import { commonReducers, FolderService, IItem, IItemLinkType, ItemService, ItemTypeService, IUrlType } from '@farmmaps/common';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
|
||||||
import { commonReducers, ItemTypeService, IItem, Item, ItemService, FolderService, IListItem} from '@farmmaps/common';
|
|
||||||
import * as mapActions from '../../actions/map.actions';
|
import * as mapActions from '../../actions/map.actions';
|
||||||
import { Router, ActivatedRoute, ParamMap, Event } from '@angular/router';
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
|
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
|
||||||
import { Observable } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
|
|
||||||
|
|
||||||
@ForItemType("vnd.farmmaps.itemtype.shape.processed")
|
@ForItemType("vnd.farmmaps.itemtype.shape.processed")
|
||||||
@@ -18,12 +17,17 @@ import { Observable } from 'rxjs';
|
|||||||
templateUrl: './selected-item-shape.component.html',
|
templateUrl: './selected-item-shape.component.html',
|
||||||
styleUrls: ['./selected-item-shape.component.scss']
|
styleUrls: ['./selected-item-shape.component.scss']
|
||||||
})
|
})
|
||||||
export class SelectedItemShapeComponent extends AbstractSelectedItemComponent {
|
export class SelectedItemShapeComponent extends AbstractSelectedItemComponent implements OnDestroy {
|
||||||
|
|
||||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService,private folderService$: FolderService) {
|
|
||||||
super(store, itemTypeService,location,router);
|
|
||||||
}
|
|
||||||
public selectedLayer = 0;
|
public selectedLayer = 0;
|
||||||
|
sub: Subscription;
|
||||||
|
|
||||||
|
constructor(store: Store<mapReducers.State | commonReducers.State>, public itemService: ItemService, itemTypeService: ItemTypeService, location: Location, router: Router, private itemService$: ItemService,private folderService$: FolderService) {
|
||||||
|
super(store, itemTypeService,itemService,location,router);
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
if (this.sub) this.sub.unsubscribe();
|
||||||
|
}
|
||||||
|
|
||||||
onLayerChanged(layerIndex: number) {
|
onLayerChanged(layerIndex: number) {
|
||||||
this.store.dispatch(new mapActions.SetLayerIndex(layerIndex));
|
this.store.dispatch(new mapActions.SetLayerIndex(layerIndex));
|
||||||
@@ -32,4 +36,13 @@ export class SelectedItemShapeComponent extends AbstractSelectedItemComponent {
|
|||||||
layer(layers:any,layerIndex:number) {
|
layer(layers:any,layerIndex:number) {
|
||||||
return layers.find(l => l.index == layerIndex);
|
return layers.find(l => l.index == layerIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
download(event:MouseEvent,item:IItem,layers:any,layerIndex:number) {
|
||||||
|
event.stopPropagation();
|
||||||
|
event.preventDefault();
|
||||||
|
const itemLink : IItemLinkType = {itemcode:item.code,query:`layer=${this.layer(layers,layerIndex).name}`,pathsuffix:"download", validminutes:10}
|
||||||
|
this.sub = this.itemService.getItemLink(itemLink).subscribe((itemLinkUrl:IUrlType) => {
|
||||||
|
window.location.href = itemLinkUrl.url;
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -7,7 +7,8 @@
|
|||||||
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
|
<h2 *ngIf="parentOfItemType('vnd.farmmaps.itemtype.cropfield')">{{parentItem.name}}</h2>
|
||||||
<h1>{{item.name}}</h1>
|
<h1>{{item.name}}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
<ng-container *ngIf="item?.data.layers;let layers">
|
||||||
|
<div class="legend-container">
|
||||||
<div class="card menu-card">
|
<div class="card menu-card">
|
||||||
<h5><span i18n>Date</span>: {{temporalService.selectedDate(itemLayer)}}</h5>
|
<h5><span i18n>Date</span>: {{temporalService.selectedDate(itemLayer)}}</h5>
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
@@ -42,8 +43,10 @@
|
|||||||
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i> <span i18n>Remove overlay</span></a></li>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<li><a href="#" (click)="handleGoToChart(item)"><i class="fal fa-line-chart" aria-hidden="true" i18m-title title="Show chart"></i> <span i18n>Show chart</span></a></li>
|
<li><a href="#" (click)="handleGoToChart(item)"><i class="fal fa-line-chart" aria-hidden="true" i18m-title title="Show chart"></i> <span i18n>Show chart</span></a></li>
|
||||||
|
<li><a href="#" (click)="download($event,item,layers,itemLayer.layerIndex)"><i class="fal fa-download" aria-hidden="true" i18n-title title="Download"></i> <span i18n>Download</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,16 +1,15 @@
|
|||||||
import { Component, Injectable } from '@angular/core';
|
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { Store } from '@ngrx/store';
|
import { Component, Injectable, OnDestroy } from '@angular/core';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
|
||||||
import { commonReducers, ItemTypeService, IItem } from '@farmmaps/common';
|
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
import { commonReducers, IItem, IItemLinkType, ItemService, ItemTypeService, IUrlType } from '@farmmaps/common';
|
||||||
|
import { Store } from '@ngrx/store';
|
||||||
|
import { Subscription } from 'rxjs';
|
||||||
|
import * as mapActions from '../../actions/map.actions';
|
||||||
|
import { IItemLayer, ITemporalItemLayer } from '../../models/item.layer';
|
||||||
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
|
import { TemporalService } from '../../services/temporal.service';
|
||||||
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
|
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
|
||||||
import { ITemporalItemLayer} from '../../models/item.layer';
|
|
||||||
import * as mapActions from '../../actions/map.actions';
|
|
||||||
import { IItemLayer } from '../../models/item.layer';
|
|
||||||
import {TemporalService} from '../../services/temporal.service';
|
|
||||||
|
|
||||||
|
|
||||||
@ForItemType("vnd.farmmaps.itemtype.temporal")
|
@ForItemType("vnd.farmmaps.itemtype.temporal")
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@@ -19,10 +18,15 @@ import {TemporalService} from '../../services/temporal.service';
|
|||||||
templateUrl: './selected-item-temporal.component.html',
|
templateUrl: './selected-item-temporal.component.html',
|
||||||
styleUrls: ['./selected-item-temporal.component.scss']
|
styleUrls: ['./selected-item-temporal.component.scss']
|
||||||
})
|
})
|
||||||
export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent {
|
export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent implements OnDestroy {
|
||||||
|
sub: Subscription;
|
||||||
|
|
||||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router,public temporalService:TemporalService) {
|
constructor(store: Store<mapReducers.State | commonReducers.State>, public itemService: ItemService, itemTypeService: ItemTypeService, location: Location, router: Router,public temporalService:TemporalService) {
|
||||||
super(store, itemTypeService,location,router);
|
super(store, itemTypeService,itemService,location,router);
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
if (this.sub) this.sub.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
||||||
onLayerChanged(layerIndex: number) {
|
onLayerChanged(layerIndex: number) {
|
||||||
@@ -33,8 +37,6 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent
|
|||||||
return (this.itemLayer as ITemporalItemLayer)?.selectedItemLayer
|
return (this.itemLayer as ITemporalItemLayer)?.selectedItemLayer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
handleNextTemporal(event:MouseEvent) {
|
handleNextTemporal(event:MouseEvent) {
|
||||||
this.store.dispatch(new mapActions.NextTemporal());
|
this.store.dispatch(new mapActions.NextTemporal());
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
@@ -61,4 +63,13 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent
|
|||||||
this.router.navigate(['/viewer', 'temporal', 'item', item.parentCode, new Date(Date.parse(item.dataDate)).getUTCFullYear()]);
|
this.router.navigate(['/viewer', 'temporal', 'item', item.parentCode, new Date(Date.parse(item.dataDate)).getUTCFullYear()]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
download(event:MouseEvent,item:IItem,layers:any,layerIndex:number) {
|
||||||
|
event.stopPropagation();
|
||||||
|
event.preventDefault();
|
||||||
|
const itemLink : IItemLinkType = {itemcode:item.code,query:`layer=${this.layer(layers,layerIndex).name}`,pathsuffix:"download", validminutes:10}
|
||||||
|
this.sub = this.itemService.getItemLink(itemLink).subscribe((itemLinkUrl:IUrlType) => {
|
||||||
|
window.location.href = itemLinkUrl.url;
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,7 @@ import {Component, Injectable, Input, Directive} from '@angular/core';
|
|||||||
import {Location} from '@angular/common';
|
import {Location} from '@angular/common';
|
||||||
import {Store} from '@ngrx/store';
|
import {Store} from '@ngrx/store';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import {AppConfig, commonReducers, IItem, ItemTypeService} from '@farmmaps/common';
|
import {AppConfig, commonReducers, IItem, ItemService, ItemTypeService} from '@farmmaps/common';
|
||||||
import * as mapActions from '../../actions/map.actions';
|
import * as mapActions from '../../actions/map.actions';
|
||||||
import {Router} from '@angular/router';
|
import {Router} from '@angular/router';
|
||||||
import { IItemLayer } from '../../models/item.layer';
|
import { IItemLayer } from '../../models/item.layer';
|
||||||
@@ -15,7 +15,7 @@ export abstract class AbstractSelectedItemComponent {
|
|||||||
@Input() parentItem: IItem;
|
@Input() parentItem: IItem;
|
||||||
@Input() itemLayer: IItemLayer;
|
@Input() itemLayer: IItemLayer;
|
||||||
@Input() overlayLayers: Array<IItemLayer>;
|
@Input() overlayLayers: Array<IItemLayer>;
|
||||||
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService, private location: Location, public router: Router) {
|
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService, public itemService: ItemService, private location: Location, public router: Router) {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleOnView(item: IItem) {
|
handleOnView(item: IItem) {
|
||||||
@@ -37,6 +37,11 @@ export abstract class AbstractSelectedItemComponent {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleOnDelete(item: IItem) {
|
||||||
|
this.itemService.deleteItem(item.code);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
handleAddAsLayer(item: IItem,layerIndex = -1) {
|
handleAddAsLayer(item: IItem,layerIndex = -1) {
|
||||||
this.store.dispatch(new mapActions.AddLayer(item,layerIndex));
|
this.store.dispatch(new mapActions.AddLayer(item,layerIndex));
|
||||||
return false;
|
return false;
|
||||||
@@ -76,8 +81,8 @@ export abstract class AbstractSelectedItemComponent {
|
|||||||
})
|
})
|
||||||
export class SelectedItemComponent extends AbstractSelectedItemComponent {
|
export class SelectedItemComponent extends AbstractSelectedItemComponent {
|
||||||
|
|
||||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, public config:AppConfig) {
|
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, itemService: ItemService, location: Location, router: Router, public config:AppConfig) {
|
||||||
super(store, itemTypeService,location,router);
|
super(store, itemTypeService,itemService,location,router);
|
||||||
}
|
}
|
||||||
|
|
||||||
getThumbnailUrl(item:IItem):string {
|
getThumbnailUrl(item:IItem):string {
|
||||||
|
@@ -41,7 +41,7 @@ export const {
|
|||||||
selectRouteParam, // factory function to select a route param
|
selectRouteParam, // factory function to select a route param
|
||||||
selectRouteData, // select the current route data
|
selectRouteData, // select the current route data
|
||||||
selectUrl, // select the current url
|
selectUrl, // select the current url
|
||||||
} = fromRouter.getSelectors(getRouterState);
|
} = fromRouter.getRouterSelectors(getRouterState);
|
||||||
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@@ -133,7 +133,7 @@ export class MapEffects {
|
|||||||
f.id = f.properties["code"];
|
f.id = f.properties["code"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return of(new mapActions.StartSearchSuccess(this._geojsonFormat.readFeatures(features), a.queryState));
|
return of(new mapActions.StartSearchSuccess(this._geojsonFormat.readFeatures(features).filter(feature => feature instanceof Feature) as Feature[], a.queryState));
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
catchError(error => of(new commonActions.Fail(error))));
|
catchError(error => of(new commonActions.Fail(error))));
|
||||||
@@ -218,7 +218,7 @@ export class MapEffects {
|
|||||||
if (!this.overrideSelectedItemLayer) {
|
if (!this.overrideSelectedItemLayer) {
|
||||||
return this.itemService$.getFeature(action.item.code, "EPSG:3857").pipe(
|
return this.itemService$.getFeature(action.item.code, "EPSG:3857").pipe(
|
||||||
map((feature: any) => {
|
map((feature: any) => {
|
||||||
const f = this._geojsonFormat.readFeature(feature);
|
const f = this._geojsonFormat.readFeature(feature) as Feature;
|
||||||
f.setId(action.item.code);
|
f.setId(action.item.code);
|
||||||
return new mapActions.AddFeatureSuccess(f);
|
return new mapActions.AddFeatureSuccess(f);
|
||||||
}),
|
}),
|
||||||
|
@@ -49,6 +49,7 @@ export interface State {
|
|||||||
features: Array<Feature<Geometry>>,
|
features: Array<Feature<Geometry>>,
|
||||||
panelVisible: boolean,
|
panelVisible: boolean,
|
||||||
panelCollapsed: boolean,
|
panelCollapsed: boolean,
|
||||||
|
panelExtraWide: boolean,
|
||||||
selectedFeature: Feature<Geometry>,
|
selectedFeature: Feature<Geometry>,
|
||||||
selectedItem:IItem,
|
selectedItem:IItem,
|
||||||
parentItem:IItem,
|
parentItem:IItem,
|
||||||
@@ -94,6 +95,7 @@ export const initialState: State = {
|
|||||||
features: [],
|
features: [],
|
||||||
panelVisible: false,
|
panelVisible: false,
|
||||||
panelCollapsed: false,
|
panelCollapsed: false,
|
||||||
|
panelExtraWide: false,
|
||||||
selectedFeature: null,
|
selectedFeature: null,
|
||||||
selectedItem: null,
|
selectedItem: null,
|
||||||
parentItem: null,
|
parentItem: null,
|
||||||
@@ -572,6 +574,10 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
|
|||||||
}
|
}
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
case mapActions.SETPANELEXTRAWIDE:{
|
||||||
|
const a= action as mapActions.SetPanelExtraWide;
|
||||||
|
return tassign(state,{panelExtraWide:a.panelExtraWide});
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
@@ -583,6 +589,7 @@ export const getParentCode = (state: State) => state.parentCode;
|
|||||||
export const getFeatures = (state: State) => state.features;
|
export const getFeatures = (state: State) => state.features;
|
||||||
export const getPanelVisible = (state: State) => state.panelVisible;
|
export const getPanelVisible = (state: State) => state.panelVisible;
|
||||||
export const getPanelCollapsed = (state: State) => state.panelCollapsed;
|
export const getPanelCollapsed = (state: State) => state.panelCollapsed;
|
||||||
|
export const getPanelExtraWide = (state: State) => state.panelExtraWide;
|
||||||
export const getSelectedFeature = (state: State) => state.selectedFeature;
|
export const getSelectedFeature = (state: State) => state.selectedFeature;
|
||||||
export const getSelectedItem = (state: State) => state.selectedItem;
|
export const getSelectedItem = (state: State) => state.selectedItem;
|
||||||
export const getParentItem = (state: State) => state.parentItem;
|
export const getParentItem = (state: State) => state.parentItem;
|
||||||
@@ -618,6 +625,7 @@ export const selectGetParentCode = createSelector(selectMapState, getParentCode)
|
|||||||
export const selectGetFeatures = createSelector(selectMapState, getFeatures);
|
export const selectGetFeatures = createSelector(selectMapState, getFeatures);
|
||||||
export const selectGetPanelVisible = createSelector(selectMapState, getPanelVisible);
|
export const selectGetPanelVisible = createSelector(selectMapState, getPanelVisible);
|
||||||
export const selectGetPanelCollapsed = createSelector(selectMapState, getPanelCollapsed);
|
export const selectGetPanelCollapsed = createSelector(selectMapState, getPanelCollapsed);
|
||||||
|
export const selectGetPanelExtraWide = createSelector(selectMapState, getPanelExtraWide);
|
||||||
export const selectGetSelectedFeature = createSelector(selectMapState, getSelectedFeature);
|
export const selectGetSelectedFeature = createSelector(selectMapState, getSelectedFeature);
|
||||||
export const selectGetSelectedItem = createSelector(selectMapState, getSelectedItem);
|
export const selectGetSelectedItem = createSelector(selectMapState, getSelectedItem);
|
||||||
export const selectGetParentItem = createSelector(selectMapState, getParentItem);
|
export const selectGetParentItem = createSelector(selectMapState, getParentItem);
|
||||||
@@ -629,6 +637,8 @@ export const selectGetExtent = createSelector(selectMapState, getExtent);
|
|||||||
export const selectGetViewExtent = createSelector(selectMapState, getViewExtent);
|
export const selectGetViewExtent = createSelector(selectMapState, getViewExtent);
|
||||||
export const selectGetOverlayLayers = createSelector(selectMapState, getOverlayLayers);
|
export const selectGetOverlayLayers = createSelector(selectMapState, getOverlayLayers);
|
||||||
export const selectGetBaseLayers = createSelector(selectMapState, getBaseLayers);
|
export const selectGetBaseLayers = createSelector(selectMapState, getBaseLayers);
|
||||||
|
export const selectGetBaseMaps = createSelector(selectGetBaseLayers, (layers) => layers.filter(layer => layer.item.data.category === "baseMap"));
|
||||||
|
export const selectGetArealMaps = createSelector(selectGetBaseLayers, (layers) => layers.filter(layer => layer.item.data.category === "aerialPhoto").sort((a, b) => a.item.dataDate <= b.item.dataDate ? 1 : -1));
|
||||||
export const selectGetProjection = createSelector(selectMapState, getProjection);
|
export const selectGetProjection = createSelector(selectMapState, getProjection);
|
||||||
export const selectGetSelectedBaseLayer = createSelector(selectMapState, getSelectedBaseLayer);
|
export const selectGetSelectedBaseLayer = createSelector(selectMapState, getSelectedBaseLayer);
|
||||||
export const selectGetSelectedOverlayLayer = createSelector(selectMapState, getSelectedOverlayLayer);
|
export const selectGetSelectedOverlayLayer = createSelector(selectMapState, getSelectedOverlayLayer);
|
||||||
|
@@ -10,18 +10,27 @@
|
|||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
"types": [],
|
"types": [],
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"dom",
|
||||||
"es2018"
|
"es2018"
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"@angular/*": [
|
||||||
|
|
||||||
|
"node_modules/@angular/*"
|
||||||
|
|
||||||
]
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"skipTemplateCodegen": true,
|
"skipTemplateCodegen": true,
|
||||||
"strictMetadataEmit": true,
|
"strictMetadataEmit": true,
|
||||||
"fullTemplateTypeCheck": true,
|
"fullTemplateTypeCheck": true,
|
||||||
"strictInjectionParameters": true,
|
"strictInjectionParameters": true,
|
||||||
"enableResourceInlining": true
|
"enableResourceInlining": true,
|
||||||
|
"compilationMode": "partial"
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"src/test.ts",
|
"src/test.ts",
|
||||||
|
549
projects/common-map3d/package-lock.json
generated
549
projects/common-map3d/package-lock.json
generated
@@ -1,26 +1,565 @@
|
|||||||
{
|
{
|
||||||
"name": "@farmmaps/common-map3d",
|
"name": "@farmmaps/common-map3d",
|
||||||
"version": "2.1.0",
|
"version": "2.0.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@farmmaps/common-map3d",
|
"name": "@farmmaps/common-map3d",
|
||||||
"version": "2.1.0",
|
"version": "2.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/common": ">=16.0.0",
|
"@angular/common": "^18.2.3",
|
||||||
"@angular/core": ">=16.0.0",
|
"@angular/core": "^18.2.3",
|
||||||
"cesium": ">=1.82.1",
|
"cesium": "^1.97.0",
|
||||||
"ol-cesium": ">=2.13.0"
|
"ol-cesium": ">=2.13.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"../../dist/libs/ng-openlayers": {
|
||||||
|
"version": "18.0.0",
|
||||||
|
"extraneous": true,
|
||||||
|
"license": "MPL-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.3.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/common": "^18.2.3",
|
||||||
|
"@angular/core": "^18.2.3",
|
||||||
|
"ol": "^8.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dist/ng-openlayers": {
|
||||||
|
"extraneous": true
|
||||||
|
},
|
||||||
|
"node_modules/@angular/common": {
|
||||||
|
"version": "18.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@angular/common/-/common-18.2.3.tgz",
|
||||||
|
"integrity": "sha512-NFL4yXXImSCH7i1xnHykUjHa9vl9827fGiwSV2mnf7LjSUsyDzFD8/54dNuYN9OY8AUD+PnK0YdNro6cczVyIA==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.3.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/core": "18.2.3",
|
||||||
|
"rxjs": "^6.5.3 || ^7.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@angular/core": {
|
||||||
|
"version": "18.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@angular/core/-/core-18.2.3.tgz",
|
||||||
|
"integrity": "sha512-VGhMJxj7d0rYpqVfQrcGRB7EE/BCziotft/I/YPl6bOMPSAvMukG7DXQuJdYpNrr62ks78mlzHlZX/cdmB9Prw==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.3.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^18.19.1 || ^20.11.1 || >=22.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"rxjs": "^6.5.3 || ^7.4.0",
|
||||||
|
"zone.js": "~0.14.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@cesium/engine": {
|
||||||
|
"version": "11.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cesium/engine/-/engine-11.0.0.tgz",
|
||||||
|
"integrity": "sha512-0z3mJNNly407h3/bAvGoGnjA0ygprkVz32z9x1VNmPXf9AuybKu7Q4wRrChUhC/qsNj3L45kP6KqyDuHSe2bhw==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@tweenjs/tween.js": "^25.0.0",
|
||||||
|
"@zip.js/zip.js": "^2.7.34",
|
||||||
|
"autolinker": "^4.0.0",
|
||||||
|
"bitmap-sdf": "^1.0.3",
|
||||||
|
"dompurify": "^3.0.2",
|
||||||
|
"draco3d": "^1.5.1",
|
||||||
|
"earcut": "^3.0.0",
|
||||||
|
"grapheme-splitter": "^1.0.4",
|
||||||
|
"jsep": "^1.3.8",
|
||||||
|
"kdbush": "^4.0.1",
|
||||||
|
"ktx-parse": "^0.7.0",
|
||||||
|
"lerc": "^2.0.0",
|
||||||
|
"mersenne-twister": "^1.1.0",
|
||||||
|
"meshoptimizer": "^0.21.0",
|
||||||
|
"pako": "^2.0.4",
|
||||||
|
"protobufjs": "^7.1.0",
|
||||||
|
"rbush": "^4.0.0",
|
||||||
|
"topojson-client": "^3.1.0",
|
||||||
|
"urijs": "^1.19.7"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@cesium/widgets": {
|
||||||
|
"version": "8.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@cesium/widgets/-/widgets-8.0.0.tgz",
|
||||||
|
"integrity": "sha512-Rnid5BbLBZjwFdbr3lgOwK3fhql/BeEbf5l9ZZE+Zc7V8Fb6wgKM8QmrL+bbJ+BtuiELp+SkNxcF97Ktifxb4g==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@cesium/engine": "^11.0.0",
|
||||||
|
"nosleep.js": "^0.12.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@petamoriken/float16": {
|
||||||
|
"version": "3.8.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/@petamoriken/float16/-/float16-3.8.7.tgz",
|
||||||
|
"integrity": "sha512-/Ri4xDDpe12NT6Ex/DRgHzLlobiQXEW/hmG08w1wj/YU7hLemk97c+zHQFp0iZQ9r7YqgLEXZR2sls4HxBf9NA==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/aspromise": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/base64": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/codegen": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/eventemitter": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/fetch": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@protobufjs/aspromise": "^1.1.1",
|
||||||
|
"@protobufjs/inquire": "^1.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/float": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/inquire": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/path": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/pool": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@protobufjs/utf8": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@tweenjs/tween.js": {
|
||||||
|
"version": "25.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-25.0.0.tgz",
|
||||||
|
"integrity": "sha512-XKLA6syeBUaPzx4j3qwMqzzq+V4uo72BnlbOjmuljLrRqdsd3qnzvZZoxvMHZ23ndsRS4aufU6JOZYpCbU6T1A==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@types/node": {
|
||||||
|
"version": "22.5.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.4.tgz",
|
||||||
|
"integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"undici-types": "~6.19.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/rbush": {
|
||||||
|
"version": "3.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/rbush/-/rbush-3.0.4.tgz",
|
||||||
|
"integrity": "sha512-knSt9cCW8jj1ZSFcFeBZaX++OucmfPxxHiRwTahZfJlnQsek7O0bazTJHWD2RVj9LEoejUYF2de3/stf+QXcXw==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@zip.js/zip.js": {
|
||||||
|
"version": "2.7.52",
|
||||||
|
"resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.52.tgz",
|
||||||
|
"integrity": "sha512-+5g7FQswvrCHwYKNMd/KFxZSObctLSsQOgqBSi0LzwHo3li9Eh1w5cF5ndjQw9Zbr3ajVnd2+XyiX85gAetx1Q==",
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"bun": ">=0.7.0",
|
||||||
|
"deno": ">=1.0.0",
|
||||||
|
"node": ">=16.5.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/autolinker": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/autolinker/-/autolinker-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-fl5Kh6BmEEZx+IWBfEirnRUU5+cOiV0OK7PEt0RBKvJMJ8GaRseIOeDU3FKf4j3CE5HVefcjHmhYPOcaVt0bZw==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/bitmap-sdf": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/bitmap-sdf/-/bitmap-sdf-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-1G3U4n5JE6RAiALMxu0p1XmeZkTeCwGKykzsLTCqVzfSDaN6S7fKnkIkfejogz+iwqBWc0UYAIKnKHNN7pSfDg==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/cesium": {
|
||||||
|
"version": "1.121.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/cesium/-/cesium-1.121.1.tgz",
|
||||||
|
"integrity": "sha512-WpdaGFd8qCOHiE9khV0sWWjCMXAX1U9Aou8MzMC/F0Akp6YqcOk4HLk4LLhZKeOjO/Bh27iTIW2mxEZ5+dtCxg==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@cesium/engine": "^11.0.0",
|
||||||
|
"@cesium/widgets": "^8.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18.18.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/color-name": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-SbtvAMWvASO5TE2QP07jHBMXKafgdZz8Vrsrn96fiL+O92/FN/PLARzUW5sKt013fjAprK2d2iCn2hk2Xb5oow==",
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/color-parse": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-parse/-/color-parse-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-eCtOz5w5ttWIUcaKLiktF+DxZO1R9KLNY/xhbV6CkhM7sR3GhVghmt6X6yOnzeaM24po+Z9/S1apbXMwA3Iepw==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"color-name": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/color-rgba": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-rgba/-/color-rgba-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-PPwZYkEY3M2THEHHV6Y95sGUie77S7X8v+h1r6LSAPF3/LL2xJ8duUXSrkic31Nzc4odPwHgUbiX/XuTYzQHQg==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"color-parse": "^2.0.0",
|
||||||
|
"color-space": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/color-space": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/color-space/-/color-space-2.0.1.tgz",
|
||||||
|
"integrity": "sha512-nKqUYlo0vZATVOFHY810BSYjmCARrG7e5R3UE3CQlyjJTvv5kSSmPG1kzm/oDyyqjehM+lW1RnEt9It9GNa5JA==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/commander": {
|
||||||
|
"version": "2.20.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||||
|
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/dompurify": {
|
||||||
|
"version": "3.1.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.1.6.tgz",
|
||||||
|
"integrity": "sha512-cTOAhc36AalkjtBpfG6O8JimdTMWNXjiePT2xQH/ppBGi/4uIpmj8eKyIkMJErXWARyINV/sB38yf8JCLF5pbQ==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/draco3d": {
|
||||||
|
"version": "1.5.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/draco3d/-/draco3d-1.5.7.tgz",
|
||||||
|
"integrity": "sha512-m6WCKt/erDXcw+70IJXnG7M3awwQPAsZvJGX5zY7beBqpELw6RDGkYVU0W43AFxye4pDZ5i2Lbyc/NNGqwjUVQ==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/earcut": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/earcut/-/earcut-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-41Fs7Q/PLq1SDbqjsgcY7GA42T0jvaCNGXgGtsNdvg+Yv8eIu06bxv4/PoREkZ9nMDNwnUSG9OFB9+yv8eKhDg==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/geotiff": {
|
||||||
|
"version": "2.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/geotiff/-/geotiff-2.1.3.tgz",
|
||||||
|
"integrity": "sha512-PT6uoF5a1+kbC3tHmZSUsLHBp2QJlHasxxxxPW47QIY1VBKpFB+FcDvX+MxER6UzgLQZ0xDzJ9s48B9JbOCTqA==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@petamoriken/float16": "^3.4.7",
|
||||||
|
"lerc": "^3.0.0",
|
||||||
|
"pako": "^2.0.4",
|
||||||
|
"parse-headers": "^2.0.2",
|
||||||
|
"quick-lru": "^6.1.1",
|
||||||
|
"web-worker": "^1.2.0",
|
||||||
|
"xml-utils": "^1.0.2",
|
||||||
|
"zstddec": "^0.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.19"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/geotiff/node_modules/lerc": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/lerc/-/lerc-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-Rm4J/WaHhRa93nCN2mwWDZFoRVF18G1f47C+kvQWyHGEZxFpTUi73p7lMVSAndyxGt6lJ2/CFbOcf9ra5p8aww==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/grapheme-splitter": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/jsep": {
|
||||||
|
"version": "1.3.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/jsep/-/jsep-1.3.9.tgz",
|
||||||
|
"integrity": "sha512-i1rBX5N7VPl0eYb6+mHNp52sEuaS2Wi8CDYx1X5sn9naevL78+265XJqy1qENEk7mRKwS06NHpUqiBwR7qeodw==",
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10.16.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/kdbush": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/ktx-parse": {
|
||||||
|
"version": "0.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ktx-parse/-/ktx-parse-0.7.1.tgz",
|
||||||
|
"integrity": "sha512-FeA3g56ksdFNwjXJJsc1CCc7co+AJYDp6ipIp878zZ2bU8kWROatLYf39TQEd4/XRSUvBXovQ8gaVKWPXsCLEQ==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/lerc": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/lerc/-/lerc-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-7qo1Mq8ZNmaR4USHHm615nEW2lPeeWJ3bTyoqFbd35DLx0LUH7C6ptt5FDCTAlbIzs3+WKrk5SkJvw8AFDE2hg==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/long": {
|
||||||
|
"version": "5.2.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
|
||||||
|
"integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/mersenne-twister": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mersenne-twister/-/mersenne-twister-1.1.0.tgz",
|
||||||
|
"integrity": "sha512-mUYWsMKNrm4lfygPkL3OfGzOPTR2DBlTkBNHM//F6hGp8cLThY897crAlk3/Jo17LEOOjQUrNAx6DvgO77QJkA==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/meshoptimizer": {
|
||||||
|
"version": "0.21.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-0.21.0.tgz",
|
||||||
|
"integrity": "sha512-WabtlpnK/GgD0GMwYd1fBTfYHf4MIcQPEg6dt7y4GuDcY51RzLSkSNE8ZogD7U3Vs2/fIf4z89TOLpA80EOnhg==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/nosleep.js": {
|
||||||
|
"version": "0.12.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/nosleep.js/-/nosleep.js-0.12.0.tgz",
|
||||||
|
"integrity": "sha512-9d1HbpKLh3sdWlhXMhU6MMH+wQzKkrgfRkYV0EBdvt99YJfj0ilCJrWRDYG2130Tm4GXbEoTCx5b34JSaP+HhA==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/ol": {
|
||||||
|
"version": "10.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ol/-/ol-10.1.0.tgz",
|
||||||
|
"integrity": "sha512-/efepydpzhFoeczA9KAN5t7G0WpFhP46ZXEfSl6JbZ7ipQZ2axpkYB2qt0qcOUlPFYMt7/XQFApH652KB08tTg==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/rbush": "^3.0.3",
|
||||||
|
"color-rgba": "^3.0.0",
|
||||||
|
"color-space": "^2.0.1",
|
||||||
|
"earcut": "^3.0.0",
|
||||||
|
"geotiff": "^2.0.7",
|
||||||
|
"pbf": "4.0.1",
|
||||||
|
"rbush": "^4.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/openlayers"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/ol-cesium": {
|
||||||
|
"version": "2.17.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ol-cesium/-/ol-cesium-2.17.0.tgz",
|
||||||
|
"integrity": "sha512-XaMXjQYuq2eMPAgAx2e1wjN4I4QwfmPC+9YgU4xoMCj/MBj8oDQusyloQ4TaovypqbZg+0jJDDSZc7BhXckBwA==",
|
||||||
|
"peer": true,
|
||||||
|
"peerDependencies": {
|
||||||
|
"cesium": ">= 1.62.0",
|
||||||
|
"ol": ">= 6.0.1 || 7 || 8"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/pako": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/parse-headers": {
|
||||||
|
"version": "2.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.5.tgz",
|
||||||
|
"integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/pbf": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/pbf/-/pbf-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-SuLdBvS42z33m8ejRbInMapQe8n0D3vN/Xd5fmWM3tufNgRQFBpaW2YVJxQZV4iPNqb0vEFvssMEo5w9c6BTIA==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"resolve-protobuf-schema": "^2.1.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"pbf": "bin/pbf"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/protobufjs": {
|
||||||
|
"version": "7.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz",
|
||||||
|
"integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@protobufjs/aspromise": "^1.1.2",
|
||||||
|
"@protobufjs/base64": "^1.1.2",
|
||||||
|
"@protobufjs/codegen": "^2.0.4",
|
||||||
|
"@protobufjs/eventemitter": "^1.1.0",
|
||||||
|
"@protobufjs/fetch": "^1.1.0",
|
||||||
|
"@protobufjs/float": "^1.0.2",
|
||||||
|
"@protobufjs/inquire": "^1.1.0",
|
||||||
|
"@protobufjs/path": "^1.1.2",
|
||||||
|
"@protobufjs/pool": "^1.1.0",
|
||||||
|
"@protobufjs/utf8": "^1.1.0",
|
||||||
|
"@types/node": ">=13.7.0",
|
||||||
|
"long": "^5.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/protocol-buffers-schema": {
|
||||||
|
"version": "3.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz",
|
||||||
|
"integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/quick-lru": {
|
||||||
|
"version": "6.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-6.1.2.tgz",
|
||||||
|
"integrity": "sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==",
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/quickselect": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/quickselect/-/quickselect-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-XdjUArbK4Bm5fLLvlm5KpTFOiOThgfWWI4axAZDWg4E/0mKdZyI9tNEfds27qCi1ze/vwTR16kvmmGhRra3c2g==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/rbush": {
|
||||||
|
"version": "4.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/rbush/-/rbush-4.0.1.tgz",
|
||||||
|
"integrity": "sha512-IP0UpfeWQujYC8Jg162rMNc01Rf0gWMMAb2Uxus/Q0qOFw4lCcq6ZnQEZwUoJqWyUGJ9th7JjwI4yIWo+uvoAQ==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"quickselect": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/resolve-protobuf-schema": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"protocol-buffers-schema": "^3.3.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/rxjs": {
|
||||||
|
"version": "7.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
|
||||||
|
"integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/topojson-client": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/topojson-client/-/topojson-client-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==",
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"commander": "2"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"topo2geo": "bin/topo2geo",
|
||||||
|
"topomerge": "bin/topomerge",
|
||||||
|
"topoquantize": "bin/topoquantize"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/tslib": {
|
"node_modules/tslib": {
|
||||||
"version": "2.5.0",
|
"version": "2.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
|
||||||
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
|
"integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg=="
|
||||||
|
},
|
||||||
|
"node_modules/undici-types": {
|
||||||
|
"version": "6.19.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
|
||||||
|
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/urijs": {
|
||||||
|
"version": "1.19.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz",
|
||||||
|
"integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/web-worker": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-BSR9wyRsy/KOValMgd5kMyr3JzpdeoR9KVId8u5GVlTTAtNChlsE4yTxeY7zMdNSyOmoKBv8NH2qeRY9Tg+IaA==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/xml-utils": {
|
||||||
|
"version": "1.10.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/xml-utils/-/xml-utils-1.10.1.tgz",
|
||||||
|
"integrity": "sha512-Dn6vJ1Z9v1tepSjvnCpwk5QqwIPcEFKdgnjqfYOABv1ngSofuAhtlugcUC3ehS1OHdgDWSG6C5mvj+Qm15udTQ==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/zone.js": {
|
||||||
|
"version": "0.14.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.14.10.tgz",
|
||||||
|
"integrity": "sha512-YGAhaO7J5ywOXW6InXNlLmfU194F8lVgu7bRntUF3TiG8Y3nBK0x1UJJuHUP/e8IyihkjCYqhCScpSwnlaSRkQ==",
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/zstddec": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/zstddec/-/zstddec-0.1.0.tgz",
|
||||||
|
"integrity": "sha512-w2NTI8+3l3eeltKAdK8QpiLo/flRAr2p8AGeakfMZOXBxOg9HIu4LVDxBi81sYgVhFhdJjv1OrB5ssI8uFPoLg==",
|
||||||
|
"peer": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "@farmmaps/common-map3d",
|
"name": "@farmmaps/common-map3d",
|
||||||
"version": "2.1.0",
|
"version": "2.0.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
|
||||||
"@angular/common": ">=16.0.0",
|
|
||||||
"@angular/core": ">=16.0.0",
|
|
||||||
"cesium": ">=1.82.1",
|
|
||||||
"ol-cesium": ">=2.13.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/common": "18.2.3",
|
||||||
|
"@angular/core": "18.2.3",
|
||||||
|
"cesium": "^1.97.0",
|
||||||
|
"ol-cesium": ">=2.13.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,14 +1,15 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Switch2D3DComponent } from './components/olcs/switch2d3d/switch2d3d.component';
|
|
||||||
import { AppCommonModule } from '@farmmaps/common';
|
import { AppCommonModule } from '@farmmaps/common';
|
||||||
import { AppCommonMapModule } from '@farmmaps/common-map';
|
import { AppCommonMapModule } from '@farmmaps/common-map';
|
||||||
|
import { AngularOpenlayersModule } from '@farmmaps/ng-openlayers';
|
||||||
|
import { Switch2D3DComponent } from './components/olcs/switch2d3d/switch2d3d.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [Switch2D3DComponent],
|
declarations: [Switch2D3DComponent],
|
||||||
imports: [
|
imports: [
|
||||||
AppCommonModule,
|
AppCommonModule,
|
||||||
AppCommonMapModule
|
AppCommonMapModule,
|
||||||
|
AngularOpenlayersModule,
|
||||||
],
|
],
|
||||||
exports: [Switch2D3DComponent]
|
exports: [Switch2D3DComponent]
|
||||||
})
|
})
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user