Archived
Compare commits
383
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12312c0e8b | ||
|
|
d365b1d5b5 | ||
|
|
846eee1ae5 | ||
|
|
2588732b91 | ||
|
|
de0089fbe8 | ||
|
|
d4e7756176 | ||
|
|
72c34310df | ||
|
|
0c0d0989b2 | ||
|
|
a86ab9f3c7 | ||
|
|
a2264a28e0 | ||
|
|
a4c34fe21c | ||
|
|
9196358842 | ||
|
|
f4cbb1ff68 | ||
|
|
f008e97e39 | ||
|
|
61d2fc8d54 | ||
|
|
80760a8fdd | ||
|
|
a7f53a841b | ||
|
|
9d64fce22c | ||
|
|
e39c0b055d | ||
|
|
237fd27489 | ||
|
|
296385ab33 | ||
|
|
402bbcea0d | ||
|
|
161717bc7b | ||
|
|
0b8dbf4e2e | ||
|
|
2acf13cbac | ||
|
|
a408f4bffa | ||
|
|
ac5bd7d635 | ||
|
|
cf84f8c93d | ||
|
|
4872dee094 | ||
|
|
b76a933dba | ||
|
|
41c7ab15f3 | ||
|
|
a9185b86af | ||
|
|
eb1b8f18eb | ||
|
|
bce562fb8e | ||
|
|
2825ce4ccc | ||
|
|
5d83293540 | ||
|
|
b652555f37 | ||
|
|
3db09c1e2a | ||
|
|
0d40141b2d | ||
|
|
33e7a2310d | ||
|
|
ddb112b989 | ||
|
|
7502bc54d1 | ||
|
|
15cc2c33f1 | ||
|
|
eb0e928c6f | ||
|
|
5631d23355 | ||
|
|
0470cb0fa1 | ||
|
|
1656b465ee | ||
|
|
a558b23a98 | ||
|
|
c569076c5d | ||
|
|
be2516a3b8 | ||
|
|
7f62a74877 | ||
|
|
3b296a1fba | ||
|
|
28c9cd353d | ||
|
|
83a5c1a7d2 | ||
|
|
a767502d66 | ||
|
|
897ac3dab5 | ||
|
|
2f165b4b48 | ||
|
|
3994818b6a | ||
|
|
7b2dbc1777 | ||
|
|
8c59976de6 | ||
|
|
d551a2cf7a | ||
|
|
a3a09507a6 | ||
|
|
9bbde64147 | ||
|
|
0c4259d72e | ||
|
|
57e0a37c78 | ||
|
|
713af307cd | ||
|
|
521b882798 | ||
|
|
b850f5d621 | ||
|
|
d8730e77ad | ||
|
|
e62c185f35 | ||
|
|
f81b16b966 | ||
|
|
b9ee39399c | ||
|
|
be9b01dbab | ||
|
|
feacfd8bb3 | ||
|
|
2f0362e730 | ||
|
|
f4ba89920c | ||
|
|
f5b312a888 | ||
|
|
97142bc986 | ||
|
|
67335a0a4a | ||
|
|
b752b377da | ||
|
|
74c77bae5e | ||
|
|
b22278a75f | ||
|
|
37854d43fc | ||
|
|
2161951cbb | ||
|
|
66e492d2f8 | ||
|
|
e944064053 | ||
|
|
a1a4fc14ab | ||
|
|
122563a0bd | ||
|
|
33f322424e | ||
|
|
519b81d1fd | ||
|
|
b7c80dfdd8 | ||
|
|
77d2433d63 | ||
|
|
9bc78dc302 | ||
|
|
ac0fe962a0 | ||
|
|
d89670f669 | ||
|
|
d025e2e3f6 | ||
|
|
c22cede59b | ||
|
|
48574dc0b0 | ||
|
|
57407d83d3 | ||
|
|
f83549b5af | ||
|
|
132556da81 | ||
|
|
c2350eec52 | ||
|
|
aa1ad9f844 | ||
|
|
c6d14e6c9c | ||
|
|
8e4364bd08 | ||
|
|
af3340ed70 | ||
|
|
cc4726e85c | ||
|
|
ff19d830a7 | ||
|
|
29914cfb1b | ||
|
|
7bca0a57c4 | ||
|
|
fdba357e9c | ||
|
|
e28564c88a | ||
|
|
90c3fa25a4 | ||
|
|
3b8b812c55 | ||
|
|
025889b390 | ||
|
|
eabaa1db19 | ||
|
|
ba541c4e08 | ||
|
|
b994bc51cd | ||
|
|
960275dd38 | ||
|
|
5b7fef689a | ||
|
|
1c1315a580 | ||
|
|
5d21d66589 | ||
|
|
160eb10aba | ||
|
|
4ef077f8d7 | ||
|
|
df84a7c217 | ||
|
|
b5d00f5619 | ||
|
|
89a0fb13a5 | ||
|
|
2861ba220e | ||
|
|
45e0d5e836 | ||
|
|
312611cdc1 | ||
|
|
54b8a3bf24 | ||
|
|
4c1d4137ea | ||
|
|
a454f2306d | ||
|
|
52a72b042c | ||
|
|
c0c9864b07 | ||
|
|
e0f36b043f | ||
|
|
b52bfd4f57 | ||
|
|
6ff3c0ec96 | ||
|
|
eb1157d608 | ||
|
|
1daa8e257f | ||
|
|
5db24cc63d | ||
|
|
ff018d9db1 | ||
|
|
8c49965df8 | ||
|
|
f880623337 | ||
|
|
2da4f88683 | ||
|
|
bd125b6f72 | ||
|
|
610408d17c | ||
|
|
52e3117771 | ||
|
|
1b000c6112 | ||
|
|
28e75d5a0d | ||
|
|
76c431b9c2 | ||
|
|
122c49d516 | ||
|
|
5c549c5851 | ||
|
|
3fcf80c1a0 | ||
|
|
519e5c9032 | ||
|
|
9c19595597 | ||
|
|
ea1b22ed41 | ||
|
|
8d3c098f4e | ||
|
|
22209cfaf6 | ||
|
|
8b45e431a7 | ||
|
|
74c792b96a | ||
|
|
d833f321d1 | ||
|
|
0d9789d8c6 | ||
|
|
93513f9dc7 | ||
|
|
e465142be0 | ||
|
|
92173c9847 | ||
|
|
05292f1e5d | ||
|
|
e672e28795 | ||
|
|
4b7b639046 | ||
|
|
34b067fd28 | ||
|
|
fb9a046ff8 | ||
|
|
c4934d799d | ||
|
|
469bc6f1c1 | ||
|
|
d140d4bd4c | ||
|
|
1ce259a152 | ||
|
|
00ae86ecf2 | ||
|
|
880eb26a99 | ||
|
|
bcfa13de60 | ||
|
|
6f77df0f61 | ||
|
|
fbe0413c6a | ||
|
|
115f53e93c | ||
|
|
ca40ca0927 | ||
|
|
29968a736c | ||
|
|
077afcb0d7 | ||
|
|
6e79afd115 | ||
|
|
4f9cdf1588 | ||
|
|
fa69dee550 | ||
|
|
06e353ee94 | ||
|
|
8d723477d3 | ||
|
|
771e388f0e | ||
|
|
040b5b8c4d | ||
|
|
3504990708 | ||
|
|
798ec8d1ca | ||
|
|
8f5dd0969c | ||
|
|
861a8a48fc | ||
|
|
86a545d7e6 | ||
|
|
8a1c4b5e20 | ||
|
|
b24e47e39b | ||
|
|
c0d8e6d615 | ||
|
|
7192f66420 | ||
|
|
dcc24aa149 | ||
|
|
0485c163ad | ||
|
|
1380d7169a | ||
|
|
a6d3b208b0 | ||
|
|
cbf805e1ff | ||
|
|
8907dca091 | ||
|
|
fe1fddd211 | ||
|
|
fa146f2c6e | ||
|
|
c9fac05aa6 | ||
|
|
75d8909997 | ||
|
|
36d9c98e47 | ||
|
|
e2255164fc | ||
|
|
4c5b77000f | ||
|
|
997ebb24a7 | ||
|
|
00346a963e | ||
|
|
a42059627a | ||
|
|
5b710ce200 | ||
|
|
f8a0e1e167 | ||
|
|
eb46b3496a | ||
|
|
e8bbb74185 | ||
|
|
3d8ce7ee74 | ||
|
|
aa308abbb0 | ||
|
|
9d5cd0fa88 | ||
|
|
5760c2b8ea | ||
|
|
1e6c9e9363 | ||
|
|
8f06a56e52 | ||
|
|
2f74f43c8e | ||
|
|
c093ffae50 | ||
|
|
c7da0866ef | ||
|
|
b000d5119a | ||
|
|
2dd10f04a3 | ||
|
|
4d62184e5b | ||
|
|
8ad9d56b07 | ||
|
|
2b1cb1ac8f | ||
|
|
08163f86bf | ||
|
|
33adb35923 | ||
|
|
855bd8fe2d | ||
|
|
fad257c6e2 | ||
|
|
e262f7c65d | ||
|
|
cabdeaa875 | ||
|
|
2f1c5210ea | ||
|
|
47f3238edd | ||
|
|
01488ae2e0 | ||
|
|
ae02dd0b53 | ||
|
|
7768387f58 | ||
|
|
3c0f220ee3 | ||
|
|
38e64a0713 | ||
|
|
0bb5406773 | ||
|
|
7c125f1771 | ||
|
|
3673e0b349 | ||
|
|
ece6096064 | ||
|
|
dd71b49502 | ||
|
|
a098f72b1a | ||
|
|
535f6bd064 | ||
|
|
74e7f41583 | ||
|
|
b537239c96 | ||
|
|
f9ba4fd5e2 | ||
|
|
8326255ce9 | ||
|
|
3d60d0127b | ||
|
|
697708710e | ||
|
|
102d96ded9 | ||
|
|
f802f41bbb | ||
|
|
d134240b8b | ||
|
|
3242058c4f | ||
|
|
3f6863845b | ||
|
|
231fbf9ee8 | ||
|
|
142a1c9e58 | ||
|
|
39993e75da | ||
|
|
b7b168dffb | ||
|
|
fb9c11fce6 | ||
|
|
da562ca96d | ||
|
|
33d03c3d58 | ||
|
|
335078a10c | ||
|
|
bb71c043a1 | ||
|
|
cb222770d8 | ||
|
|
f26ececb9b | ||
|
|
2d285eaba0 | ||
|
|
d9a42ca75a | ||
|
|
0c44beabe0 | ||
|
|
dd97c89254 | ||
|
|
45de27f666 | ||
|
|
5b0632ebf1 | ||
|
|
8389943d1a | ||
|
|
2606de5f0a | ||
|
|
208dfed7fb | ||
|
|
eb50218a8d | ||
|
|
516d63a59e | ||
|
|
321d34870e | ||
|
|
dbc330ab46 | ||
|
|
154bcba620 | ||
|
|
2f5ffde4d9 | ||
|
|
69e153abd7 | ||
|
|
669c724e3a | ||
|
|
a7402438a0 | ||
|
|
dda82c8b09 | ||
|
|
3e14157e87 | ||
|
|
1e84874695 | ||
|
|
9245003dd9 | ||
|
|
8d061210dc | ||
|
|
8a40335cf2 | ||
|
|
ce9c72016d | ||
|
|
a082967c69 | ||
|
|
a2e7439776 | ||
|
|
e858ac778c | ||
|
|
290d5d1d26 | ||
|
|
e75afdc01d | ||
|
|
8f54e095fe | ||
|
|
431cc78c19 | ||
|
|
878944b056 | ||
|
|
d2b8de17d1 | ||
|
|
ac352473a0 | ||
|
|
8655307858 | ||
|
|
17a947ce20 | ||
|
|
fe356441d0 | ||
|
|
b17bce1cd2 | ||
|
|
bb555eec74 | ||
|
|
d3c28847ec | ||
|
|
e2499d0403 | ||
|
|
8f364c4990 | ||
|
|
46f4ac06f4 | ||
|
|
b5d42d855e | ||
|
|
b14b01b358 | ||
|
|
08acba9a88 | ||
|
|
b30c29a5f1 | ||
|
|
2f4e14ca1f | ||
|
|
bfcdcce9ef | ||
|
|
9e3e7d5d47 | ||
|
|
2949e39fcd | ||
|
|
9376c236aa | ||
|
|
a1079eb21f | ||
|
|
c266ce7d42 | ||
|
|
428e3b002d | ||
|
|
65366ff09b | ||
|
|
0f1ce45b2f | ||
|
|
1ade8025ab | ||
|
|
ac8815e8f1 | ||
|
|
41b1295f9e | ||
|
|
ed5a74ed07 | ||
|
|
a08eed7c67 | ||
|
|
cc421742df | ||
|
|
9a38630d01 | ||
|
|
978360fad0 | ||
|
|
30dab68468 | ||
|
|
80fec7ccaa | ||
|
|
1a1cd7a81c | ||
|
|
a782d8ebe9 | ||
|
|
a0816afaea | ||
|
|
6746047fe2 | ||
|
|
7266c98a10 | ||
|
|
e873f5af5b | ||
|
|
44f476d5fd | ||
|
|
200f3e95eb | ||
|
|
1a8bc43c60 | ||
|
|
6dccaa8ce5 | ||
|
|
f2cb5d4d64 | ||
|
|
6252cc120b | ||
|
|
03284d26dd | ||
|
|
946cbc6533 | ||
|
|
6277236993 | ||
|
|
20bda6b81f | ||
|
|
9a338c04e6 | ||
|
|
65c1643c95 | ||
|
|
9cbc9f1293 | ||
|
|
34b75a4c18 | ||
|
|
1991e79ed2 | ||
|
|
d661e5f3f9 | ||
|
|
0a384a9196 | ||
|
|
0e13b98b7f | ||
|
|
56a7544c1e | ||
|
|
61636b6e3d | ||
|
|
ab835e904e | ||
|
|
cd10165510 | ||
|
|
446d26607c | ||
|
|
8d204ce1cd | ||
|
|
2656a67fca | ||
|
|
46c5f74b49 | ||
|
|
a5ece9b453 | ||
|
|
9fb5a9698c | ||
|
|
fad2f19ae4 | ||
|
|
2ad04fc7c1 | ||
|
|
f656ecd23f | ||
|
|
d42aad87bd | ||
|
|
415ee8ef30 |
@@ -33,6 +33,7 @@ speed-measure-plugin.json
|
|||||||
.history/*
|
.history/*
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
|
/.angular/cache
|
||||||
/.sass-cache
|
/.sass-cache
|
||||||
/connect.lock
|
/connect.lock
|
||||||
/coverage
|
/coverage
|
||||||
@@ -47,3 +48,4 @@ testem.log
|
|||||||
Thumbs.db
|
Thumbs.db
|
||||||
projects/common/node_modules/
|
projects/common/node_modules/
|
||||||
projects/common-map/node_modules/
|
projects/common-map/node_modules/
|
||||||
|
.angular/*
|
||||||
|
|||||||
Vendored
+54
@@ -0,0 +1,54 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
environment {
|
||||||
|
PACKAGE_VERSION_PREFIX=sh(script: 'jq .version package.json |sed "s/\\"//g"', returnStdout: true).trim()
|
||||||
|
PACKAGE_VERSION="${PACKAGE_VERSION_PREFIX}"
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('npm install'){
|
||||||
|
steps {
|
||||||
|
sh '''rm -rf node_modules/
|
||||||
|
npm install --legacy-peer-deps
|
||||||
|
cd projects/common
|
||||||
|
npm install --legacy-peer-deps
|
||||||
|
cd ../common-map
|
||||||
|
npm install --legacy-peer-deps
|
||||||
|
cd ../common-map3d
|
||||||
|
npm install --legacy-peer-deps
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('build'){
|
||||||
|
steps {
|
||||||
|
sh '''ng build common --configuration production
|
||||||
|
ng build common-map --configuration production
|
||||||
|
ng build common-map3d --configuration production'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('npm publish'){
|
||||||
|
steps {
|
||||||
|
sh '''cd dist/common
|
||||||
|
npm version ${PACKAGE_VERSION} --allow-same-version
|
||||||
|
npm publish
|
||||||
|
cd ../common-map
|
||||||
|
npm version ${PACKAGE_VERSION} --allow-same-version
|
||||||
|
npm publish
|
||||||
|
cd ../common-map3d
|
||||||
|
npm version ${PACKAGE_VERSION} --allow-same-version
|
||||||
|
npm publish'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
emailext (
|
||||||
|
body: '${DEFAULT_CONTENT}',
|
||||||
|
mimeType: 'text/html',
|
||||||
|
replyTo: '${DEFAULT_REPLYTO}',
|
||||||
|
subject: '${DEFAULT_SUBJECT}',
|
||||||
|
to: emailextrecipients([[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']])
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
-7
@@ -8,21 +8,21 @@ pipeline {
|
|||||||
stage('npm install'){
|
stage('npm install'){
|
||||||
steps {
|
steps {
|
||||||
sh '''rm -rf node_modules/
|
sh '''rm -rf node_modules/
|
||||||
npm install
|
npm install --legacy-peer-deps
|
||||||
cd projects/common
|
cd projects/common
|
||||||
npm install
|
npm install --legacy-peer-deps
|
||||||
cd ../common-map
|
cd ../common-map
|
||||||
npm install
|
npm install --legacy-peer-deps
|
||||||
cd ../common-map3d
|
cd ../common-map3d
|
||||||
npm install
|
npm install --legacy-peer-deps
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('build'){
|
stage('build'){
|
||||||
steps {
|
steps {
|
||||||
sh '''ng build common
|
sh '''ng build common --configuration production
|
||||||
ng build common-map
|
ng build common-map --configuration production
|
||||||
ng build common-map3d'''
|
ng build common-map3d --configuration production'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('npm publish'){
|
stage('npm publish'){
|
||||||
|
|||||||
+36
-62
@@ -48,7 +48,7 @@
|
|||||||
"styles": [
|
"styles": [
|
||||||
"src/styles.css",
|
"src/styles.css",
|
||||||
"node_modules/bootstrap/dist/css/bootstrap.min.css",
|
"node_modules/bootstrap/dist/css/bootstrap.min.css",
|
||||||
"node_modules/font-awesome/css/font-awesome.min.css",
|
"fontawesome-6.2.1/css/all.min.css",
|
||||||
"fonts/FMIconFont/style.css",
|
"fonts/FMIconFont/style.css",
|
||||||
"node_modules/cesium/Build/Cesium/Widgets/widgets.css",
|
"node_modules/cesium/Build/Cesium/Widgets/widgets.css",
|
||||||
"node_modules/ol/ol.css"
|
"node_modules/ol/ol.css"
|
||||||
@@ -83,6 +83,31 @@
|
|||||||
"maximumWarning": "6kb"
|
"maximumWarning": "6kb"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"development": {
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "src/environments/environment.ts",
|
||||||
|
"with": "src/environments/environment.prod.ts"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"optimization": false,
|
||||||
|
"sourceMap": true,
|
||||||
|
"namedChunks": true,
|
||||||
|
"extractLicenses": false,
|
||||||
|
"vendorChunk": false,
|
||||||
|
"buildOptimizer": false,
|
||||||
|
"budgets": [
|
||||||
|
{
|
||||||
|
"type": "initial",
|
||||||
|
"maximumWarning": "2mb",
|
||||||
|
"maximumError": "7mb"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "anyComponentStyle",
|
||||||
|
"maximumWarning": "6kb"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -94,8 +119,12 @@
|
|||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"browserTarget": "farmmaps-lib-app:build:production"
|
"browserTarget": "farmmaps-lib-app:build:production"
|
||||||
|
},
|
||||||
|
"development": {
|
||||||
|
"browserTarget": "farmmaps-lib-app:build:development"
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"defaultConfiguration": "development"
|
||||||
},
|
},
|
||||||
"extract-i18n": {
|
"extract-i18n": {
|
||||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||||
@@ -119,18 +148,6 @@
|
|||||||
"src/assets"
|
"src/assets"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"builder": "@angular-devkit/build-angular:tslint",
|
|
||||||
"options": {
|
|
||||||
"tsConfig": [
|
|
||||||
"src/tsconfig.app.json",
|
|
||||||
"src/tsconfig.spec.json"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"**/node_modules/**"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -150,15 +167,6 @@
|
|||||||
"devServerTarget": "farmmaps-lib-app:serve:production"
|
"devServerTarget": "farmmaps-lib-app:serve:production"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"builder": "@angular-devkit/build-angular:tslint",
|
|
||||||
"options": {
|
|
||||||
"tsConfig": "e2e/tsconfig.e2e.json",
|
|
||||||
"exclude": [
|
|
||||||
"**/node_modules/**"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -169,7 +177,7 @@
|
|||||||
"prefix": "fm",
|
"prefix": "fm",
|
||||||
"architect": {
|
"architect": {
|
||||||
"build": {
|
"build": {
|
||||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
"builder": "@angular-devkit/build-angular:ng-packagr",
|
||||||
"options": {
|
"options": {
|
||||||
"tsConfig": "projects/common/tsconfig.lib.json",
|
"tsConfig": "projects/common/tsconfig.lib.json",
|
||||||
"project": "projects/common/ng-package.json"
|
"project": "projects/common/ng-package.json"
|
||||||
@@ -187,18 +195,6 @@
|
|||||||
"tsConfig": "projects/common/tsconfig.spec.json",
|
"tsConfig": "projects/common/tsconfig.spec.json",
|
||||||
"karmaConfig": "projects/common/karma.conf.js"
|
"karmaConfig": "projects/common/karma.conf.js"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"builder": "@angular-devkit/build-angular:tslint",
|
|
||||||
"options": {
|
|
||||||
"tsConfig": [
|
|
||||||
"projects/common/tsconfig.lib.json",
|
|
||||||
"projects/common/tsconfig.spec.json"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"**/node_modules/**"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -209,7 +205,7 @@
|
|||||||
"prefix": "fm-map",
|
"prefix": "fm-map",
|
||||||
"architect": {
|
"architect": {
|
||||||
"build": {
|
"build": {
|
||||||
"builder": "@angular-devkit/build-ng-packagr:build",
|
"builder": "@angular-devkit/build-angular:ng-packagr",
|
||||||
"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"
|
||||||
@@ -227,18 +223,6 @@
|
|||||||
"tsConfig": "projects/common-map/tsconfig.spec.json",
|
"tsConfig": "projects/common-map/tsconfig.spec.json",
|
||||||
"karmaConfig": "projects/common-map/karma.conf.js"
|
"karmaConfig": "projects/common-map/karma.conf.js"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"builder": "@angular-devkit/build-angular:tslint",
|
|
||||||
"options": {
|
|
||||||
"tsConfig": [
|
|
||||||
"projects/common-map/tsconfig.lib.json",
|
|
||||||
"projects/common-map/tsconfig.spec.json"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"**/node_modules/**"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -267,21 +251,11 @@
|
|||||||
"tsConfig": "projects/common-map3d/tsconfig.spec.json",
|
"tsConfig": "projects/common-map3d/tsconfig.spec.json",
|
||||||
"karmaConfig": "projects/common-map3d/karma.conf.js"
|
"karmaConfig": "projects/common-map3d/karma.conf.js"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"lint": {
|
|
||||||
"builder": "@angular-devkit/build-angular:tslint",
|
|
||||||
"options": {
|
|
||||||
"tsConfig": [
|
|
||||||
"projects/common-map3d/tsconfig.lib.json",
|
|
||||||
"projects/common-map3d/tsconfig.spec.json"
|
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"**/node_modules/**"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultProject": "farmmaps-lib-app"
|
"cli": {
|
||||||
|
"analytics": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,16 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
node: {
|
resolve: {
|
||||||
|
fallback: {
|
||||||
// Resolve node module use of fs
|
// Resolve node module use of fs
|
||||||
fs: "empty",
|
fs: "empty",
|
||||||
Buffer: false,
|
Buffer: false,
|
||||||
http: "empty",
|
http: require.resolve("stream-http"),
|
||||||
https: "empty",
|
https: require.resolve("https-browserify"),
|
||||||
zlib: "empty"
|
url: require.resolve("url/"),
|
||||||
|
zlib: require.resolve('browserify-zlib'),
|
||||||
|
assert: require.resolve("assert/"),
|
||||||
|
util: require.resolve("util/"),
|
||||||
|
buffer: require.resolve("buffer/")
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
Font Awesome Pro License
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Font Awesome Pro is commercial software that requires a paid license. Full
|
||||||
|
Font Awesome Pro license: https://fontawesome.com/license.
|
||||||
|
|
||||||
|
# Commercial License
|
||||||
|
The Font Awesome Pro commercial license allows you to pay for FA Pro once, own
|
||||||
|
it, and use it just about everywhere you'd like.
|
||||||
|
|
||||||
|
# Attribution
|
||||||
|
Attribution is not required by the Font Awesome Pro commercial license.
|
||||||
|
|
||||||
|
# Brand Icons
|
||||||
|
All brand icons are trademarks of their respective owners. The use of these
|
||||||
|
trademarks does not indicate endorsement of the trademark holder by Font
|
||||||
|
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
|
||||||
|
to represent the company, product, or service to which they refer.**
|
||||||
File diff suppressed because it is too large
Load Diff
Vendored
+6
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Vendored
+6
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
+6
File diff suppressed because one or more lines are too long
+12940
File diff suppressed because it is too large
Load Diff
+6
File diff suppressed because one or more lines are too long
@@ -0,0 +1,19 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:root, :host {
|
||||||
|
--fa-style-family-classic: 'Font Awesome 6 Pro';
|
||||||
|
--fa-font-light: normal 300 1em/1 'Font Awesome 6 Pro'; }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Font Awesome 6 Pro';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 300;
|
||||||
|
font-display: block;
|
||||||
|
src: url("../webfonts/fa-light-300.woff2") format("woff2"), url("../webfonts/fa-light-300.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
.fal,
|
||||||
|
.fa-light {
|
||||||
|
font-weight: 300; }
|
||||||
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:host,:root{--fa-style-family-classic:"Font Awesome 6 Pro";--fa-font-light:normal 300 1em/1 "Font Awesome 6 Pro"}@font-face{font-family:"Font Awesome 6 Pro";font-style:normal;font-weight:300;font-display:block;src:url(../webfonts/fa-light-300.woff2) format("woff2"),url(../webfonts/fa-light-300.ttf) format("truetype")}.fa-light,.fal{font-weight:300}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:root, :host {
|
||||||
|
--fa-style-family-classic: 'Font Awesome 6 Pro';
|
||||||
|
--fa-font-regular: normal 400 1em/1 'Font Awesome 6 Pro'; }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Font Awesome 6 Pro';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
font-display: block;
|
||||||
|
src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
.far,
|
||||||
|
.fa-regular {
|
||||||
|
font-weight: 400; }
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:host,:root{--fa-style-family-classic:"Font Awesome 6 Pro";--fa-font-regular:normal 400 1em/1 "Font Awesome 6 Pro"}@font-face{font-family:"Font Awesome 6 Pro";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.ttf) format("truetype")}.fa-regular,.far{font-weight:400}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:root, :host {
|
||||||
|
--fa-style-family-sharp: 'Font Awesome 6 Sharp';
|
||||||
|
--fa-font-sharp-solid: normal 900 1em/1 'Font Awesome 6 Sharp'; }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Font Awesome 6 Sharp';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 900;
|
||||||
|
font-display: block;
|
||||||
|
src: url("../webfonts/fa-sharp-solid-900.woff2") format("woff2"), url("../webfonts/fa-sharp-solid-900.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
.fass,
|
||||||
|
.fa-sharp-solid {
|
||||||
|
font-weight: 900; }
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:host,:root{--fa-style-family-sharp:"Font Awesome 6 Sharp";--fa-font-sharp-solid:normal 900 1em/1 "Font Awesome 6 Sharp"}@font-face{font-family:"Font Awesome 6 Sharp";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-sharp-solid-900.woff2) format("woff2"),url(../webfonts/fa-sharp-solid-900.ttf) format("truetype")}.fa-sharp-solid,.fass{font-weight:900}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:root, :host {
|
||||||
|
--fa-style-family-classic: 'Font Awesome 6 Pro';
|
||||||
|
--fa-font-solid: normal 900 1em/1 'Font Awesome 6 Pro'; }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Font Awesome 6 Pro';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 900;
|
||||||
|
font-display: block;
|
||||||
|
src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
.fas,
|
||||||
|
.fa-solid {
|
||||||
|
font-weight: 900; }
|
||||||
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:host,:root{--fa-style-family-classic:"Font Awesome 6 Pro";--fa-font-solid:normal 900 1em/1 "Font Awesome 6 Pro"}@font-face{font-family:"Font Awesome 6 Pro";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.ttf) format("truetype")}.fa-solid,.fas{font-weight:900}
|
||||||
@@ -0,0 +1,635 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:root, :host {
|
||||||
|
--fa-font-solid: normal 900 1em/1 'Font Awesome 6 Solid';
|
||||||
|
--fa-font-regular: normal 400 1em/1 'Font Awesome 6 Regular';
|
||||||
|
--fa-font-light: normal 300 1em/1 'Font Awesome 6 Light';
|
||||||
|
--fa-font-thin: normal 100 1em/1 'Font Awesome 6 Thin';
|
||||||
|
--fa-font-duotone: normal 900 1em/1 'Font Awesome 6 Duotone';
|
||||||
|
--fa-font-sharp-solid: normal 900 1em/1 'Font Awesome 6 Sharp';
|
||||||
|
--fa-font-brands: normal 400 1em/1 'Font Awesome 6 Brands'; }
|
||||||
|
|
||||||
|
svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
||||||
|
overflow: visible;
|
||||||
|
box-sizing: content-box; }
|
||||||
|
|
||||||
|
.svg-inline--fa {
|
||||||
|
display: var(--fa-display, inline-block);
|
||||||
|
height: 1em;
|
||||||
|
overflow: visible;
|
||||||
|
vertical-align: -.125em; }
|
||||||
|
.svg-inline--fa.fa-2xs {
|
||||||
|
vertical-align: 0.1em; }
|
||||||
|
.svg-inline--fa.fa-xs {
|
||||||
|
vertical-align: 0em; }
|
||||||
|
.svg-inline--fa.fa-sm {
|
||||||
|
vertical-align: -0.07143em; }
|
||||||
|
.svg-inline--fa.fa-lg {
|
||||||
|
vertical-align: -0.2em; }
|
||||||
|
.svg-inline--fa.fa-xl {
|
||||||
|
vertical-align: -0.25em; }
|
||||||
|
.svg-inline--fa.fa-2xl {
|
||||||
|
vertical-align: -0.3125em; }
|
||||||
|
.svg-inline--fa.fa-pull-left {
|
||||||
|
margin-right: var(--fa-pull-margin, 0.3em);
|
||||||
|
width: auto; }
|
||||||
|
.svg-inline--fa.fa-pull-right {
|
||||||
|
margin-left: var(--fa-pull-margin, 0.3em);
|
||||||
|
width: auto; }
|
||||||
|
.svg-inline--fa.fa-li {
|
||||||
|
width: var(--fa-li-width, 2em);
|
||||||
|
top: 0.25em; }
|
||||||
|
.svg-inline--fa.fa-fw {
|
||||||
|
width: var(--fa-fw-width, 1.25em); }
|
||||||
|
|
||||||
|
.fa-layers svg.svg-inline--fa {
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
margin: auto;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0; }
|
||||||
|
|
||||||
|
.fa-layers-text, .fa-layers-counter {
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
text-align: center; }
|
||||||
|
|
||||||
|
.fa-layers {
|
||||||
|
display: inline-block;
|
||||||
|
height: 1em;
|
||||||
|
position: relative;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: -.125em;
|
||||||
|
width: 1em; }
|
||||||
|
.fa-layers svg.svg-inline--fa {
|
||||||
|
-webkit-transform-origin: center center;
|
||||||
|
transform-origin: center center; }
|
||||||
|
|
||||||
|
.fa-layers-text {
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
-webkit-transform: translate(-50%, -50%);
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
-webkit-transform-origin: center center;
|
||||||
|
transform-origin: center center; }
|
||||||
|
|
||||||
|
.fa-layers-counter {
|
||||||
|
background-color: var(--fa-counter-background-color, #ff253a);
|
||||||
|
border-radius: var(--fa-counter-border-radius, 1em);
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: var(--fa-inverse, #fff);
|
||||||
|
line-height: var(--fa-counter-line-height, 1);
|
||||||
|
max-width: var(--fa-counter-max-width, 5em);
|
||||||
|
min-width: var(--fa-counter-min-width, 1.5em);
|
||||||
|
overflow: hidden;
|
||||||
|
padding: var(--fa-counter-padding, 0.25em 0.5em);
|
||||||
|
right: var(--fa-right, 0);
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
top: var(--fa-top, 0);
|
||||||
|
-webkit-transform: scale(var(--fa-counter-scale, 0.25));
|
||||||
|
transform: scale(var(--fa-counter-scale, 0.25));
|
||||||
|
-webkit-transform-origin: top right;
|
||||||
|
transform-origin: top right; }
|
||||||
|
|
||||||
|
.fa-layers-bottom-right {
|
||||||
|
bottom: var(--fa-bottom, 0);
|
||||||
|
right: var(--fa-right, 0);
|
||||||
|
top: auto;
|
||||||
|
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
||||||
|
transform: scale(var(--fa-layers-scale, 0.25));
|
||||||
|
-webkit-transform-origin: bottom right;
|
||||||
|
transform-origin: bottom right; }
|
||||||
|
|
||||||
|
.fa-layers-bottom-left {
|
||||||
|
bottom: var(--fa-bottom, 0);
|
||||||
|
left: var(--fa-left, 0);
|
||||||
|
right: auto;
|
||||||
|
top: auto;
|
||||||
|
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
||||||
|
transform: scale(var(--fa-layers-scale, 0.25));
|
||||||
|
-webkit-transform-origin: bottom left;
|
||||||
|
transform-origin: bottom left; }
|
||||||
|
|
||||||
|
.fa-layers-top-right {
|
||||||
|
top: var(--fa-top, 0);
|
||||||
|
right: var(--fa-right, 0);
|
||||||
|
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
||||||
|
transform: scale(var(--fa-layers-scale, 0.25));
|
||||||
|
-webkit-transform-origin: top right;
|
||||||
|
transform-origin: top right; }
|
||||||
|
|
||||||
|
.fa-layers-top-left {
|
||||||
|
left: var(--fa-left, 0);
|
||||||
|
right: auto;
|
||||||
|
top: var(--fa-top, 0);
|
||||||
|
-webkit-transform: scale(var(--fa-layers-scale, 0.25));
|
||||||
|
transform: scale(var(--fa-layers-scale, 0.25));
|
||||||
|
-webkit-transform-origin: top left;
|
||||||
|
transform-origin: top left; }
|
||||||
|
|
||||||
|
.fa-1x {
|
||||||
|
font-size: 1em; }
|
||||||
|
|
||||||
|
.fa-2x {
|
||||||
|
font-size: 2em; }
|
||||||
|
|
||||||
|
.fa-3x {
|
||||||
|
font-size: 3em; }
|
||||||
|
|
||||||
|
.fa-4x {
|
||||||
|
font-size: 4em; }
|
||||||
|
|
||||||
|
.fa-5x {
|
||||||
|
font-size: 5em; }
|
||||||
|
|
||||||
|
.fa-6x {
|
||||||
|
font-size: 6em; }
|
||||||
|
|
||||||
|
.fa-7x {
|
||||||
|
font-size: 7em; }
|
||||||
|
|
||||||
|
.fa-8x {
|
||||||
|
font-size: 8em; }
|
||||||
|
|
||||||
|
.fa-9x {
|
||||||
|
font-size: 9em; }
|
||||||
|
|
||||||
|
.fa-10x {
|
||||||
|
font-size: 10em; }
|
||||||
|
|
||||||
|
.fa-2xs {
|
||||||
|
font-size: 0.625em;
|
||||||
|
line-height: 0.1em;
|
||||||
|
vertical-align: 0.225em; }
|
||||||
|
|
||||||
|
.fa-xs {
|
||||||
|
font-size: 0.75em;
|
||||||
|
line-height: 0.08333em;
|
||||||
|
vertical-align: 0.125em; }
|
||||||
|
|
||||||
|
.fa-sm {
|
||||||
|
font-size: 0.875em;
|
||||||
|
line-height: 0.07143em;
|
||||||
|
vertical-align: 0.05357em; }
|
||||||
|
|
||||||
|
.fa-lg {
|
||||||
|
font-size: 1.25em;
|
||||||
|
line-height: 0.05em;
|
||||||
|
vertical-align: -0.075em; }
|
||||||
|
|
||||||
|
.fa-xl {
|
||||||
|
font-size: 1.5em;
|
||||||
|
line-height: 0.04167em;
|
||||||
|
vertical-align: -0.125em; }
|
||||||
|
|
||||||
|
.fa-2xl {
|
||||||
|
font-size: 2em;
|
||||||
|
line-height: 0.03125em;
|
||||||
|
vertical-align: -0.1875em; }
|
||||||
|
|
||||||
|
.fa-fw {
|
||||||
|
text-align: center;
|
||||||
|
width: 1.25em; }
|
||||||
|
|
||||||
|
.fa-ul {
|
||||||
|
list-style-type: none;
|
||||||
|
margin-left: var(--fa-li-margin, 2.5em);
|
||||||
|
padding-left: 0; }
|
||||||
|
.fa-ul > li {
|
||||||
|
position: relative; }
|
||||||
|
|
||||||
|
.fa-li {
|
||||||
|
left: calc(var(--fa-li-width, 2em) * -1);
|
||||||
|
position: absolute;
|
||||||
|
text-align: center;
|
||||||
|
width: var(--fa-li-width, 2em);
|
||||||
|
line-height: inherit; }
|
||||||
|
|
||||||
|
.fa-border {
|
||||||
|
border-color: var(--fa-border-color, #eee);
|
||||||
|
border-radius: var(--fa-border-radius, 0.1em);
|
||||||
|
border-style: var(--fa-border-style, solid);
|
||||||
|
border-width: var(--fa-border-width, 0.08em);
|
||||||
|
padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); }
|
||||||
|
|
||||||
|
.fa-pull-left {
|
||||||
|
float: left;
|
||||||
|
margin-right: var(--fa-pull-margin, 0.3em); }
|
||||||
|
|
||||||
|
.fa-pull-right {
|
||||||
|
float: right;
|
||||||
|
margin-left: var(--fa-pull-margin, 0.3em); }
|
||||||
|
|
||||||
|
.fa-beat {
|
||||||
|
-webkit-animation-name: fa-beat;
|
||||||
|
animation-name: fa-beat;
|
||||||
|
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
-webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
||||||
|
animation-timing-function: var(--fa-animation-timing, ease-in-out); }
|
||||||
|
|
||||||
|
.fa-bounce {
|
||||||
|
-webkit-animation-name: fa-bounce;
|
||||||
|
animation-name: fa-bounce;
|
||||||
|
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
-webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));
|
||||||
|
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); }
|
||||||
|
|
||||||
|
.fa-fade {
|
||||||
|
-webkit-animation-name: fa-fade;
|
||||||
|
animation-name: fa-fade;
|
||||||
|
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
-webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
||||||
|
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); }
|
||||||
|
|
||||||
|
.fa-beat-fade {
|
||||||
|
-webkit-animation-name: fa-beat-fade;
|
||||||
|
animation-name: fa-beat-fade;
|
||||||
|
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
-webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));
|
||||||
|
animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); }
|
||||||
|
|
||||||
|
.fa-flip {
|
||||||
|
-webkit-animation-name: fa-flip;
|
||||||
|
animation-name: fa-flip;
|
||||||
|
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
-webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);
|
||||||
|
animation-timing-function: var(--fa-animation-timing, ease-in-out); }
|
||||||
|
|
||||||
|
.fa-shake {
|
||||||
|
-webkit-animation-name: fa-shake;
|
||||||
|
animation-name: fa-shake;
|
||||||
|
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
-webkit-animation-timing-function: var(--fa-animation-timing, linear);
|
||||||
|
animation-timing-function: var(--fa-animation-timing, linear); }
|
||||||
|
|
||||||
|
.fa-spin {
|
||||||
|
-webkit-animation-name: fa-spin;
|
||||||
|
animation-name: fa-spin;
|
||||||
|
-webkit-animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
animation-delay: var(--fa-animation-delay, 0s);
|
||||||
|
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
-webkit-animation-duration: var(--fa-animation-duration, 2s);
|
||||||
|
animation-duration: var(--fa-animation-duration, 2s);
|
||||||
|
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
-webkit-animation-timing-function: var(--fa-animation-timing, linear);
|
||||||
|
animation-timing-function: var(--fa-animation-timing, linear); }
|
||||||
|
|
||||||
|
.fa-spin-reverse {
|
||||||
|
--fa-animation-direction: reverse; }
|
||||||
|
|
||||||
|
.fa-pulse,
|
||||||
|
.fa-spin-pulse {
|
||||||
|
-webkit-animation-name: fa-spin;
|
||||||
|
animation-name: fa-spin;
|
||||||
|
-webkit-animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
animation-direction: var(--fa-animation-direction, normal);
|
||||||
|
-webkit-animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
animation-duration: var(--fa-animation-duration, 1s);
|
||||||
|
-webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
animation-iteration-count: var(--fa-animation-iteration-count, infinite);
|
||||||
|
-webkit-animation-timing-function: var(--fa-animation-timing, steps(8));
|
||||||
|
animation-timing-function: var(--fa-animation-timing, steps(8)); }
|
||||||
|
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.fa-beat,
|
||||||
|
.fa-bounce,
|
||||||
|
.fa-fade,
|
||||||
|
.fa-beat-fade,
|
||||||
|
.fa-flip,
|
||||||
|
.fa-pulse,
|
||||||
|
.fa-shake,
|
||||||
|
.fa-spin,
|
||||||
|
.fa-spin-pulse {
|
||||||
|
-webkit-animation-delay: -1ms;
|
||||||
|
animation-delay: -1ms;
|
||||||
|
-webkit-animation-duration: 1ms;
|
||||||
|
animation-duration: 1ms;
|
||||||
|
-webkit-animation-iteration-count: 1;
|
||||||
|
animation-iteration-count: 1;
|
||||||
|
transition-delay: 0s;
|
||||||
|
transition-duration: 0s; } }
|
||||||
|
|
||||||
|
@-webkit-keyframes fa-beat {
|
||||||
|
0%, 90% {
|
||||||
|
-webkit-transform: scale(1);
|
||||||
|
transform: scale(1); }
|
||||||
|
45% {
|
||||||
|
-webkit-transform: scale(var(--fa-beat-scale, 1.25));
|
||||||
|
transform: scale(var(--fa-beat-scale, 1.25)); } }
|
||||||
|
|
||||||
|
@keyframes fa-beat {
|
||||||
|
0%, 90% {
|
||||||
|
-webkit-transform: scale(1);
|
||||||
|
transform: scale(1); }
|
||||||
|
45% {
|
||||||
|
-webkit-transform: scale(var(--fa-beat-scale, 1.25));
|
||||||
|
transform: scale(var(--fa-beat-scale, 1.25)); } }
|
||||||
|
|
||||||
|
@-webkit-keyframes fa-bounce {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: scale(1, 1) translateY(0);
|
||||||
|
transform: scale(1, 1) translateY(0); }
|
||||||
|
10% {
|
||||||
|
-webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
||||||
|
transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); }
|
||||||
|
30% {
|
||||||
|
-webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
||||||
|
transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); }
|
||||||
|
50% {
|
||||||
|
-webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
||||||
|
transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); }
|
||||||
|
57% {
|
||||||
|
-webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
||||||
|
transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); }
|
||||||
|
64% {
|
||||||
|
-webkit-transform: scale(1, 1) translateY(0);
|
||||||
|
transform: scale(1, 1) translateY(0); }
|
||||||
|
100% {
|
||||||
|
-webkit-transform: scale(1, 1) translateY(0);
|
||||||
|
transform: scale(1, 1) translateY(0); } }
|
||||||
|
|
||||||
|
@keyframes fa-bounce {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: scale(1, 1) translateY(0);
|
||||||
|
transform: scale(1, 1) translateY(0); }
|
||||||
|
10% {
|
||||||
|
-webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);
|
||||||
|
transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); }
|
||||||
|
30% {
|
||||||
|
-webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));
|
||||||
|
transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); }
|
||||||
|
50% {
|
||||||
|
-webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);
|
||||||
|
transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); }
|
||||||
|
57% {
|
||||||
|
-webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));
|
||||||
|
transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); }
|
||||||
|
64% {
|
||||||
|
-webkit-transform: scale(1, 1) translateY(0);
|
||||||
|
transform: scale(1, 1) translateY(0); }
|
||||||
|
100% {
|
||||||
|
-webkit-transform: scale(1, 1) translateY(0);
|
||||||
|
transform: scale(1, 1) translateY(0); } }
|
||||||
|
|
||||||
|
@-webkit-keyframes fa-fade {
|
||||||
|
50% {
|
||||||
|
opacity: var(--fa-fade-opacity, 0.4); } }
|
||||||
|
|
||||||
|
@keyframes fa-fade {
|
||||||
|
50% {
|
||||||
|
opacity: var(--fa-fade-opacity, 0.4); } }
|
||||||
|
|
||||||
|
@-webkit-keyframes fa-beat-fade {
|
||||||
|
0%, 100% {
|
||||||
|
opacity: var(--fa-beat-fade-opacity, 0.4);
|
||||||
|
-webkit-transform: scale(1);
|
||||||
|
transform: scale(1); }
|
||||||
|
50% {
|
||||||
|
opacity: 1;
|
||||||
|
-webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));
|
||||||
|
transform: scale(var(--fa-beat-fade-scale, 1.125)); } }
|
||||||
|
|
||||||
|
@keyframes fa-beat-fade {
|
||||||
|
0%, 100% {
|
||||||
|
opacity: var(--fa-beat-fade-opacity, 0.4);
|
||||||
|
-webkit-transform: scale(1);
|
||||||
|
transform: scale(1); }
|
||||||
|
50% {
|
||||||
|
opacity: 1;
|
||||||
|
-webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));
|
||||||
|
transform: scale(var(--fa-beat-fade-scale, 1.125)); } }
|
||||||
|
|
||||||
|
@-webkit-keyframes fa-flip {
|
||||||
|
50% {
|
||||||
|
-webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
||||||
|
transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); } }
|
||||||
|
|
||||||
|
@keyframes fa-flip {
|
||||||
|
50% {
|
||||||
|
-webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));
|
||||||
|
transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); } }
|
||||||
|
|
||||||
|
@-webkit-keyframes fa-shake {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: rotate(-15deg);
|
||||||
|
transform: rotate(-15deg); }
|
||||||
|
4% {
|
||||||
|
-webkit-transform: rotate(15deg);
|
||||||
|
transform: rotate(15deg); }
|
||||||
|
8%, 24% {
|
||||||
|
-webkit-transform: rotate(-18deg);
|
||||||
|
transform: rotate(-18deg); }
|
||||||
|
12%, 28% {
|
||||||
|
-webkit-transform: rotate(18deg);
|
||||||
|
transform: rotate(18deg); }
|
||||||
|
16% {
|
||||||
|
-webkit-transform: rotate(-22deg);
|
||||||
|
transform: rotate(-22deg); }
|
||||||
|
20% {
|
||||||
|
-webkit-transform: rotate(22deg);
|
||||||
|
transform: rotate(22deg); }
|
||||||
|
32% {
|
||||||
|
-webkit-transform: rotate(-12deg);
|
||||||
|
transform: rotate(-12deg); }
|
||||||
|
36% {
|
||||||
|
-webkit-transform: rotate(12deg);
|
||||||
|
transform: rotate(12deg); }
|
||||||
|
40%, 100% {
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg); } }
|
||||||
|
|
||||||
|
@keyframes fa-shake {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: rotate(-15deg);
|
||||||
|
transform: rotate(-15deg); }
|
||||||
|
4% {
|
||||||
|
-webkit-transform: rotate(15deg);
|
||||||
|
transform: rotate(15deg); }
|
||||||
|
8%, 24% {
|
||||||
|
-webkit-transform: rotate(-18deg);
|
||||||
|
transform: rotate(-18deg); }
|
||||||
|
12%, 28% {
|
||||||
|
-webkit-transform: rotate(18deg);
|
||||||
|
transform: rotate(18deg); }
|
||||||
|
16% {
|
||||||
|
-webkit-transform: rotate(-22deg);
|
||||||
|
transform: rotate(-22deg); }
|
||||||
|
20% {
|
||||||
|
-webkit-transform: rotate(22deg);
|
||||||
|
transform: rotate(22deg); }
|
||||||
|
32% {
|
||||||
|
-webkit-transform: rotate(-12deg);
|
||||||
|
transform: rotate(-12deg); }
|
||||||
|
36% {
|
||||||
|
-webkit-transform: rotate(12deg);
|
||||||
|
transform: rotate(12deg); }
|
||||||
|
40%, 100% {
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg); } }
|
||||||
|
|
||||||
|
@-webkit-keyframes fa-spin {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg); }
|
||||||
|
100% {
|
||||||
|
-webkit-transform: rotate(360deg);
|
||||||
|
transform: rotate(360deg); } }
|
||||||
|
|
||||||
|
@keyframes fa-spin {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
transform: rotate(0deg); }
|
||||||
|
100% {
|
||||||
|
-webkit-transform: rotate(360deg);
|
||||||
|
transform: rotate(360deg); } }
|
||||||
|
|
||||||
|
.fa-rotate-90 {
|
||||||
|
-webkit-transform: rotate(90deg);
|
||||||
|
transform: rotate(90deg); }
|
||||||
|
|
||||||
|
.fa-rotate-180 {
|
||||||
|
-webkit-transform: rotate(180deg);
|
||||||
|
transform: rotate(180deg); }
|
||||||
|
|
||||||
|
.fa-rotate-270 {
|
||||||
|
-webkit-transform: rotate(270deg);
|
||||||
|
transform: rotate(270deg); }
|
||||||
|
|
||||||
|
.fa-flip-horizontal {
|
||||||
|
-webkit-transform: scale(-1, 1);
|
||||||
|
transform: scale(-1, 1); }
|
||||||
|
|
||||||
|
.fa-flip-vertical {
|
||||||
|
-webkit-transform: scale(1, -1);
|
||||||
|
transform: scale(1, -1); }
|
||||||
|
|
||||||
|
.fa-flip-both,
|
||||||
|
.fa-flip-horizontal.fa-flip-vertical {
|
||||||
|
-webkit-transform: scale(-1, -1);
|
||||||
|
transform: scale(-1, -1); }
|
||||||
|
|
||||||
|
.fa-rotate-by {
|
||||||
|
-webkit-transform: rotate(var(--fa-rotate-angle, none));
|
||||||
|
transform: rotate(var(--fa-rotate-angle, none)); }
|
||||||
|
|
||||||
|
.fa-stack {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
height: 2em;
|
||||||
|
position: relative;
|
||||||
|
width: 2.5em; }
|
||||||
|
|
||||||
|
.fa-stack-1x,
|
||||||
|
.fa-stack-2x {
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
margin: auto;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
z-index: var(--fa-stack-z-index, auto); }
|
||||||
|
|
||||||
|
.svg-inline--fa.fa-stack-1x {
|
||||||
|
height: 1em;
|
||||||
|
width: 1.25em; }
|
||||||
|
|
||||||
|
.svg-inline--fa.fa-stack-2x {
|
||||||
|
height: 2em;
|
||||||
|
width: 2.5em; }
|
||||||
|
|
||||||
|
.fa-inverse {
|
||||||
|
color: var(--fa-inverse, #fff); }
|
||||||
|
|
||||||
|
.sr-only,
|
||||||
|
.fa-sr-only {
|
||||||
|
position: absolute;
|
||||||
|
width: 1px;
|
||||||
|
height: 1px;
|
||||||
|
padding: 0;
|
||||||
|
margin: -1px;
|
||||||
|
overflow: hidden;
|
||||||
|
clip: rect(0, 0, 0, 0);
|
||||||
|
white-space: nowrap;
|
||||||
|
border-width: 0; }
|
||||||
|
|
||||||
|
.sr-only-focusable:not(:focus),
|
||||||
|
.fa-sr-only-focusable:not(:focus) {
|
||||||
|
position: absolute;
|
||||||
|
width: 1px;
|
||||||
|
height: 1px;
|
||||||
|
padding: 0;
|
||||||
|
margin: -1px;
|
||||||
|
overflow: hidden;
|
||||||
|
clip: rect(0, 0, 0, 0);
|
||||||
|
white-space: nowrap;
|
||||||
|
border-width: 0; }
|
||||||
|
|
||||||
|
.svg-inline--fa .fa-primary {
|
||||||
|
fill: var(--fa-primary-color, currentColor);
|
||||||
|
opacity: var(--fa-primary-opacity, 1); }
|
||||||
|
|
||||||
|
.svg-inline--fa .fa-secondary {
|
||||||
|
fill: var(--fa-secondary-color, currentColor);
|
||||||
|
opacity: var(--fa-secondary-opacity, 0.4); }
|
||||||
|
|
||||||
|
.svg-inline--fa.fa-swap-opacity .fa-primary {
|
||||||
|
opacity: var(--fa-secondary-opacity, 0.4); }
|
||||||
|
|
||||||
|
.svg-inline--fa.fa-swap-opacity .fa-secondary {
|
||||||
|
opacity: var(--fa-primary-opacity, 1); }
|
||||||
|
|
||||||
|
.svg-inline--fa mask .fa-primary,
|
||||||
|
.svg-inline--fa mask .fa-secondary {
|
||||||
|
fill: black; }
|
||||||
|
|
||||||
|
.fad.fa-inverse,
|
||||||
|
.fa-duotone.fa-inverse {
|
||||||
|
color: var(--fa-inverse, #fff); }
|
||||||
+6
File diff suppressed because one or more lines are too long
@@ -0,0 +1,19 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:root, :host {
|
||||||
|
--fa-style-family-classic: 'Font Awesome 6 Pro';
|
||||||
|
--fa-font-thin: normal 100 1em/1 'Font Awesome 6 Pro'; }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Font Awesome 6 Pro';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 100;
|
||||||
|
font-display: block;
|
||||||
|
src: url("../webfonts/fa-thin-100.woff2") format("woff2"), url("../webfonts/fa-thin-100.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
.fat,
|
||||||
|
.fa-thin {
|
||||||
|
font-weight: 100; }
|
||||||
Vendored
+6
@@ -0,0 +1,6 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
:host,:root{--fa-style-family-classic:"Font Awesome 6 Pro";--fa-font-thin:normal 100 1em/1 "Font Awesome 6 Pro"}@font-face{font-family:"Font Awesome 6 Pro";font-style:normal;font-weight:100;font-display:block;src:url(../webfonts/fa-thin-100.woff2) format("woff2"),url(../webfonts/fa-thin-100.ttf) format("truetype")}.fa-thin,.fat{font-weight:100}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
@font-face {
|
||||||
|
font-family: 'FontAwesome';
|
||||||
|
font-display: block;
|
||||||
|
src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'FontAwesome';
|
||||||
|
font-display: block;
|
||||||
|
src: url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'FontAwesome';
|
||||||
|
font-display: block;
|
||||||
|
src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.ttf") format("truetype");
|
||||||
|
unicode-range: U+F003,U+F006,U+F014,U+F016-F017,U+F01A-F01B,U+F01D,U+F022,U+F03E,U+F044,U+F046,U+F05C-F05D,U+F06E,U+F070,U+F087-F088,U+F08A,U+F094,U+F096-F097,U+F09D,U+F0A0,U+F0A2,U+F0A4-F0A7,U+F0C5,U+F0C7,U+F0E5-F0E6,U+F0EB,U+F0F6-F0F8,U+F10C,U+F114-F115,U+F118-F11A,U+F11C-F11D,U+F133,U+F147,U+F14E,U+F150-F152,U+F185-F186,U+F18E,U+F190-F192,U+F196,U+F1C1-F1C9,U+F1D9,U+F1DB,U+F1E3,U+F1EA,U+F1F7,U+F1F9,U+F20A,U+F247-F248,U+F24A,U+F24D,U+F255-F25B,U+F25D,U+F271-F274,U+F278,U+F27B,U+F28C,U+F28E,U+F29C,U+F2B5,U+F2B7,U+F2BA,U+F2BC,U+F2BE,U+F2C0-F2C1,U+F2C3,U+F2D0,U+F2D2,U+F2D4,U+F2DC; }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'FontAwesome';
|
||||||
|
font-display: block;
|
||||||
|
src: url("../webfonts/fa-v4compatibility.woff2") format("woff2"), url("../webfonts/fa-v4compatibility.ttf") format("truetype");
|
||||||
|
unicode-range: U+F041,U+F047,U+F065-F066,U+F07D-F07E,U+F080,U+F08B,U+F08E,U+F090,U+F09A,U+F0AC,U+F0AE,U+F0B2,U+F0D0,U+F0D6,U+F0E4,U+F0EC,U+F10A-F10B,U+F123,U+F13E,U+F148-F149,U+F14C,U+F156,U+F15E,U+F160-F161,U+F163,U+F175-F178,U+F195,U+F1F8,U+F219,U+F27A; }
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.ttf) format("truetype")}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.ttf) format("truetype")}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.ttf) format("truetype");unicode-range:u+f003,u+f006,u+f014,u+f016-f017,u+f01a-f01b,u+f01d,u+f022,u+f03e,u+f044,u+f046,u+f05c-f05d,u+f06e,u+f070,u+f087-f088,u+f08a,u+f094,u+f096-f097,u+f09d,u+f0a0,u+f0a2,u+f0a4-f0a7,u+f0c5,u+f0c7,u+f0e5-f0e6,u+f0eb,u+f0f6-f0f8,u+f10c,u+f114-f115,u+f118-f11a,u+f11c-f11d,u+f133,u+f147,u+f14e,u+f150-f152,u+f185-f186,u+f18e,u+f190-f192,u+f196,u+f1c1-f1c9,u+f1d9,u+f1db,u+f1e3,u+f1ea,u+f1f7,u+f1f9,u+f20a,u+f247-f248,u+f24a,u+f24d,u+f255-f25b,u+f25d,u+f271-f274,u+f278,u+f27b,u+f28c,u+f28e,u+f29c,u+f2b5,u+f2b7,u+f2ba,u+f2bc,u+f2be,u+f2c0-f2c1,u+f2c3,u+f2d0,u+f2d2,u+f2d4,u+f2dc}@font-face{font-family:"FontAwesome";font-display:block;src:url(../webfonts/fa-v4compatibility.woff2) format("woff2"),url(../webfonts/fa-v4compatibility.ttf) format("truetype");unicode-range:u+f041,u+f047,u+f065-f066,u+f07d-f07e,u+f080,u+f08b,u+f08e,u+f090,u+f09a,u+f0ac,u+f0ae,u+f0b2,u+f0d0,u+f0d6,u+f0e4,u+f0ec,u+f10a-f10b,u+f123,u+f13e,u+f148-f149,u+f14c,u+f156,u+f15e,u+f160-f161,u+f163,u+f175-f178,u+f195,u+f1f8,u+f219,u+f27a}
|
||||||
File diff suppressed because it is too large
Load Diff
+6
File diff suppressed because one or more lines are too long
@@ -0,0 +1,34 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Font Awesome 5 Brands';
|
||||||
|
font-display: block;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Font Awesome 5 Pro';
|
||||||
|
font-display: block;
|
||||||
|
font-weight: 900;
|
||||||
|
src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Font Awesome 5 Pro';
|
||||||
|
font-display: block;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Font Awesome 5 Pro';
|
||||||
|
font-display: block;
|
||||||
|
font-weight: 300;
|
||||||
|
src: url("../webfonts/fa-light-300.woff2") format("woff2"), url("../webfonts/fa-light-300.ttf") format("truetype"); }
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Font Awesome 5 Duotone';
|
||||||
|
font-display: block;
|
||||||
|
font-weight: 900;
|
||||||
|
src: url("../webfonts/fa-duotone-900.woff2") format("woff2"), url("../webfonts/fa-duotone-900.ttf") format("truetype"); }
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
/*!
|
||||||
|
* Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com
|
||||||
|
* License - https://fontawesome.com/license (Commercial License)
|
||||||
|
* Copyright 2022 Fonticons, Inc.
|
||||||
|
*/
|
||||||
|
@font-face{font-family:"Font Awesome 5 Brands";font-display:block;font-weight:400;src:url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.ttf) format("truetype")}@font-face{font-family:"Font Awesome 5 Pro";font-display:block;font-weight:900;src:url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.ttf) format("truetype")}@font-face{font-family:"Font Awesome 5 Pro";font-display:block;font-weight:400;src:url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.ttf) format("truetype")}@font-face{font-family:"Font Awesome 5 Pro";font-display:block;font-weight:300;src:url(../webfonts/fa-light-300.woff2) format("woff2"),url(../webfonts/fa-light-300.ttf) format("truetype")}@font-face{font-family:"Font Awesome 5 Duotone";font-display:block;font-weight:900;src:url(../webfonts/fa-duotone-900.woff2) format("woff2"),url(../webfonts/fa-duotone-900.ttf) format("truetype")}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+457
-23
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 73 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -23,6 +23,36 @@
|
|||||||
content: "b";
|
content: "b";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fm-trijntje:before {
|
||||||
|
content: "c";
|
||||||
|
}
|
||||||
|
|
||||||
|
.fm-satellite:before {
|
||||||
|
content: "d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.fm-sensoterra:before {
|
||||||
|
content: "e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.fm-blight:before {
|
||||||
|
content: "f";
|
||||||
|
}
|
||||||
|
|
||||||
|
.fm-agrodatacube:before {
|
||||||
|
content: "g";
|
||||||
|
}
|
||||||
|
|
||||||
|
.fm-app-menu:before {
|
||||||
|
content: "h";
|
||||||
|
}
|
||||||
|
|
||||||
|
.fm-blight-holes:before {
|
||||||
|
content: "i";
|
||||||
|
}
|
||||||
|
|
||||||
|
hallo
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "FarmMaps";
|
font-family: "FarmMaps";
|
||||||
src: url("./FMIconFont.woff") format("woff"), /* Modern Browsers */
|
src: url("./FMIconFont.woff") format("woff"), /* Modern Browsers */
|
||||||
|
|||||||
Generated
+21598
-9126
File diff suppressed because it is too large
Load Diff
+60
-49
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "farmmaps-lib-app",
|
"name": "farmmaps-lib-app",
|
||||||
"version": "0.0.1",
|
"version": "3.0.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
@@ -11,62 +11,73 @@
|
|||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "~10.1.3",
|
"@angular/animations": "^14.1.3",
|
||||||
"@angular/common": "~10.1.3",
|
"@angular/common": "^14.1.3",
|
||||||
"@angular/compiler": "~10.1.3",
|
"@angular/compiler": "^14.1.3",
|
||||||
"@angular/core": "~10.1.3",
|
"@angular/core": "^14.1.3",
|
||||||
"@angular/forms": "~10.1.3",
|
"@angular/forms": "^14.1.3",
|
||||||
"@angular/platform-browser": "~10.1.3",
|
"@angular/platform-browser": "^14.1.3",
|
||||||
"@angular/platform-browser-dynamic": "~10.1.3",
|
"@angular/platform-browser-dynamic": "^14.1.3",
|
||||||
"@angular/router": "~10.1.3",
|
"@angular/router": "^14.1.3",
|
||||||
"@farmmaps/common": ">=0.0.1-prerelease.434 <0.0.1",
|
"@farmmaps/common": "file:dist/common",
|
||||||
"@farmmaps/common-map": ">=0.0.1-prerelease.434 <0.0.1",
|
"@farmmaps/common-map": "file:dist/common-map",
|
||||||
"@farmmaps/common-map3d": ">=0.0.1-prerelease.434 <0.0.1",
|
"@farmmaps/common-map3d": "file:dist/common-map3d",
|
||||||
"@microsoft/signalr": "^3.1.3",
|
"@microsoft/signalr": "^3.1.16",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^7.0",
|
"@ng-bootstrap/ng-bootstrap": "^13.0.0",
|
||||||
"@ngrx/effects": "^10.0",
|
"@ngrx/effects": "^14",
|
||||||
"@ngrx/router-store": "^10.0",
|
"@ngrx/router-store": "^14",
|
||||||
"@ngrx/store": "^10.0",
|
"@ngrx/store": "^14",
|
||||||
"angular-oauth2-oidc": "^10.0.3",
|
"@popperjs/core": "^2.11.6",
|
||||||
"bootstrap": "^4.4.1",
|
"angular-oauth2-oidc": "^13",
|
||||||
"cesium": "^1.73.0",
|
"assert": "^2.0.0",
|
||||||
"core-js": "^2.6.11",
|
"bootstrap": "^5.2.0",
|
||||||
"font-awesome": "^4.7.0",
|
"browserify-zlib": "^0.2.0",
|
||||||
"ngrx-store-localstorage": "^10.0",
|
"buffer": "^6.0.3",
|
||||||
"ngx-bootstrap": "^5.6.1",
|
"cesium": "^1.97.0",
|
||||||
"ngx-openlayers": "1.0.0-next.16",
|
"core-js": "^2.6.12",
|
||||||
"ngx-uploadx": "^3.5.1",
|
"https-browserify": "^1.0.0",
|
||||||
"ol": "6.1.1",
|
"moment": "^2.29.4",
|
||||||
"ol-cesium": "^2.11.3",
|
"ngrx-store-localstorage": "^14",
|
||||||
|
"ngx-avatar": "^4.1.0",
|
||||||
|
"ngx-clipboard": "^14.0.1",
|
||||||
|
"ngx-image-cropper": "^3.3.5",
|
||||||
|
"ngx-openlayers": "1.0.0-next.19",
|
||||||
|
"ngx-uploadx": "^5.2.0",
|
||||||
|
"ol": "6.14.1",
|
||||||
|
"olcs": "^2.13.1",
|
||||||
"resumablejs": "^1.1.0",
|
"resumablejs": "^1.1.0",
|
||||||
"rxjs": "^6.5.4",
|
"rxjs": "^6.6.7",
|
||||||
|
"stream": "^0.0.2",
|
||||||
|
"stream-http": "^3.2.0",
|
||||||
"tassign": "^1.0.0",
|
"tassign": "^1.0.0",
|
||||||
"tslib": "^2.0.0",
|
"tslib": "^2.4.0",
|
||||||
"zone.js": "~0.10.2",
|
"url": "^0.11.0",
|
||||||
"moment": "^2.27.0"
|
"util": "^0.12.4",
|
||||||
|
"zone.js": "~0.11.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^0.1001.3",
|
"@angular-builders/custom-webpack": "^14",
|
||||||
"@angular-devkit/build-ng-packagr": "~0.1001.3",
|
"@angular-devkit/build-angular": "^14.1.3",
|
||||||
"@angular/cli": "^10.1.3",
|
"@angular/cli": "^14.1.3",
|
||||||
"@angular/compiler-cli": "~10.1.3",
|
"@angular/compiler-cli": "^14.1.3",
|
||||||
"@angular/language-service": "~10.1.3",
|
"@angular/language-service": "^14.1.3",
|
||||||
"@angular-builders/custom-webpack": "~10.0.1",
|
"@angular/localize": "^14.1.3",
|
||||||
|
"@types/arcgis-rest-api": "^10.4.5",
|
||||||
"@types/jasmine": "~2.8.8",
|
"@types/jasmine": "~2.8.8",
|
||||||
"@types/jasminewd2": "~2.0.3",
|
"@types/jasminewd2": "^2.0.9",
|
||||||
"@types/node": "^12.11.1",
|
"@types/node": "^12.20.15",
|
||||||
"codelyzer": "^5.1.2",
|
"codelyzer": "^0.0.28",
|
||||||
"jasmine-core": "~3.5.0",
|
"jasmine-core": "^4.3.0",
|
||||||
"jasmine-spec-reporter": "~5.0.0",
|
"jasmine-spec-reporter": "^7.0.0",
|
||||||
"karma": "~5.0.0",
|
"karma": "^6.3.20",
|
||||||
"karma-chrome-launcher": "~3.1.0",
|
"karma-chrome-launcher": "~3.1.0",
|
||||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
"karma-coverage-istanbul-reporter": "^3.0.3",
|
||||||
"karma-jasmine": "~4.0.0",
|
"karma-jasmine": "^5.1.0",
|
||||||
"karma-jasmine-html-reporter": "^1.5.0",
|
"karma-jasmine-html-reporter": "^2.0.0",
|
||||||
"ng-packagr": "^10.1.0",
|
"ng-packagr": "^14.1.0",
|
||||||
"protractor": "~7.0.0",
|
"protractor": "~7.0.0",
|
||||||
"ts-node": "^8.8.1",
|
"ts-node": "^8.8.1",
|
||||||
"tslint": "~6.1.0",
|
"tslint": "~6.1.0",
|
||||||
"typescript": "~4.0.3"
|
"typescript": "~4.6.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"lib": {
|
"lib": {
|
||||||
"entryFile": "src/public-api.ts"
|
"entryFile": "src/public-api.ts"
|
||||||
},
|
},
|
||||||
"whitelistedNonPeerDependencies": [
|
"allowedNonPeerDependencies": [
|
||||||
"."
|
"."
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@farmmaps/common-map",
|
"name": "@farmmaps/common-map",
|
||||||
"version": "0.0.1",
|
"version": "2.0.0",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
||||||
},
|
},
|
||||||
@@ -8,14 +8,13 @@
|
|||||||
"tslib": "^2.0.0"
|
"tslib": "^2.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/core": "^10.1.3",
|
"@angular/core": ">=14.0.0",
|
||||||
"ngrx-store-localstorage": "^10.0",
|
"ngrx-store-localstorage": ">=14.0.0",
|
||||||
"@ngrx/effects": "^10.0",
|
"@ngrx/effects": ">=14.0.0",
|
||||||
"@ngrx/router-store": "^10.0",
|
"@ngrx/router-store":">=14.0.0",
|
||||||
"@ngrx/store": "^10.0",
|
"@ngrx/store":">=14.0.0",
|
||||||
"tassign": "^1.0.0",
|
"tassign": ">=1.0.0",
|
||||||
"@farmmaps/common": ">=0.0.1-prerelease.420 <0.0.1",
|
"ngx-openlayers": ">=1.0.0-next.19",
|
||||||
"ngx-openlayers": "1.0.0-next.16",
|
"ol": ">=6.8.1"
|
||||||
"ol": "6.1.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,20 +2,26 @@ import { Action } from '@ngrx/store';
|
|||||||
|
|
||||||
import { IMapState } from '../models/map.state';
|
import { IMapState } from '../models/map.state';
|
||||||
import { IItemLayer } from '../models/item.layer';
|
import { IItemLayer } from '../models/item.layer';
|
||||||
|
import { ILayervalue } from '../models/layer.value';
|
||||||
import { IQueryState } from '@farmmaps/common';
|
import { IQueryState } from '@farmmaps/common';
|
||||||
import { IItem } from '@farmmaps/common';
|
import { IItem } from '@farmmaps/common';
|
||||||
import { Feature,Style } from 'ol';
|
import { Feature } from 'ol';
|
||||||
|
import { Style } from 'ol/style';
|
||||||
|
import { Geometry } from 'ol/geom';
|
||||||
|
import { IPeriodState } from '../models/period.state';
|
||||||
|
|
||||||
export const SETSTATE = '[Map] SetState';
|
export const SETSTATE = '[Map] SetState';
|
||||||
export const SETMAPSTATE = '[Map] MapState';
|
export const SETMAPSTATE = '[Map] MapState';
|
||||||
export const SETVIEWEXTENT = '[Map] SetViewExtent';
|
export const SETVIEWEXTENT = '[Map] SetViewExtent';
|
||||||
export const INIT = '[Map] Init';
|
export const INIT = '[Map] Init';
|
||||||
export const SETPARENT = '[Map] SetParent';
|
export const SETPARENT = '[Map] SetParent';
|
||||||
|
export const SETPERIOD = '[Map] SetPeriod';
|
||||||
export const STARTSEARCH = '[Map] StartSearch';
|
export const STARTSEARCH = '[Map] StartSearch';
|
||||||
export const STARTSEARCHSUCCESS = '[Map] StartSearchSuccess';
|
export const STARTSEARCHSUCCESS = '[Map] StartSearchSuccess';
|
||||||
export const SELECTFEATURE = '[Map] SelectFeature';
|
export const SELECTFEATURE = '[Map] SelectFeature';
|
||||||
export const SELECTITEM = '[Map] SelectItem';
|
export const SELECTITEM = '[Map] SelectItem';
|
||||||
export const SELECTITEMSUCCESS = '[Map] SelectItemSuccess';
|
export const SELECTITEMSUCCESS = '[Map] SelectItemSuccess';
|
||||||
|
export const SETSELECTEDITEMLAYER = '[Map] SetSelectedItemLayer';
|
||||||
export const SELECTTEMPORALITEMSSUCCESS = '[Map] SelectTemporalItemsSuccess';
|
export const SELECTTEMPORALITEMSSUCCESS = '[Map] SelectTemporalItemsSuccess';
|
||||||
export const NEXTTEMPORAL = '[Map] NextTemporal';
|
export const NEXTTEMPORAL = '[Map] NextTemporal';
|
||||||
export const PREVIOUSTEMPORAL = '[Map] PreviousTemporal';
|
export const PREVIOUSTEMPORAL = '[Map] PreviousTemporal';
|
||||||
@@ -32,6 +38,7 @@ export const SETVISIBILITY = '[Map] SetVisibility';
|
|||||||
export const SETOPACITY = '[Map] SetOpacity';
|
export const SETOPACITY = '[Map] SetOpacity';
|
||||||
export const SETLAYERINDEX = '[Map] SetLayerIndex';
|
export const SETLAYERINDEX = '[Map] SetLayerIndex';
|
||||||
export const REMOVELAYER = '[Map] RemoveLayer';
|
export const REMOVELAYER = '[Map] RemoveLayer';
|
||||||
|
export const CLEARLAYERS = '[Map] ClearLayers';
|
||||||
export const LOADBASELAYERS = '[Map] LoadLayers';
|
export const LOADBASELAYERS = '[Map] LoadLayers';
|
||||||
export const LOADBASELAYERSSUCCESS = '[Map] LoadLayersSuccess';
|
export const LOADBASELAYERSSUCCESS = '[Map] LoadLayersSuccess';
|
||||||
export const SELECTBASELAYER = '[Map] SelectBaseLayers';
|
export const SELECTBASELAYER = '[Map] SelectBaseLayers';
|
||||||
@@ -42,6 +49,14 @@ export const SETSTYLE = '[Map] SetStyle';
|
|||||||
export const SHOWLAYERSWITCHER = '[Map] ShowLayerSwitcher';
|
export const SHOWLAYERSWITCHER = '[Map] ShowLayerSwitcher';
|
||||||
export const CLEAR = '[Map] Clear';
|
export const CLEAR = '[Map] Clear';
|
||||||
export const SETREPLACEURL = '[Map] SetReplaceUrl';
|
export const SETREPLACEURL = '[Map] SetReplaceUrl';
|
||||||
|
export const SETFEATURES = '[Map] SetFeatures'
|
||||||
|
export const SETLAYERVALUESLOCATION = '[Map] SetLayerValuesLocation'
|
||||||
|
export const TOGGLELAYERVALUESENABLED = '[Map] ToggleLayerValuesEnabled'
|
||||||
|
export const GETLAYERVALUE = '[Map] GetLayerValue'
|
||||||
|
export const GETLAYERVALUESUCCESS = '[Map] GetLayerValueSuccess'
|
||||||
|
export const TOGGLESHOWDATALAYERSLIDE = '[Map] ToggleShowDataLayerSlide'
|
||||||
|
export const SETVIEWSTATE = '[Map] SetViewState'
|
||||||
|
|
||||||
|
|
||||||
export class Clear implements Action {
|
export class Clear implements Action {
|
||||||
readonly type = CLEAR;
|
readonly type = CLEAR;
|
||||||
@@ -78,6 +93,12 @@ export class SetParent implements Action {
|
|||||||
constructor(public parentCode:string) { }
|
constructor(public parentCode:string) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class SetPeriod implements Action {
|
||||||
|
readonly type = SETPERIOD;
|
||||||
|
|
||||||
|
constructor(public period:IPeriodState) { }
|
||||||
|
}
|
||||||
|
|
||||||
export class StartSearch implements Action {
|
export class StartSearch implements Action {
|
||||||
readonly type = STARTSEARCH;
|
readonly type = STARTSEARCH;
|
||||||
|
|
||||||
@@ -87,13 +108,13 @@ export class StartSearch implements Action {
|
|||||||
export class StartSearchSuccess implements Action {
|
export class StartSearchSuccess implements Action {
|
||||||
readonly type = STARTSEARCHSUCCESS;
|
readonly type = STARTSEARCHSUCCESS;
|
||||||
|
|
||||||
constructor(public features: Array<Feature>, public query:IQueryState,public setStateCount:number) { }
|
constructor(public features: Array<Feature<Geometry>>, public query:IQueryState) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SelectFeature implements Action {
|
export class SelectFeature implements Action {
|
||||||
readonly type = SELECTFEATURE;
|
readonly type = SELECTFEATURE;
|
||||||
|
|
||||||
constructor(public feature:Feature) { }
|
constructor(public feature:Feature<Geometry>) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SelectItem implements Action {
|
export class SelectItem implements Action {
|
||||||
@@ -135,13 +156,13 @@ export class SelectTemporal implements Action {
|
|||||||
export class AddFeatureSuccess implements Action {
|
export class AddFeatureSuccess implements Action {
|
||||||
readonly type = ADDFEATURESUCCESS;
|
readonly type = ADDFEATURESUCCESS;
|
||||||
|
|
||||||
constructor(public feature: Feature) { }
|
constructor(public feature: Feature<Geometry>) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
export class UpdateFeatureSuccess implements Action {
|
export class UpdateFeatureSuccess implements Action {
|
||||||
readonly type = UPDATEFEATURESUCCESS;
|
readonly type = UPDATEFEATURESUCCESS;
|
||||||
|
|
||||||
constructor(public feature: Feature) { }
|
constructor(public feature: Feature<Geometry>) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ExpandSearch implements Action {
|
export class ExpandSearch implements Action {
|
||||||
@@ -180,6 +201,12 @@ export class AddLayer implements Action {
|
|||||||
constructor(public item:IItem,public layerIndex=-1) { }
|
constructor(public item:IItem,public layerIndex=-1) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class SetSelectedItemLayer implements Action {
|
||||||
|
readonly type = SETSELECTEDITEMLAYER;
|
||||||
|
|
||||||
|
constructor(public item:IItem,public layerIndex=-1) { }
|
||||||
|
}
|
||||||
|
|
||||||
export class SetVisibility implements Action {
|
export class SetVisibility implements Action {
|
||||||
readonly type = SETVISIBILITY;
|
readonly type = SETVISIBILITY;
|
||||||
|
|
||||||
@@ -204,6 +231,12 @@ export class RemoveLayer implements Action {
|
|||||||
constructor(public itemLayer: IItemLayer) { }
|
constructor(public itemLayer: IItemLayer) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class ClearLayers implements Action {
|
||||||
|
readonly type = CLEARLAYERS;
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
}
|
||||||
|
|
||||||
export class LoadBaseLayers implements Action {
|
export class LoadBaseLayers implements Action {
|
||||||
readonly type = LOADBASELAYERS;
|
readonly type = LOADBASELAYERS;
|
||||||
|
|
||||||
@@ -237,13 +270,13 @@ export class ZoomToExtent implements Action {
|
|||||||
export class DoQuery implements Action {
|
export class DoQuery implements Action {
|
||||||
readonly type = DOQUERY;
|
readonly type = DOQUERY;
|
||||||
|
|
||||||
constructor(public query:IQueryState) { }
|
constructor(public query:IQueryState,public replace:boolean = false) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SetStyle implements Action {
|
export class SetStyle implements Action {
|
||||||
readonly type = SETSTYLE;
|
readonly type = SETSTYLE;
|
||||||
|
|
||||||
constructor(public itemType:string,public style: Style | (Feature)) { }
|
constructor(public itemType:string,public style: Style | ((feature:Feature<Geometry>) => Style )) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ShowLayerSwitcher implements Action {
|
export class ShowLayerSwitcher implements Action {
|
||||||
@@ -256,6 +289,46 @@ export class SetReplaceUrl implements Action {
|
|||||||
constructor(public replaceUrl:boolean) {}
|
constructor(public replaceUrl:boolean) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class SetFeatures implements Action {
|
||||||
|
readonly type = SETFEATURES;
|
||||||
|
|
||||||
|
constructor(public features: Array<Feature<Geometry>>) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SetLayerValuesLocation implements Action {
|
||||||
|
readonly type = SETLAYERVALUESLOCATION;
|
||||||
|
|
||||||
|
constructor(public x:number, public y:number) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ToggleLayerValuesEnabled implements Action {
|
||||||
|
readonly type = TOGGLELAYERVALUESENABLED;
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
}
|
||||||
|
|
||||||
|
export class GetLayerValue implements Action {
|
||||||
|
readonly type = GETLAYERVALUE;
|
||||||
|
|
||||||
|
constructor(public itemLayer:IItemLayer,public x:number,public y:number) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
export class GetLayerValueSuccess implements Action {
|
||||||
|
readonly type = GETLAYERVALUESUCCESS;
|
||||||
|
|
||||||
|
constructor(public layervalue:ILayervalue) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
export class ToggleShowDataLayerSlide implements Action {
|
||||||
|
readonly type = TOGGLESHOWDATALAYERSLIDE;
|
||||||
|
constructor() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SetViewState implements Action {
|
||||||
|
readonly type = SETVIEWSTATE;
|
||||||
|
constructor(public enabled:boolean) {}
|
||||||
|
}
|
||||||
|
|
||||||
export type Actions = SetMapState
|
export type Actions = SetMapState
|
||||||
| Init
|
| Init
|
||||||
| Clear
|
| Clear
|
||||||
@@ -278,6 +351,7 @@ export type Actions = SetMapState
|
|||||||
| SetTimeSpan
|
| SetTimeSpan
|
||||||
| AddLayer
|
| AddLayer
|
||||||
| RemoveLayer
|
| RemoveLayer
|
||||||
|
| ClearLayers
|
||||||
| SetVisibility
|
| SetVisibility
|
||||||
| SetOpacity
|
| SetOpacity
|
||||||
| SetLayerIndex
|
| SetLayerIndex
|
||||||
@@ -291,5 +365,14 @@ export type Actions = SetMapState
|
|||||||
| DoQuery
|
| DoQuery
|
||||||
| SetStyle
|
| SetStyle
|
||||||
| ShowLayerSwitcher
|
| ShowLayerSwitcher
|
||||||
| SetReplaceUrl;
|
| SetReplaceUrl
|
||||||
|
| SetFeatures
|
||||||
|
| SetSelectedItemLayer
|
||||||
|
| SetLayerValuesLocation
|
||||||
|
| ToggleLayerValuesEnabled
|
||||||
|
| GetLayerValueSuccess
|
||||||
|
| GetLayerValue
|
||||||
|
| SetPeriod
|
||||||
|
| ToggleShowDataLayerSlide
|
||||||
|
| SetViewState;
|
||||||
|
|
||||||
|
|||||||
@@ -5,21 +5,21 @@ import { AuthGuard } from '@farmmaps/common';
|
|||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: '', children: [
|
path: '',
|
||||||
{
|
component: MapComponent
|
||||||
path: '',
|
|
||||||
component: MapComponent
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: ':xCenter/:yCenter/:zoom/:rotation/:baseLayer/:queryState', children: [
|
path: ':xCenter/:yCenter/:zoom/:rotation/:baseLayer',
|
||||||
{
|
component: MapComponent
|
||||||
path: '',
|
},
|
||||||
component: MapComponent
|
{
|
||||||
}
|
path: ':xCenter/:yCenter/:zoom/:rotation/:baseLayer/:queryState',
|
||||||
]
|
component: MapComponent
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
path: ':queryState',
|
||||||
|
component: MapComponent
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ import * as mapEffects from './effects/map.effects';
|
|||||||
|
|
||||||
import { IMapState} from './models/map.state';
|
import { IMapState} from './models/map.state';
|
||||||
import { ISelectedFeatures } from './models/selected.features';
|
import { ISelectedFeatures } from './models/selected.features';
|
||||||
import { IItemLayer } from './models/item.layer';
|
import { IItemLayer,ItemLayer,ITemporalItemLayer,TemporalItemLayer } from './models/item.layer';
|
||||||
import { ItemLayer} from './models/item.layer';
|
import { IClickedFeature } from './models/clicked.feature';
|
||||||
import { IPeriodState } from './models/period.state';
|
import { IPeriodState } from './models/period.state';
|
||||||
|
|
||||||
// components
|
// components
|
||||||
@@ -59,6 +59,7 @@ import { LayerVectorImageComponent } from './components/aol/layer-vector-image/l
|
|||||||
import {FeatureIconService} from './services/feature-icon.service';
|
import {FeatureIconService} from './services/feature-icon.service';
|
||||||
import { GeolocationService } from './services/geolocation.service';
|
import { GeolocationService } from './services/geolocation.service';
|
||||||
import {DeviceOrientationService} from './services/device-orientation.service';
|
import {DeviceOrientationService} from './services/device-orientation.service';
|
||||||
|
import { TemporalService} from './services/temporal.service';
|
||||||
import { WidgetStatusComponent } from './components/widget-status/widget-status.component';
|
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';
|
||||||
@@ -68,6 +69,10 @@ import { PanToLocation} from './components/aol/pan-to-location/pan-to-location.c
|
|||||||
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 {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 { ZoomToShowAlert} from './components/zoom-to-show-alert/zoom-to-show-alert.component';
|
||||||
|
import { LayerValuesComponent } from './components/aol/layer-values/layer-values.component';
|
||||||
|
import { GeometryThumbnailComponent } from './components/feature-thumbnail/feature-thumbnail.component';
|
||||||
|
|
||||||
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) {
|
||||||
@@ -78,9 +83,17 @@ export function LocalStorageSync(reducer: ActionReducer<any>): ActionReducer<any
|
|||||||
if(ms) {
|
if(ms) {
|
||||||
r2["mapState"] = JSON.parse(ms);
|
r2["mapState"] = JSON.parse(ms);
|
||||||
}
|
}
|
||||||
|
let sp = window.localStorage.getItem(MODULE_NAME+"_searchPeriod");
|
||||||
|
if(sp) {
|
||||||
|
let p = JSON.parse(sp);
|
||||||
|
r2["period"] = { startDate: new Date(Date.parse(p.startDate)),endDate:new Date(Date.parse(p.endDate))};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(action.type == "[Map] MapState" || action.type == "[Map] SetState") {
|
if(action.type == "[Map] MapState" || action.type == "[Map] SetState") {
|
||||||
window.localStorage.setItem(MODULE_NAME + "_mapState",JSON.stringify(r2["mapState"]));
|
window.localStorage.setItem(MODULE_NAME + "_mapState",JSON.stringify(r2["mapState"]));
|
||||||
|
}
|
||||||
|
if(action.type == "[Map] SetPeriod" ) {
|
||||||
|
window.localStorage.setItem(MODULE_NAME + "_searchPeriod",JSON.stringify(r2["period"]));
|
||||||
}
|
}
|
||||||
|
|
||||||
return r2;
|
return r2;
|
||||||
@@ -138,6 +151,7 @@ export {
|
|||||||
FeatureIconService,
|
FeatureIconService,
|
||||||
GeolocationService,
|
GeolocationService,
|
||||||
DeviceOrientationService,
|
DeviceOrientationService,
|
||||||
|
TemporalService,
|
||||||
IMapState,
|
IMapState,
|
||||||
ISelectedFeatures,
|
ISelectedFeatures,
|
||||||
IItemLayer,
|
IItemLayer,
|
||||||
@@ -146,136 +160,130 @@ export {
|
|||||||
ForChild,
|
ForChild,
|
||||||
ForItemType,
|
ForItemType,
|
||||||
ForSourceTask,
|
ForSourceTask,
|
||||||
ForPackage
|
ForPackage ,
|
||||||
|
ITemporalItemLayer,
|
||||||
|
TemporalItemLayer,
|
||||||
|
ifZoomToShowDirective,
|
||||||
|
ZoomToShowAlert,
|
||||||
|
IClickedFeature,
|
||||||
|
GeometryThumbnailComponent
|
||||||
}
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
AngularOpenlayersModule,
|
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]),
|
||||||
NgbModule,
|
NgbModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
AppCommonModule
|
AppCommonModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
ZoomToExtentComponent,
|
ZoomToExtentComponent,
|
||||||
ItemVectorSourceComponent,
|
ItemVectorSourceComponent,
|
||||||
ItemLayersComponent,
|
ItemLayersComponent,
|
||||||
FileDropTargetComponent,
|
FileDropTargetComponent,
|
||||||
MapComponent,
|
MapComponent,
|
||||||
MetaDataModalComponent,
|
MetaDataModalComponent,
|
||||||
RotationResetComponent,
|
RotationResetComponent,
|
||||||
MapSearchComponent,
|
MapSearchComponent,
|
||||||
SelectPeriodModalComponent,
|
SelectPeriodModalComponent,
|
||||||
LayerListComponent,
|
LayerListComponent,
|
||||||
LegendComponent,
|
LegendComponent,
|
||||||
LayerVectorImageComponent,
|
LayerVectorImageComponent,
|
||||||
FeatureListComponent,
|
FeatureListComponent,
|
||||||
WidgetHostDirective,
|
WidgetHostDirective,
|
||||||
FeatureListContainerComponent,
|
FeatureListContainerComponent,
|
||||||
FeatureListCroppingschemeComponent,
|
FeatureListCroppingschemeComponent,
|
||||||
FeatureListCropfieldComponent,
|
FeatureListCropfieldComponent,
|
||||||
FeatureListFeatureContainerComponent,
|
FeatureListFeatureContainerComponent,
|
||||||
FeatureListFeatureComponent,
|
FeatureListFeatureComponent,
|
||||||
FeatureListFeatureCroppingschemeComponent,
|
FeatureListFeatureCroppingschemeComponent,
|
||||||
FeatureListFeatureCropfieldComponent,
|
FeatureListFeatureCropfieldComponent,
|
||||||
SelectedItemContainerComponent,
|
SelectedItemContainerComponent,
|
||||||
SelectedItemComponent,
|
SelectedItemComponent,
|
||||||
SelectedItemCropfieldComponent,
|
SelectedItemCropfieldComponent,
|
||||||
SelectedItemGeotiffComponent,
|
SelectedItemGeotiffComponent,
|
||||||
SelectedItemTemporalComponent,
|
SelectedItemTemporalComponent,
|
||||||
SelectedItemShapeComponent,
|
SelectedItemShapeComponent,
|
||||||
ItemListItemComponent,
|
ItemListItemComponent,
|
||||||
ItemListItemContainerComponent,
|
ItemListItemContainerComponent,
|
||||||
ItemListComponent,
|
ItemListComponent,
|
||||||
ItemWidgetListComponent,
|
ItemWidgetListComponent,
|
||||||
WidgetStatusComponent,
|
WidgetStatusComponent,
|
||||||
GpsLocation,
|
GpsLocation,
|
||||||
PanToLocation,
|
PanToLocation,
|
||||||
LayerSwitcher,
|
LayerSwitcher,
|
||||||
HistogramDetailsComponent,
|
HistogramDetailsComponent,
|
||||||
StatisticsDetailsComponent
|
StatisticsDetailsComponent,
|
||||||
],
|
ifZoomToShowDirective,
|
||||||
entryComponents: [
|
ZoomToShowAlert,
|
||||||
FeatureListComponent,
|
LayerValuesComponent,
|
||||||
FeatureListCroppingschemeComponent,
|
GeometryThumbnailComponent
|
||||||
FeatureListCropfieldComponent,
|
],
|
||||||
FeatureListFeatureComponent,
|
exports: [
|
||||||
FeatureListFeatureCroppingschemeComponent,
|
ItemVectorSourceComponent,
|
||||||
FeatureListFeatureCropfieldComponent,
|
ItemLayersComponent,
|
||||||
SelectedItemComponent,
|
FileDropTargetComponent,
|
||||||
SelectedItemCropfieldComponent,
|
MetaDataModalComponent,
|
||||||
SelectedItemGeotiffComponent,
|
MapComponent,
|
||||||
SelectedItemTemporalComponent,
|
GpsLocation,
|
||||||
SelectedItemShapeComponent,
|
PanToLocation,
|
||||||
ItemListComponent,
|
LayerSwitcher,
|
||||||
ItemListItemComponent,
|
FeatureListFeatureComponent,
|
||||||
],
|
FeatureListFeatureCropfieldComponent,
|
||||||
exports: [
|
FeatureListFeatureCroppingschemeComponent,
|
||||||
ItemVectorSourceComponent,
|
SelectedItemContainerComponent,
|
||||||
ItemLayersComponent,
|
SelectedItemComponent,
|
||||||
FileDropTargetComponent,
|
SelectedItemCropfieldComponent,
|
||||||
MetaDataModalComponent,
|
SelectedItemGeotiffComponent,
|
||||||
MapComponent,
|
SelectedItemTemporalComponent,
|
||||||
GpsLocation,
|
SelectedItemShapeComponent,
|
||||||
PanToLocation,
|
ItemListItemComponent,
|
||||||
LayerSwitcher,
|
ItemListItemContainerComponent,
|
||||||
FeatureListFeatureComponent,
|
ItemListComponent,
|
||||||
FeatureListFeatureCropfieldComponent,
|
ItemWidgetListComponent,
|
||||||
FeatureListFeatureCroppingschemeComponent,
|
WidgetStatusComponent,
|
||||||
SelectedItemContainerComponent,
|
RotationResetComponent,
|
||||||
SelectedItemComponent,
|
MapSearchComponent,
|
||||||
SelectedItemCropfieldComponent,
|
SelectPeriodModalComponent,
|
||||||
SelectedItemGeotiffComponent,
|
LayerListComponent,
|
||||||
SelectedItemTemporalComponent,
|
LegendComponent,
|
||||||
SelectedItemShapeComponent,
|
LayerVectorImageComponent,
|
||||||
ItemListItemComponent,
|
FeatureListComponent,
|
||||||
ItemListItemContainerComponent,
|
WidgetHostDirective,
|
||||||
ItemListComponent,
|
FeatureListContainerComponent,
|
||||||
ItemWidgetListComponent,
|
FeatureListCroppingschemeComponent,
|
||||||
WidgetStatusComponent,
|
FeatureListCropfieldComponent,
|
||||||
RotationResetComponent,
|
FeatureListFeatureContainerComponent,
|
||||||
MapSearchComponent,
|
ZoomToExtentComponent,
|
||||||
SelectPeriodModalComponent,
|
ifZoomToShowDirective,
|
||||||
LayerListComponent,
|
ZoomToShowAlert,
|
||||||
LegendComponent,
|
GeometryThumbnailComponent
|
||||||
LayerVectorImageComponent,
|
],
|
||||||
FeatureListComponent,
|
providers: [
|
||||||
WidgetHostDirective,
|
FeatureIconService,
|
||||||
FeatureListContainerComponent,
|
GeolocationService,
|
||||||
FeatureListCroppingschemeComponent,
|
DeviceOrientationService,
|
||||||
FeatureListCropfieldComponent,
|
TemporalService,
|
||||||
FeatureListFeatureContainerComponent,
|
{ provide: AbstractFeatureListComponent, useClass: FeatureListCroppingschemeComponent, multi: true },
|
||||||
ZoomToExtentComponent
|
{ provide: AbstractFeatureListComponent, useClass: FeatureListCropfieldComponent, multi: true },
|
||||||
]
|
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureComponent, multi: true },
|
||||||
|
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCroppingschemeComponent, multi: true },
|
||||||
|
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCropfieldComponent, multi: true },
|
||||||
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemComponent, multi: true },
|
||||||
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemCropfieldComponent, multi: true },
|
||||||
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemGeotiffComponent, multi: true },
|
||||||
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemTemporalComponent, multi: true },
|
||||||
|
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemShapeComponent, multi: true },
|
||||||
|
{ provide: AbstractItemListItemComponent, useClass: ItemListItemComponent, multi: true },
|
||||||
|
{ provide: AbstractItemListComponent, useClass: ItemListComponent, multi: true }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
export class AppCommonMapModule {
|
export class AppCommonMapModule {
|
||||||
static forRoot(): ModuleWithProviders<AppCommonMapModule> {
|
|
||||||
return {
|
|
||||||
ngModule: AppCommonMapModule,
|
|
||||||
providers: [
|
|
||||||
FeatureIconService,
|
|
||||||
GeolocationService,
|
|
||||||
DeviceOrientationService,
|
|
||||||
{ provide: AbstractFeatureListComponent, useClass: FeatureListCroppingschemeComponent, multi: true },
|
|
||||||
{ provide: AbstractFeatureListComponent, useClass: FeatureListCropfieldComponent, multi: true },
|
|
||||||
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureComponent, multi: true },
|
|
||||||
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCroppingschemeComponent, multi: true },
|
|
||||||
{ provide: AbstractFeatureListFeatureComponent, useClass: FeatureListFeatureCropfieldComponent, multi: true },
|
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemComponent, multi: true },
|
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemCropfieldComponent, multi: true },
|
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemGeotiffComponent, multi: true },
|
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemTemporalComponent, multi: true },
|
|
||||||
{ provide: AbstractSelectedItemComponent, useClass: SelectedItemShapeComponent, multi: true },
|
|
||||||
{ provide: AbstractItemListItemComponent, useClass: ItemListItemComponent, multi: true },
|
|
||||||
{ provide: AbstractItemListComponent, useClass: ItemListComponent, multi: true }
|
|
||||||
]
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -4,7 +4,7 @@ import { MapComponent } from 'ngx-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';
|
||||||
import { GeoJSON } from 'ol/format';
|
import { GeoJSON } from 'ol/format';
|
||||||
import { Feature } from 'ol';
|
import { Feature} from 'ol';
|
||||||
|
|
||||||
export interface IDroppedFile {
|
export interface IDroppedFile {
|
||||||
files: any,
|
files: any,
|
||||||
@@ -21,7 +21,7 @@ export class FileDropTargetComponent implements OnInit, OnDestroy {
|
|||||||
element: Element;
|
element: Element;
|
||||||
@Output() onFileDropped = new EventEmitter<IDroppedFile>();
|
@Output() onFileDropped = new EventEmitter<IDroppedFile>();
|
||||||
@Input() parentCode: string;
|
@Input() parentCode: string;
|
||||||
@Input() features: Array<Feature>;
|
@Input() features: Array<Feature<Geometry>>;
|
||||||
|
|
||||||
constructor(private map: MapComponent) {
|
constructor(private map: MapComponent) {
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -6,8 +6,8 @@
|
|||||||
<stop offset="100%" class="stop2" />
|
<stop offset="100%" class="stop2" />
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
<circle class="tolerance" cx="500" cy="500" stroke="none" [attr.r]="locTolerancePixels" />
|
<circle class="tolerance hidden" [ngClass]="{'hidden':!showTolerance}" cx="500" cy="500" stroke="none" [attr.r]="locTolerancePixels" />
|
||||||
<path *ngIf="showHeading" class="heading" stroke="none" [attr.d]="path" fill="url(#grad1)" [attr.transform]="rotate"></path>
|
<path class="heading hidden" [ngClass]="{'hidden': !showHeading }" stroke="none" [attr.d]="path" fill="url(#grad1)" [attr.transform]="rotate"></path>
|
||||||
<circle class="border" cx="500" cy="500" r="7" stroke="none" />
|
<circle class="border" cx="500" cy="500" r="7" stroke="none" />
|
||||||
<circle class="center" cx="500" cy="500" r="6" stroke="none" />
|
<circle class="center" cx="500" cy="500" r="6" stroke="none" />
|
||||||
|
|
||||||
|
|||||||
@@ -9,11 +9,19 @@
|
|||||||
stroke-width: 0;
|
stroke-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.heading.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.tolerance {
|
.tolerance {
|
||||||
fill: $primary;
|
fill: $primary;
|
||||||
fill-opacity:0.4;
|
fill-opacity:0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tolerance.hidden {
|
||||||
|
display: none
|
||||||
|
}
|
||||||
|
|
||||||
.border {
|
.border {
|
||||||
fill: $white;
|
fill: $white;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-5
@@ -1,6 +1,6 @@
|
|||||||
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 'ngx-openlayers';
|
||||||
import Overlay from 'ol/Overlay';
|
import Overlay from 'ol/Overlay';
|
||||||
import { fromLonLat, toLonLat } from 'ol/proj';
|
import { fromLonLat, toLonLat } from 'ol/proj';
|
||||||
|
|
||||||
|
|
||||||
@@ -13,10 +13,11 @@ export class GpsLocation implements OnInit,OnChanges{
|
|||||||
|
|
||||||
@Input() enable:boolean;
|
@Input() enable:boolean;
|
||||||
public instance: Overlay;
|
public instance: Overlay;
|
||||||
@Input() position: Position;
|
@Input() position: GeolocationPosition;
|
||||||
@Input() location: number[]=[0,0];
|
@Input() location: number[]=[0,0];
|
||||||
@Input() locationTolerance: number = 0;
|
@Input() locationTolerance: number = 0;
|
||||||
@Input() showHeading: boolean = false;
|
@Input() showHeading: boolean = false;
|
||||||
|
@Input() showTolerance: boolean = false;
|
||||||
@Input() heading: number = 0;
|
@Input() heading: number = 0;
|
||||||
@Input() headingTolerance: number = 0;
|
@Input() headingTolerance: number = 0;
|
||||||
public locTolerancePixels: number = 0;
|
public locTolerancePixels: number = 0;
|
||||||
@@ -26,7 +27,7 @@ export class GpsLocation implements OnInit,OnChanges{
|
|||||||
initialized:boolean = false;
|
initialized:boolean = false;
|
||||||
@ViewChild('location', { static: true }) locationElement: ElementRef;
|
@ViewChild('location', { static: true }) locationElement: ElementRef;
|
||||||
|
|
||||||
constructor(@Host() private map: MapComponent) {
|
constructor(private map: MapComponent) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +52,7 @@ export class GpsLocation implements OnInit,OnChanges{
|
|||||||
this.rotate = "rotate(" + Math.round(this.heading) + " 500 500)";
|
this.rotate = "rotate(" + Math.round(this.heading) + " 500 500)";
|
||||||
this.locTolerancePixels = this.locationTolerance;
|
this.locTolerancePixels = this.locationTolerance;
|
||||||
this.map.instance.addOverlay(this.instance);
|
this.map.instance.addOverlay(this.instance);
|
||||||
this.map.instance.getView().on('change:resolution', (evt) => {
|
this.map.instance.getView().on('change:resolution', (evt:any) => {
|
||||||
this.resolution = evt.target.get('resolution');
|
this.resolution = evt.target.get('resolution');
|
||||||
this.recalcLocationTolerance();
|
this.recalcLocationTolerance();
|
||||||
});
|
});
|
||||||
@@ -60,7 +61,7 @@ export class GpsLocation implements OnInit,OnChanges{
|
|||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
if (changes.position && this.instance) {
|
if (changes.position && this.instance) {
|
||||||
var p = changes.position.currentValue as Position;
|
var p = changes.position.currentValue as GeolocationPosition;
|
||||||
if(p && this.initialized) {
|
if(p && this.initialized) {
|
||||||
this.instance.setPosition(fromLonLat([p.coords.longitude, p.coords.latitude]));
|
this.instance.setPosition(fromLonLat([p.coords.longitude, p.coords.latitude]));
|
||||||
this.locationTolerance = p.coords.accuracy;
|
this.locationTolerance = p.coords.accuracy;
|
||||||
|
|||||||
+229
-53
@@ -1,23 +1,24 @@
|
|||||||
import { Component, Host, Input, Output, EventEmitter, Optional, QueryList, OnInit, AfterViewInit, OnChanges, SimpleChanges, SkipSelf, forwardRef, Inject, InjectionToken } from '@angular/core';
|
import { Component, Host, Input, Output, EventEmitter,OnDestroy, OnInit, OnChanges, SimpleChanges, forwardRef } from '@angular/core';
|
||||||
import { HttpClient } from "@angular/common/http";
|
import { LayerGroupComponent, MapComponent } from 'ngx-openlayers';
|
||||||
import { LayerVectorComponent, LayerTileComponent, LayerGroupComponent, MapComponent } from 'ngx-openlayers';
|
|
||||||
import { ItemService,IItem,AppConfig } from '@farmmaps/common';
|
import { ItemService,IItem,AppConfig } from '@farmmaps/common';
|
||||||
import { IItemLayer,ItemLayer, ITemporalItemLayer} from '../../../models/item.layer';
|
import { IItemLayer, ITemporalItemLayer} from '../../../models/item.layer';
|
||||||
import { ILayerData} from '../../../models/layer.data';
|
import { ILayerData} from '../../../models/layer.data';
|
||||||
import { IRenderoutputTiles,IRenderoutputImage,IGradientstop,ILayer,IHistogram} from '../../../models/color.map';
|
import { IRenderoutputTiles,IRenderoutputImage,IGradientstop,ILayer,IHistogram,IColor} from '../../../models/color.map';
|
||||||
import {Extent} from 'ol/extent';
|
import {Extent} from 'ol/extent';
|
||||||
import Projection from 'ol/proj/Projection';
|
import Projection from 'ol/proj/Projection';
|
||||||
import * as proj from 'ol/proj';
|
import * as proj from 'ol/proj';
|
||||||
import * as loadingstrategy from 'ol/loadingstrategy';
|
import * as loadingstrategy from 'ol/loadingstrategy';
|
||||||
import * as style from 'ol/style';
|
import * as style from 'ol/style';
|
||||||
import {Tile,Layer,Image} from 'ol/layer';
|
import {Tile,Layer,Image} from 'ol/layer';
|
||||||
import {XYZ,ImageStatic,OSM,BingMaps,TileWMS,TileArcGISRest,TileJSON} from 'ol/source';
|
import {XYZ,ImageStatic,OSM,BingMaps,TileWMS,TileArcGISRest,TileJSON,Source} from 'ol/source';
|
||||||
import {Vector as VectorSource} from 'ol/source';
|
import {Vector as VectorSource} from 'ol/source';
|
||||||
import { Vector as VectorLayer } from 'ol/layer';
|
import { Vector as VectorLayer } from 'ol/layer';
|
||||||
|
import { VectorImage as VectorImageLayer } from 'ol/layer';
|
||||||
import VectorTileSource from 'ol/source/VectorTile';
|
import VectorTileSource from 'ol/source/VectorTile';
|
||||||
import VectorTileLayer from 'ol/layer/VectorTile';
|
import VectorTileLayer from 'ol/layer/VectorTile';
|
||||||
import {GeoJSON,MVT} from 'ol/format';
|
import {GeoJSON,MVT} from 'ol/format';
|
||||||
import { from } from 'rxjs';
|
import { Geometry } from 'ol/geom';
|
||||||
|
import BaseLayer from 'ol/layer/Base';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-item-layers',
|
selector: 'fm-map-item-layers',
|
||||||
@@ -27,13 +28,20 @@ import { from } from 'rxjs';
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
export class ItemLayersComponent extends LayerGroupComponent implements OnChanges, OnInit {
|
export class ItemLayersComponent extends LayerGroupComponent implements OnChanges, OnInit,OnDestroy {
|
||||||
@Input() itemLayers: IItemLayer[];
|
@Input() itemLayers: IItemLayer[];
|
||||||
@Input() itemLayer: IItemLayer;
|
@Input() itemLayer: IItemLayer;
|
||||||
|
@Output() onFeatureSelected: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
@Output() onFeatureHover: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
@Output() onPrerender: EventEmitter<any> = new EventEmitter<any>();
|
||||||
private _apiEndPoint: string;
|
private _apiEndPoint: string;
|
||||||
private initialized:boolean = false;
|
private initialized:boolean = false;
|
||||||
|
private mapEventHandlerInstalled = false;
|
||||||
constructor(private itemService: ItemService, @Host() private map: MapComponent, public appConfig: AppConfig) {
|
private topLayerPrerenderEventhandlerInstalled = false;
|
||||||
|
private selectedFeatures = {};
|
||||||
|
private selectionLayer:Layer<Source> = null;
|
||||||
|
|
||||||
|
constructor(private itemService: ItemService, private map: MapComponent, public appConfig: AppConfig) {
|
||||||
super(map);
|
super(map);
|
||||||
this._apiEndPoint = appConfig.getConfig("apiEndPoint");
|
this._apiEndPoint = appConfig.getConfig("apiEndPoint");
|
||||||
}
|
}
|
||||||
@@ -49,11 +57,8 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
return "#" + this.componentToHex(r) + this.componentToHex(g) + this.componentToHex(b) + this.componentToHex(a);
|
return "#" + this.componentToHex(r) + this.componentToHex(g) + this.componentToHex(b) + this.componentToHex(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
getColorFromGradient(item:IItem,layer: ILayer, feature): style.Style {
|
getColorFromGradient(layer: ILayer, value: number): IColor {
|
||||||
var value = layer.indexKey ? feature.get(layer.indexKey): feature.get(layer.name);
|
var gradient: IGradientstop[] = layer.renderer.colorMap.gradient;
|
||||||
var key = item.code + "_" + value;
|
|
||||||
if(!this.styleCache[key]) {
|
|
||||||
var gradient: IGradientstop[] = layer.renderer.colorMap.gradient;
|
|
||||||
var histogram: IHistogram = layer.renderer.band.histogram;
|
var histogram: IHistogram = layer.renderer.band.histogram;
|
||||||
var index = (value - histogram.min) / histogram.max;
|
var index = (value - histogram.min) / histogram.max;
|
||||||
var min = gradient[0];
|
var min = gradient[0];
|
||||||
@@ -65,34 +70,63 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
}
|
}
|
||||||
var i = index - min.relativestop;
|
var i = index - min.relativestop;
|
||||||
var size = max.relativestop - min.relativestop;
|
var size = max.relativestop - min.relativestop;
|
||||||
var alpha = Math.round( min.color.alpha + ((max.color.alpha - min.color.alpha) * i / size));
|
var alpha = Math.round(min.color.alpha + ((max.color.alpha - min.color.alpha) * i / size));
|
||||||
var red = Math.round(min.color.red + ((max.color.red - min.color.red) * i / size));
|
var red = Math.round(min.color.red + ((max.color.red - min.color.red) * i / size));
|
||||||
var green = Math.round(min.color.green + ((max.color.green - min.color.green) * i / size));
|
var green = Math.round(min.color.green + ((max.color.green - min.color.green) * i / size));
|
||||||
var blue = Math.round(min.color.blue + ((max.color.blue - min.color.blue) * i / size));
|
var blue = Math.round(min.color.blue + ((max.color.blue - min.color.blue) * i / size));
|
||||||
|
|
||||||
this.styleCache[key] = new style.Style(
|
return { alpha: alpha, red: red, green: green, blue: blue };
|
||||||
{
|
}
|
||||||
image: new style.Circle({
|
|
||||||
fill: new style.Fill({
|
getColorForValue(layer: ILayer, value: number): IColor {
|
||||||
color: this.rgbaToHex(red,green,blue,alpha)
|
var color: IColor = { alpha:0,red:0,green:0,blue:0};
|
||||||
|
if(layer.renderer.colorMap.entries.length>0) {
|
||||||
|
color=layer.renderer.colorMap.noValue;
|
||||||
|
}
|
||||||
|
layer.renderer.colorMap.entries.forEach((entry) => {
|
||||||
|
if(entry.value==value) {
|
||||||
|
color =entry.color;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
getColor(item: IItem, layer: ILayer, feature): style.Style {
|
||||||
|
var value = layer.indexKey ? feature.get(layer.indexKey) : feature.get(layer.name);
|
||||||
|
var key = item.code + "_" + value;
|
||||||
|
if (!this.styleCache[key]) {
|
||||||
|
var color: IColor;
|
||||||
|
if(layer.renderer.colorMap.colormapType == "manual") {
|
||||||
|
color = this.getColorForValue(layer, value);
|
||||||
|
} else {
|
||||||
|
color = this.getColorFromGradient(layer, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.styleCache[key] = new style.Style(
|
||||||
|
{
|
||||||
|
image: new style.Circle({
|
||||||
|
fill: new style.Fill({
|
||||||
|
color: this.rgbaToHex(color.red, color.green, color.blue, color.alpha)
|
||||||
|
}),
|
||||||
|
radius: 3
|
||||||
}),
|
}),
|
||||||
radius: 3
|
fill: new style.Fill({
|
||||||
}),
|
color: this.rgbaToHex(color.red, color.green, color.blue, color.alpha)
|
||||||
fill: new style.Fill({
|
}),
|
||||||
color: this.rgbaToHex(red, green, blue, alpha)
|
stroke: new style.Stroke({
|
||||||
}),
|
color: this.rgbaToHex(color.red, color.green, color.blue, 255),
|
||||||
stroke: new style.Stroke({
|
width: 1.25
|
||||||
color: this.rgbaToHex(red, green, blue, 255),
|
}),
|
||||||
width: 1.25
|
});
|
||||||
}),
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
return this.styleCache[key];
|
return this.styleCache[key];
|
||||||
}
|
}
|
||||||
|
|
||||||
createGeotiffLayer(item:IItem,itemLayer:IItemLayer):Layer {
|
createGeotiffLayer(item:IItem,itemLayer:IItemLayer):Layer<Source> {
|
||||||
var layerIndex = -1;
|
var layerIndex = -1;
|
||||||
var layer: Layer = null;
|
var layer: Layer<Source> = null;
|
||||||
layerIndex = itemLayer.layerIndex != -1 ? itemLayer.layerIndex : item.data.layers[0].index;
|
layerIndex = itemLayer.layerIndex != -1 ? itemLayer.layerIndex : item.data.layers[0].index;
|
||||||
let source = new XYZ({ maxZoom: 19, minZoom: 1, url: `${this._apiEndPoint}/api/v1/items/${item.code}/tiles/${layerIndex}/{z}/{x}/{y}.png?v=${Date.parse(item.updated)}` });
|
let source = new XYZ({ maxZoom: 19, minZoom: 1, url: `${this._apiEndPoint}/api/v1/items/${item.code}/tiles/${layerIndex}/{z}/{x}/{y}.png?v=${Date.parse(item.updated)}` });
|
||||||
layer = new Tile({ source: source });
|
layer = new Tile({ source: source });
|
||||||
@@ -105,17 +139,15 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
}
|
}
|
||||||
if (l && l.rendering && l.rendering.renderoutputType == "Image") {
|
if (l && l.rendering && l.rendering.renderoutputType == "Image") {
|
||||||
var ri = l.rendering as IRenderoutputImage;
|
var ri = l.rendering as IRenderoutputImage;
|
||||||
// convert to EPSG:4326 asworkaround for cesium
|
let source = new ImageStatic({ imageExtent:ri.extent,projection:'EPSG:3857', crossOrigin: 'use-credentials', url: `${this._apiEndPoint}/api/v1/items/${item.code}/mapimage/${layerIndex}?v=${Date.parse(item.updated)}` });
|
||||||
var projectedExtent = proj.transformExtent( ri.extent, 'EPSG:3857','EPSG:4326');
|
|
||||||
let source = new ImageStatic({ imageExtent:projectedExtent,projection:'EPSG:4326', crossOrigin: 'use-credentials', url: `${this._apiEndPoint}/api/v1/items/${item.code}/mapimage/${layerIndex}?v=${Date.parse(item.updated)}` });
|
|
||||||
layer = new Image({ source: source });
|
layer = new Image({ source: source });
|
||||||
}
|
}
|
||||||
return layer;
|
return layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
createShapeLayer(item:IItem,itemLayer:IItemLayer):Layer {
|
createShapeLayer(item:IItem,itemLayer:IItemLayer):Layer<Source> {
|
||||||
var layerIndex = -1;
|
var layerIndex = -1;
|
||||||
var layer: Layer = null;
|
var layer: Layer<Source> = null;
|
||||||
layerIndex = itemLayer.layerIndex != -1 ? itemLayer.layerIndex : item.data.layers[0].index;
|
layerIndex = itemLayer.layerIndex != -1 ? itemLayer.layerIndex : item.data.layers[0].index;
|
||||||
var data = item.data;
|
var data = item.data;
|
||||||
var l:ILayer = (data && data.layers && data.layers.length > 0) ? data.layers[layerIndex] : null;
|
var l:ILayer = (data && data.layers && data.layers.length > 0) ? data.layers[layerIndex] : null;
|
||||||
@@ -130,7 +162,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
url: `${this._apiEndPoint}/api/v1/items/${item.code}/vectortiles/{z}/{x}/{y}.pbf?v=${Date.parse(item.updated)}`
|
url: `${this._apiEndPoint}/api/v1/items/${item.code}/vectortiles/{z}/{x}/{y}.pbf?v=${Date.parse(item.updated)}`
|
||||||
}),
|
}),
|
||||||
style: (feature) => {
|
style: (feature) => {
|
||||||
return this.getColorFromGradient(item,l, feature);
|
return this.getColor(item,l, feature);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (l && l.rendering && l.rendering.renderoutputType == "Tiles") {
|
} else if (l && l.rendering && l.rendering.renderoutputType == "Tiles") {
|
||||||
@@ -148,7 +180,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
let source = new VectorSource({
|
let 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) {
|
||||||
var source = this as VectorSource;
|
var source = this as VectorSource<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) {
|
||||||
var features = format.readFeatures(data);
|
var features = format.readFeatures(data);
|
||||||
for (let f of features) {
|
for (let f of features) {
|
||||||
@@ -160,7 +192,8 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
layer = new VectorLayer({
|
layer = new VectorImageLayer({
|
||||||
|
declutter: true,
|
||||||
source: source,
|
source: source,
|
||||||
style: (feature) => {
|
style: (feature) => {
|
||||||
var key =feature.get("code") + "_" + feature.get("color");
|
var key =feature.get("code") + "_" + feature.get("color");
|
||||||
@@ -201,9 +234,39 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
return layer;
|
return layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
createExternalLayer(item:IItem,itemLayer:IItemLayer):Layer {
|
createSelectionLayer(itemLayer:IItemLayer):Layer<Source> {
|
||||||
|
var layerIndex = -1;
|
||||||
|
var layer: Layer<Source> = null;
|
||||||
|
layerIndex = itemLayer.layerIndex != -1 ? itemLayer.layerIndex : itemLayer.item.data.layers[0].index;
|
||||||
|
var data = itemLayer.item.data;
|
||||||
|
var l:ILayer = (data && data.layers && data.layers.length > 0) ? data.layers[layerIndex] : null;
|
||||||
|
if (l && l.rendering && l.rendering.renderoutputType == "VectorTiles") {
|
||||||
|
return new VectorTileLayer({
|
||||||
|
renderMode: 'vector',
|
||||||
|
source: (itemLayer.layer as VectorTileLayer).getSource(),
|
||||||
|
style: (feature) => {
|
||||||
|
if (feature.getId() in this.selectedFeatures) {
|
||||||
|
|
||||||
|
return new style.Style(
|
||||||
|
{
|
||||||
|
stroke: new style.Stroke({
|
||||||
|
color: 'red',
|
||||||
|
width: 2
|
||||||
|
})
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
minZoom: itemLayer.layer.getMinZoom(),
|
||||||
|
maxZoom: itemLayer.layer.getMaxZoom()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
createExternalLayer(item:IItem,itemLayer:IItemLayer):Layer<Source> {
|
||||||
let data = item.data as ILayerData;
|
let data = item.data as ILayerData;
|
||||||
var layer: Layer = null;
|
var layer: Layer<Source> = null;
|
||||||
switch (data.interfaceType) {
|
switch (data.interfaceType) {
|
||||||
case 'OSM': {
|
case 'OSM': {
|
||||||
let source = new OSM();
|
let source = new OSM();
|
||||||
@@ -253,8 +316,8 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
return layer;
|
return layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
createLayer(itemLayer: IItemLayer): Layer {
|
createLayer(itemLayer: IItemLayer): Layer<Source> {
|
||||||
var layer: Layer = null;
|
var layer: Layer<Source> = null;
|
||||||
var layerIndex = -1;
|
var layerIndex = -1;
|
||||||
if (itemLayer.item.itemType == 'vnd.farmmaps.itemtype.geotiff.processed') {
|
if (itemLayer.item.itemType == 'vnd.farmmaps.itemtype.geotiff.processed') {
|
||||||
layer = this.createGeotiffLayer(itemLayer.item,itemLayer);
|
layer = this.createGeotiffLayer(itemLayer.item,itemLayer);
|
||||||
@@ -277,6 +340,9 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
if(this.itemLayers) {
|
if(this.itemLayers) {
|
||||||
this.updateLayers(this.itemLayers);
|
this.updateLayers(this.itemLayers);
|
||||||
} else if(this.itemLayer) {
|
} else if(this.itemLayer) {
|
||||||
|
if(this.getItemlayer(this.itemLayer).item.itemType == 'vnd.farmmaps.itemtype.shape.processed') {
|
||||||
|
this.installMapEventHandler();
|
||||||
|
}
|
||||||
this.updateLayers([this.itemLayer])
|
this.updateLayers([this.itemLayer])
|
||||||
} else {
|
} else {
|
||||||
this.updateLayers([]);
|
this.updateLayers([]);
|
||||||
@@ -284,7 +350,45 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
this.initialized=true;
|
this.initialized=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
addOrUpdateOlLayer(itemLayer:IItemLayer,index:number):Layer {
|
installMapEventHandler() {
|
||||||
|
if(!this.mapEventHandlerInstalled) {
|
||||||
|
this.map.instance.on(['click', 'pointermove'],this.mapEventHandler);
|
||||||
|
this.mapEventHandlerInstalled=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unInstallMapEventHandler() {
|
||||||
|
if(this.mapEventHandlerInstalled) {
|
||||||
|
this.map.instance.un(['click', 'pointermove'],this.mapEventHandler);
|
||||||
|
this.mapEventHandlerInstalled=false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
installTopLayerPrerenderEventhandler(olLayer : Layer<Source>) {
|
||||||
|
if(!this.topLayerPrerenderEventhandlerInstalled && this.onPrerender.observers.length > 0 && olLayer) {
|
||||||
|
if(this.instance.getVisible()) {
|
||||||
|
olLayer.on('prerender',this.topLayerPrerenderEventhandler);
|
||||||
|
olLayer.on('postrender',this.topLayerPostrenderEventhandler);
|
||||||
|
this.topLayerPrerenderEventhandlerInstalled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
unInstallTopLayerPrerenderEventhandler() {
|
||||||
|
if(this.topLayerPrerenderEventhandlerInstalled && this.onPrerender.observers.length > 0 )
|
||||||
|
{
|
||||||
|
if(this.instance.getVisible()) {
|
||||||
|
var olLayers = this.instance.getLayers().getArray().forEach((l:any) => {
|
||||||
|
l.un('prerender',this.topLayerPrerenderEventhandler);
|
||||||
|
l.un('postrender',this.topLayerPostrenderEventhandler);
|
||||||
|
});
|
||||||
|
this.topLayerPrerenderEventhandlerInstalled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
addOrUpdateOlLayer(itemLayer:IItemLayer,index:number):Layer<Source> {
|
||||||
if(!itemLayer) return null;
|
if(!itemLayer) return null;
|
||||||
var olLayers = this.instance.getLayers();
|
var olLayers = this.instance.getLayers();
|
||||||
var layer = itemLayer.layer;
|
var layer = itemLayer.layer;
|
||||||
@@ -308,10 +412,19 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
return layer;
|
return layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateLayers(itemLayers: IItemLayer[]) {
|
updateLayers(itemLayers: IItemLayer[] | IItemLayer) {
|
||||||
let newLayers: IItemLayer[] = [];
|
this.unInstallTopLayerPrerenderEventhandler();
|
||||||
if (itemLayers) {
|
let dataLayer = false;
|
||||||
itemLayers.forEach((itemLayer, index) => {
|
var ils:IItemLayer[] = [];
|
||||||
|
if(Array.isArray(itemLayers)) {
|
||||||
|
ils = itemLayers;
|
||||||
|
} else {
|
||||||
|
dataLayer=true;
|
||||||
|
ils=[itemLayers];
|
||||||
|
}
|
||||||
|
let newLayers: Layer<Source>[] = [];
|
||||||
|
if (ils) {
|
||||||
|
ils.forEach((itemLayer, index) => {
|
||||||
if(itemLayer.item.itemType == 'vnd.farmmaps.itemtype.temporal') {
|
if(itemLayer.item.itemType == 'vnd.farmmaps.itemtype.temporal') {
|
||||||
let il = itemLayer as ITemporalItemLayer;
|
let il = itemLayer as ITemporalItemLayer;
|
||||||
let previousLayer = this.addOrUpdateOlLayer(il.previousItemLayer,newLayers.length);
|
let previousLayer = this.addOrUpdateOlLayer(il.previousItemLayer,newLayers.length);
|
||||||
@@ -320,9 +433,11 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
if(selectedLayer) newLayers.push(selectedLayer);
|
if(selectedLayer) newLayers.push(selectedLayer);
|
||||||
let nextLayer = this.addOrUpdateOlLayer(il.nextItemLayer,newLayers.length);
|
let nextLayer = this.addOrUpdateOlLayer(il.nextItemLayer,newLayers.length);
|
||||||
if(nextLayer) newLayers.push(nextLayer);
|
if(nextLayer) newLayers.push(nextLayer);
|
||||||
|
this.installTopLayerPrerenderEventhandler(selectedLayer);
|
||||||
} else {
|
} else {
|
||||||
let layer = this.addOrUpdateOlLayer(itemLayer,newLayers.length);
|
let layer = this.addOrUpdateOlLayer(itemLayer,newLayers.length);
|
||||||
if(layer) newLayers.push(layer);
|
if(layer) newLayers.push(layer);
|
||||||
|
this.installTopLayerPrerenderEventhandler(layer);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Remove the layers that have disapeared from childrenLayers
|
// Remove the layers that have disapeared from childrenLayers
|
||||||
@@ -330,23 +445,84 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
|
|||||||
while(olLayers.getLength() > newLayers.length) {
|
while(olLayers.getLength() > newLayers.length) {
|
||||||
olLayers.removeAt(newLayers.length);
|
olLayers.removeAt(newLayers.length);
|
||||||
}
|
}
|
||||||
|
this.selectionLayer=null;
|
||||||
|
if(this.mapEventHandlerInstalled && ils.length==1 && this.getItemlayer(itemLayers[0]).item.itemType == 'vnd.farmmaps.itemtype.shape.processed') {
|
||||||
|
this.selectionLayer = this.createSelectionLayer(this.getItemlayer(itemLayers[0]));
|
||||||
|
if(this.selectionLayer) olLayers.push(this.selectionLayer)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
topLayerPrerenderEventhandler = (event) => {
|
||||||
|
this.onPrerender.emit(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
topLayerPostrenderEventhandler = (event) => {
|
||||||
|
const ctx = event.context;
|
||||||
|
ctx.restore();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mapEventHandler = (event) => {
|
||||||
|
// select only when having observers
|
||||||
|
if(event.type === 'click' && !this.onFeatureSelected.observers.length) return;
|
||||||
|
if(event.type === 'pointermove' && !this.onFeatureHover.observers.length) return;
|
||||||
|
let itemLayer= this.getItemlayer(this.itemLayer);
|
||||||
|
if(itemLayer && itemLayer.layer) {
|
||||||
|
this.selectedFeatures = {};
|
||||||
|
if(itemLayer.layer ) {
|
||||||
|
let minZoom = itemLayer.layer.getMinZoom();
|
||||||
|
let currentZoom = this.map.instance.getView().getZoom();
|
||||||
|
if(currentZoom>minZoom) {
|
||||||
|
itemLayer.layer.getFeatures(event.pixel).then((features) => {
|
||||||
|
if(!features.length) {
|
||||||
|
this.onFeatureHover.emit(null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let fid = features[0].getId();
|
||||||
|
let feature = features[0];
|
||||||
|
if(event.type === 'pointermove') {
|
||||||
|
this.selectedFeatures[fid] = features[0];
|
||||||
|
this.onFeatureHover.emit({ "feature": feature,"itemCode":itemLayer.item.code });
|
||||||
|
} else {
|
||||||
|
this.onFeatureSelected.emit({ "feature": feature,"itemCode":itemLayer.item.code });
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(this.selectionLayer) this.selectionLayer.changed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getItemlayer(itemLayer:IItemLayer):IItemLayer {
|
||||||
|
if((itemLayer as ITemporalItemLayer).selectedItemLayer) return (itemLayer as ITemporalItemLayer).selectedItemLayer;
|
||||||
|
return itemLayer;
|
||||||
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
if (this.instance && this.initialized) {
|
if (this.instance && this.initialized) {
|
||||||
if (changes['itemLayers']) {
|
if (changes['itemLayers']) {
|
||||||
var itemLayers = changes['itemLayers'].currentValue as IItemLayer[];
|
var itemLayers = changes['itemLayers'].currentValue as IItemLayer[];
|
||||||
this.updateLayers(itemLayers);
|
this.updateLayers(itemLayers);
|
||||||
}
|
}
|
||||||
if (changes['itemLayer']) {
|
if (changes['itemLayer']) {
|
||||||
var itemLayer = changes['itemLayer'].currentValue as IItemLayer;
|
var itemLayer = changes['itemLayer'].currentValue as IItemLayer;
|
||||||
|
this.itemLayer = itemLayer
|
||||||
if(itemLayer) {
|
if(itemLayer) {
|
||||||
|
if(this.getItemlayer(this.itemLayer).item.itemType == 'vnd.farmmaps.itemtype.shape.processed') {
|
||||||
|
this.installMapEventHandler();
|
||||||
|
}
|
||||||
this.updateLayers([itemLayer]);
|
this.updateLayers([itemLayer]);
|
||||||
} else {
|
} else {
|
||||||
this.updateLayers([]);
|
this.unInstallMapEventHandler();
|
||||||
|
this.updateLayers([]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnDestroy() {
|
||||||
|
this.unInstallMapEventHandler();
|
||||||
|
super.ngOnDestroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+31
-29
@@ -1,16 +1,17 @@
|
|||||||
import { Component, Host, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, forwardRef, Inject, InjectionToken } from '@angular/core';
|
import { Component, Host, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, forwardRef, Inject, InjectionToken } from '@angular/core';
|
||||||
import { LayerVectorComponent, SourceVectorComponent, MapComponent } from 'ngx-openlayers';
|
import { LayerVectorComponent, SourceVectorComponent, MapComponent } from 'ngx-openlayers';
|
||||||
import { ItemService,ItemTypeService,IItem, IItemType } from '@farmmaps/common';
|
import { ItemService,ItemTypeService,IItem, IItemType } from '@farmmaps/common';
|
||||||
|
|
||||||
import { Feature } from 'ol';
|
import { Feature } from 'ol';
|
||||||
import { Point } from 'ol/geom';
|
import { Point,Geometry } from 'ol/geom';
|
||||||
import { MapBrowserEvent } from 'ol';
|
import { MapBrowserEvent } from 'ol';
|
||||||
|
import { Types } from 'ol/MapBrowserEventType';
|
||||||
import * as style from 'ol/style';
|
import * as style from 'ol/style';
|
||||||
import * as color from 'ol/color';
|
import * as color from 'ol/color';
|
||||||
import * as loadingstrategy from 'ol/loadingstrategy';
|
import * as loadingstrategy from 'ol/loadingstrategy';
|
||||||
import * as condition from 'ol/events/condition';
|
import * as condition from 'ol/events/condition';
|
||||||
import * as extent from 'ol/extent';
|
import * as extent from 'ol/extent';
|
||||||
import {Vector,Cluster} from 'ol/source';
|
import {Vector,Cluster,Source} from 'ol/source';
|
||||||
import {Layer} from 'ol/layer';
|
import {Layer} from 'ol/layer';
|
||||||
import {GeoJSON} from 'ol/format';
|
import {GeoJSON} from 'ol/format';
|
||||||
import {Select} from 'ol/interaction';
|
import {Select} from 'ol/interaction';
|
||||||
@@ -25,25 +26,25 @@ import {FeatureIconService} from '../../../services/feature-icon.service';
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class ItemVectorSourceComponent extends SourceVectorComponent implements OnInit, OnChanges {
|
export class ItemVectorSourceComponent extends SourceVectorComponent implements OnInit, OnChanges {
|
||||||
instance: Vector;
|
instance: Vector<Geometry>;
|
||||||
private _format: GeoJSON;
|
private _format: GeoJSON;
|
||||||
private _select: Select;
|
private _select: Select;
|
||||||
private _hoverSelect: Select;
|
private _hoverSelect: Select;
|
||||||
private _iconScale: number = 0.05;
|
private _iconScale: number = 0.05;
|
||||||
@Input() features: Array<Feature>;
|
@Input() features: Array<Feature<Geometry>>;
|
||||||
@Input() selectedFeature: Feature;
|
@Input() selectedFeature: Feature<Geometry>;
|
||||||
@Input() selectedItem: IItem;
|
@Input() selectedItem: IItem;
|
||||||
@Input() styles:IStyles;
|
@Input() styles:IStyles;
|
||||||
@Output() onFeaturesSelected: EventEmitter<Feature> = new EventEmitter<Feature>();
|
@Output() onFeatureSelected: EventEmitter<Feature<Geometry>> = new EventEmitter<Feature<Geometry>>();
|
||||||
@Output() onFeatureHover: EventEmitter<Feature> = new EventEmitter<Feature>();
|
@Output() onFeatureHover: EventEmitter<Feature<Geometry>> = new EventEmitter<Feature<Geometry>>();
|
||||||
private stylesCache:IStyles = {};
|
private stylesCache:IStyles = {};
|
||||||
|
|
||||||
constructor(@Host() private layer: LayerVectorComponent, private itemService: ItemService, @Host() private map: MapComponent, private itemTypeService: ItemTypeService,private featureIconService$:FeatureIconService) {
|
constructor(@Host() private layer: LayerVectorComponent, private itemService: ItemService, private map: MapComponent, private itemTypeService: ItemTypeService,private featureIconService$:FeatureIconService) {
|
||||||
super(layer);
|
super(layer);
|
||||||
this._format = new GeoJSON();
|
this._format = new GeoJSON();
|
||||||
}
|
}
|
||||||
|
|
||||||
geometry(feature: Feature) {
|
geometry(feature: Feature<Geometry>) {
|
||||||
let view = this.map.instance.getView();
|
let view = this.map.instance.getView();
|
||||||
let resolution = view.getResolution();
|
let resolution = view.getResolution();
|
||||||
var geometry = feature.getGeometry();
|
var geometry = feature.getGeometry();
|
||||||
@@ -55,9 +56,9 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
|||||||
return geometry;
|
return geometry;
|
||||||
}
|
}
|
||||||
|
|
||||||
getSelectedStyle(feature:Feature):style.Style {
|
getSelectedStyle(feature:Feature<Geometry>):style.Style {
|
||||||
let key = feature.get('itemType')+"_selected";
|
let key = feature.get('itemType')+"_selected";
|
||||||
let evaluatedStyle =null;
|
let evaluatedStyle: style.Style =undefined;
|
||||||
var styleEntry = this.stylesCache[key];
|
var styleEntry = this.stylesCache[key];
|
||||||
if(styleEntry) {
|
if(styleEntry) {
|
||||||
if(typeof styleEntry === 'function') {
|
if(typeof styleEntry === 'function') {
|
||||||
@@ -66,12 +67,12 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
|||||||
evaluatedStyle = styleEntry;
|
evaluatedStyle = styleEntry;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
evaluatedStyle = this.stylesCache["selected"];
|
evaluatedStyle = this.stylesCache["selected"] as style.Style;
|
||||||
}
|
}
|
||||||
if(evaluatedStyle ) {
|
if(evaluatedStyle ) {
|
||||||
evaluatedStyle.setGeometry((feature) => this.geometry(feature));
|
evaluatedStyle .setGeometry((feature:Feature<Geometry>) => this.geometry(feature));
|
||||||
}
|
}
|
||||||
return evaluatedStyle
|
return evaluatedStyle as style.Style
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -80,25 +81,25 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
|||||||
this._select = new Select({
|
this._select = new Select({
|
||||||
style:null,
|
style:null,
|
||||||
hitTolerance: 10,
|
hitTolerance: 10,
|
||||||
layers: [this.layer.instance as Layer]
|
layers: [this.layer.instance as Layer<Source>]
|
||||||
});
|
});
|
||||||
this._hoverSelect = new Select({
|
this._hoverSelect = new Select({
|
||||||
style: (feature) => {
|
style: (feature:Feature<Geometry>) => {
|
||||||
return this.getSelectedStyle(feature);
|
return this.getSelectedStyle(feature);
|
||||||
},
|
},
|
||||||
hitTolerance: 10,
|
hitTolerance: 10,
|
||||||
condition: (e: MapBrowserEvent) => {
|
condition: (e: MapBrowserEvent<UIEvent>) => {
|
||||||
return e.type == 'pointermove';
|
return e.type == 'pointermove';
|
||||||
},
|
},
|
||||||
layers: [this.layer.instance as Layer]
|
layers: [this.layer.instance as Layer<Source>]
|
||||||
});
|
});
|
||||||
this.map.instance.addInteraction(this._select);
|
this.map.instance.addInteraction(this._select);
|
||||||
this.map.instance.addInteraction(this._hoverSelect);
|
this.map.instance.addInteraction(this._hoverSelect);
|
||||||
this._select.on('select', (e) => {
|
this._select.on('select', (e) => {
|
||||||
if (e.selected.length > 0 && e.selected[0]) {
|
if (e.selected.length > 0 && e.selected[0]) {
|
||||||
this.onFeaturesSelected.emit(e.selected[0]);
|
this.onFeatureSelected.emit(e.selected[0]);
|
||||||
} else {
|
} else {
|
||||||
this.onFeaturesSelected.emit(null);
|
this.onFeatureSelected.emit(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this._hoverSelect.on('select', (e) => {
|
this._hoverSelect.on('select', (e) => {
|
||||||
@@ -112,17 +113,18 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
|||||||
this.host.instance.setSource(this.instance);
|
this.host.instance.setSource(this.instance);
|
||||||
|
|
||||||
this.host.instance.setStyle((feature) => {
|
this.host.instance.setStyle((feature) => {
|
||||||
var key = feature.get('itemType') + (this.selectedItem?"_I":"");
|
var itemType = feature.get('itemType');
|
||||||
|
var key = itemType + (this.selectedItem?"_I":"");
|
||||||
if (!this.stylesCache[key]) {
|
if (!this.stylesCache[key]) {
|
||||||
if (this.itemTypeService.itemTypes[key]) {
|
if (this.itemTypeService.itemTypes[itemType]) {
|
||||||
let itemType = this.itemTypeService.itemTypes[key];
|
let itemTypeEntry = this.itemTypeService.itemTypes[itemType];
|
||||||
let fillColor = color.asArray(itemType.iconColor);
|
let fillColor = color.asArray(itemTypeEntry.iconColor);
|
||||||
fillColor[3] = this.selectedItem?0:0.5;
|
fillColor[3] = 0;
|
||||||
this.stylesCache[key] = new style.Style({
|
this.stylesCache[key] = new style.Style({
|
||||||
image: itemType.icon ? new style.Icon({
|
image: itemTypeEntry.icon ? new style.Icon({
|
||||||
anchor: [0.5, 1],
|
anchor: [0.5, 1],
|
||||||
scale: 0.05,
|
scale: 0.05,
|
||||||
src: this.featureIconService$.getIconImageDataUrl(itemType.icon)
|
src: this.featureIconService$.getIconImageDataUrl(itemTypeEntry.icon)
|
||||||
}):null,
|
}):null,
|
||||||
stroke: new style.Stroke({
|
stroke: new style.Stroke({
|
||||||
color: 'red',
|
color: 'red',
|
||||||
@@ -131,7 +133,7 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
|||||||
fill: new style.Fill({
|
fill: new style.Fill({
|
||||||
color: fillColor
|
color: fillColor
|
||||||
}),
|
}),
|
||||||
geometry:(feature) => this.geometry(feature)
|
geometry:(feature:Feature<Geometry>) => this.geometry(feature)
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
key = 'file';
|
key = 'file';
|
||||||
|
|||||||
@@ -11,13 +11,13 @@
|
|||||||
<a title="Transparency 75%" *ngIf="itemLayer.visible" href="#" class="btn btn-light btn-sm" (click)="handleSetOpacity($event,itemLayer,0.75)">75%</a>
|
<a title="Transparency 75%" *ngIf="itemLayer.visible" href="#" class="btn btn-light btn-sm" (click)="handleSetOpacity($event,itemLayer,0.75)">75%</a>
|
||||||
<a title="No transparency" *ngIf="itemLayer.visible" href="#" class="btn btn-light btn-sm" (click)="handleSetOpacity($event,itemLayer,1)">100%</a>
|
<a title="No transparency" *ngIf="itemLayer.visible" href="#" class="btn btn-light btn-sm" (click)="handleSetOpacity($event,itemLayer,1)">100%</a>
|
||||||
</span>
|
</span>
|
||||||
<a href="#" title="Zoom to extent" class="btn btn-light btn-sm" (click)="handleZoomToExtent($event,itemLayer)"><i class="fa fa-search-plus" aria-hidden="true"></i></a>
|
<a href="#" title="Zoom to extent" class="btn btn-light btn-sm" (click)="handleZoomToExtent($event,itemLayer)"><i class="far fa-search-plus" aria-hidden="true"></i></a>
|
||||||
<span *ngIf="firstLayer(itemLayer)"><a href="#" title="Toggle legend" class="btn btn-light btn-sm" (click)="itemLayer.legendVisible=toggleLegend($event,itemLayer.legendVisible)"><i class="fa fa-bar-chart" aria-hidden="true"></i></a></span>
|
<span *ngIf="firstLayer(itemLayer)"><a href="#" title="Toggle legend" class="btn btn-light btn-sm" (click)="itemLayer.legendVisible=toggleLegend($event,itemLayer.legendVisible)"><i class="far fa-chart-bar" aria-hidden="true"></i></a></span>
|
||||||
<span class="float-right"><a href="#" title="Remove overlay" class="btn btn-light btn-sm" (click)="handleDelete($event,itemLayer)"><i class="fa fa-minus" aria-hidden="true"></i></a></span>
|
<span *ngIf="!dataLayers" class="float-end"><a href="#" title="Remove overlay" class="btn btn-light btn-sm" (click)="handleDelete($event,itemLayer)"><i class="fas fa-layer-minus" aria-hidden="true"></i></a></span>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="itemLayer.legendVisible">
|
<div *ngIf="itemLayer.legendVisible">
|
||||||
<div class="card legend">
|
<div class="card legend">
|
||||||
<fm-map-layer-legend [layer]="firstLayer(itemLayer)" (click)="handleLegendClick($event,itemLayer);"></fm-map-layer-legend>
|
<fm-map-layer-legend [layer]="firstLayer(itemLayer)" (click)="handleLegendClick($event,itemLayer);" [histogramenabled]="true"></fm-map-layer-legend>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { IItemLayer } from '../../../models/item.layer';
|
|||||||
export class LayerListComponent {
|
export class LayerListComponent {
|
||||||
@Input() itemLayers: IItemLayer[] = [];
|
@Input() itemLayers: IItemLayer[] = [];
|
||||||
@Input() baseLayers: boolean = false;
|
@Input() baseLayers: boolean = false;
|
||||||
|
@Input() dataLayers: boolean = false;
|
||||||
@Output() onToggleVisibility = new EventEmitter<IItemLayer>();
|
@Output() onToggleVisibility = new EventEmitter<IItemLayer>();
|
||||||
@Output() onSetOpacity = new EventEmitter<{layer: IItemLayer,opacity:number }>();
|
@Output() onSetOpacity = new EventEmitter<{layer: IItemLayer,opacity:number }>();
|
||||||
@Output() onDelete = new EventEmitter<IItemLayer>();
|
@Output() onDelete = new EventEmitter<IItemLayer>();
|
||||||
|
|||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
<div #layerValues class="layer-values">
|
||||||
|
<div class="cross" *ngIf="enabled$ | async">
|
||||||
|
<div class="pointer"></div>
|
||||||
|
<div class="values-container border border-dark rounded p-2" *ngIf="(layerValues$ | async ) as layers">
|
||||||
|
<div class="lonlat pb-2 "><span class="font-weight-bold">{{lonlat$}}</span><i class="ms-2 fal fa-copy" (click)="copyToClipboard()"></i> </div>
|
||||||
|
<ul class="value-list p-0 mb-0" *ngIf="layers.length>0 ;else no_data">
|
||||||
|
<li class="border-top pt-1 pb-1 value" *ngFor="let layerValue of layers">
|
||||||
|
<div>{{layerValue.layerName}}</div>
|
||||||
|
<div>{{layerValue.date|date}}</div>
|
||||||
|
<div><span *ngIf="layerValue.quantity"><span class="me-1">{{layerValue.quantity}}</span> </span><span class="me-1 font-weight-bold">{{layerValue.value}}</span><span>{{layerValue.unit}}</span></div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ng-template #no_data>
|
||||||
|
<div i18n class="border-top pt-1 pb-1">No data at location</div>
|
||||||
|
</ng-template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>>
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
.layer-values {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 30%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cross {
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
left: -0.5em;
|
||||||
|
top: -0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.values-container {
|
||||||
|
position: relative;
|
||||||
|
background-color: white;
|
||||||
|
left: calc( 1em - 1px);
|
||||||
|
top: -1.3em;
|
||||||
|
min-width: 15em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.value-list {
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pointer {
|
||||||
|
position: relative;
|
||||||
|
width: 0px;
|
||||||
|
height: 0px;
|
||||||
|
left: 0.5em;
|
||||||
|
border-top: 0.5em solid transparent;
|
||||||
|
border-bottom: 0.5em solid transparent;
|
||||||
|
border-right: 0.5em solid black;
|
||||||
|
}
|
||||||
|
|
||||||
+6
-6
@@ -1,20 +1,20 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { GradientComponent } from './gradient.component';
|
import { LayerValuesComponent } from './layer-values.component';
|
||||||
|
|
||||||
describe('GradientComponent', () => {
|
describe('LayerValuesComponent', () => {
|
||||||
let component: GradientComponent;
|
let component: LayerValuesComponent;
|
||||||
let fixture: ComponentFixture<GradientComponent>;
|
let fixture: ComponentFixture<LayerValuesComponent>;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ GradientComponent ]
|
declarations: [ LayerValuesComponent ]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(GradientComponent);
|
fixture = TestBed.createComponent(LayerValuesComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
import { Component, OnInit,Input,ViewChild,ElementRef,AfterViewInit } from '@angular/core';
|
||||||
|
import {IItemLayer} from '../../../models/item.layer';
|
||||||
|
import { Store } from '@ngrx/store';
|
||||||
|
import * as mapReducers from '../../../reducers/map.reducer';
|
||||||
|
import * as mapActions from '../../../actions/map.actions';
|
||||||
|
import { MapComponent } from 'ngx-openlayers';
|
||||||
|
import { ILayervalue } from '../../../models/layer.value';
|
||||||
|
import { Observable,interval,Subject } from 'rxjs';
|
||||||
|
import { debounce, throttle } from 'rxjs/operators';
|
||||||
|
import { toLonLat } from 'ol/proj';
|
||||||
|
import { toStringHDMS } from 'ol/coordinate';
|
||||||
|
import { ClipboardService } from 'ngx-clipboard'
|
||||||
|
import {GeoJSON,WKT} from 'ol/format';
|
||||||
|
import { Point } from 'ol/geom';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'fm-map-layer-values',
|
||||||
|
templateUrl: './layer-values.component.html',
|
||||||
|
styleUrls: ['./layer-values.component.scss']
|
||||||
|
})
|
||||||
|
export class LayerValuesComponent implements OnInit,AfterViewInit {
|
||||||
|
|
||||||
|
@ViewChild('layerValues') containerRef:ElementRef;
|
||||||
|
offsetX$:number =0;
|
||||||
|
offsetY$:number =0;
|
||||||
|
lonlat$: string="";
|
||||||
|
wkt$= "";
|
||||||
|
layerValues$:Observable<Array<ILayervalue>> = this.store.select(mapReducers.selectGetLayerValues);
|
||||||
|
enabled$:Observable<boolean> = this.store.select(mapReducers.selectGetLayerValuesEnabled);
|
||||||
|
wktFormat$:WKT;
|
||||||
|
|
||||||
|
constructor( private store: Store<mapReducers.State>,private map: MapComponent,private clipboardService$:ClipboardService) {
|
||||||
|
this.wktFormat$=new WKT();
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
moveEndSubject = new Subject<any>();
|
||||||
|
|
||||||
|
ngAfterViewInit():void {
|
||||||
|
this.offsetY$ = this.containerRef.nativeElement.offsetTop;
|
||||||
|
this.offsetX$ = this.containerRef.nativeElement.offsetLeft;
|
||||||
|
this.map.instance.on('moveend', () => {
|
||||||
|
this.moveEndSubject.next({});
|
||||||
|
});
|
||||||
|
this.moveEndSubject.pipe(throttle(ev => interval(100))).subscribe(() => this.updateValuesLocation());
|
||||||
|
}
|
||||||
|
|
||||||
|
updateValuesLocation() {
|
||||||
|
var xy = this.map.instance.getCoordinateFromPixel([this.offsetX$,this.offsetY$])
|
||||||
|
var lonlat = toLonLat(xy);
|
||||||
|
this.wkt$ = this.wktFormat$.writeGeometry(new Point(lonlat))
|
||||||
|
this.lonlat$ = toStringHDMS(lonlat);
|
||||||
|
this.store.dispatch(new mapActions.SetLayerValuesLocation(xy[0],xy[1]));
|
||||||
|
}
|
||||||
|
|
||||||
|
copyToClipboard() {
|
||||||
|
this.clipboardService$.copy(this.wkt$);
|
||||||
|
}
|
||||||
|
}
|
||||||
+7
-8
@@ -1,9 +1,8 @@
|
|||||||
import { Component, OnDestroy, OnInit, Input, Optional, OnChanges, SimpleChanges } from '@angular/core';
|
import { Component, OnDestroy, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||||
import { Vector } from 'ol/layer';
|
import { LayerVectorComponent, MapComponent } from 'ngx-openlayers';
|
||||||
import { Style } from 'ol/style';
|
import RenderType from 'ol/layer/Vector';
|
||||||
import { StyleFunction } from 'ol/style/Style';
|
import { Vector as VectorSource } from 'ol/source';
|
||||||
import { LayerVectorComponent, LayerGroupComponent, MapComponent } from 'ngx-openlayers';
|
import { Geometry } from 'ol/geom';
|
||||||
import { RenderType } from 'ol/layer/Vector';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'fm-map-aol-layer-vector-image',
|
selector: 'fm-map-aol-layer-vector-image',
|
||||||
@@ -12,10 +11,10 @@ import { RenderType } from 'ol/layer/Vector';
|
|||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
export class LayerVectorImageComponent extends LayerVectorComponent implements OnInit, OnDestroy, OnChanges {
|
export class LayerVectorImageComponent extends LayerVectorComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
public source: Vector;
|
//public source: Vector;
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
renderMode: RenderType | string = "image";
|
renderMode: RenderType<VectorSource<Geometry>> | string = "image";
|
||||||
|
|
||||||
constructor(map: MapComponent) {
|
constructor(map: MapComponent) {
|
||||||
super(map);
|
super(map);
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
<div (click)="handleClick($event)" class="btn btn-outline-secondary gps-location">
|
<div (click)="handleClick($event)" class="btn btn-outline-primary gps-location">
|
||||||
<svg height="100%" width="100%" viewBox="0 0 96 96">
|
<svg height="100%" width="100%" viewBox="0 0 96 96">
|
||||||
<g
|
<g
|
||||||
id="XMLID_1_"><circle
|
id="XMLID_1_"><circle
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ div.gps-location:hover .pan-to {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.gps-location:hover .pan-to-centered {
|
div.gps-location:hover .pan-to-centered {
|
||||||
fill: theme-color-level($color-name: "primary", $level: -10)
|
fill: theme-color-level(primary, -10)
|
||||||
}
|
}
|
||||||
|
|
||||||
.pan-to.pan-to-disabled {
|
.pan-to.pan-to-disabled {
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ export class PanToLocation implements OnInit,OnChanges{
|
|||||||
|
|
||||||
view: View;
|
view: View;
|
||||||
map: MapComponent;
|
map: MapComponent;
|
||||||
@Input() position: Position;
|
@Input() position: GeolocationPosition;
|
||||||
@Input() mapState: IMapState;
|
@Input() mapState: IMapState;
|
||||||
@Input() animate: boolean;
|
@Input() animate: boolean;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
<div (click)="handleClick($event)" class="btn btn-outline-secondary compass" [style.transform]="Rotation()" [ngClass]="{'compass-n':IsNorth()}">
|
<div (click)="handleClick($event)" class="btn btn-outline-primary compass" [style.transform]="Rotation()" [ngClass]="{'compass-n':IsNorth()}">
|
||||||
<svg height="100%" width="100%" viewBox="0 0 132.29166 132.29167">
|
<svg height="100%" width="100%" viewBox="0 0 132.29166 132.29167">
|
||||||
<g
|
<g
|
||||||
inkscape:label="Laag 1"
|
inkscape:label="Laag 1"
|
||||||
|
|||||||
+1
@@ -8,6 +8,7 @@
|
|||||||
border-radius:1.75em;
|
border-radius:1.75em;
|
||||||
padding:0;
|
padding:0;
|
||||||
margin-top:0.5em;
|
margin-top:0.5em;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
#north {
|
#north {
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ export class RotationResetComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor( @Host() private map: MapComponent, private changeDetectorRef$: ChangeDetectorRef ) {
|
constructor( private map: MapComponent, private changeDetectorRef$: ChangeDetectorRef ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleClick(event:Event) {
|
handleClick(event:Event) {
|
||||||
|
|||||||
+17
-4
@@ -1,4 +1,5 @@
|
|||||||
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 { ViewComponent, MapComponent } from 'ngx-openlayers';
|
import { ViewComponent, MapComponent } from 'ngx-openlayers';
|
||||||
|
|
||||||
|
|
||||||
@@ -9,12 +10,24 @@ import { ViewComponent, MapComponent } from 'ngx-openlayers';
|
|||||||
export class ZoomToExtentComponent implements OnChanges {
|
export class ZoomToExtentComponent implements OnChanges {
|
||||||
view: ViewComponent;
|
view: ViewComponent;
|
||||||
map: MapComponent;
|
map: MapComponent;
|
||||||
|
paddingTop: number = 0;
|
||||||
|
paddingLeft: number = 0;
|
||||||
|
paddingBottom: number = 0;
|
||||||
|
paddingRight: number = 0;
|
||||||
|
|
||||||
@Input() extent: number[];
|
@Input() extent: number[];
|
||||||
@Input() animate: boolean = false;
|
@Input() animate: boolean = false;
|
||||||
|
|
||||||
constructor(@Host() view: ViewComponent, @Host() map: MapComponent) {
|
constructor(@Host() view: ViewComponent, @Host() map: MapComponent,route: ActivatedRoute ) {
|
||||||
this.view = view;
|
this.view = view;
|
||||||
this.map = map;
|
this.map = map;
|
||||||
|
if(route && route.snapshot && route.snapshot.data && route.snapshot.data["fm-map-zoom-to-extent"]) {
|
||||||
|
let params = route.snapshot.data["fm-map-zoom-to-extent"];
|
||||||
|
this.paddingTop = params["padding-top"] ? params["padding-top"] : 0;
|
||||||
|
this.paddingBottom = params["padding-bottom"] ? params["padding-bottom"] : 0;
|
||||||
|
this.paddingLeft = params["padding-left"] ? params["padding-left"] : 0;
|
||||||
|
this.paddingRight = params["padding-right"] ? params["padding-right"] : 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
@@ -25,13 +38,13 @@ export class ZoomToExtentComponent implements OnChanges {
|
|||||||
let threshold = 40 * rem;
|
let threshold = 40 * rem;
|
||||||
var left = 1 * rem;
|
var left = 1 * rem;
|
||||||
var right = 1 * rem;
|
var right = 1 * rem;
|
||||||
var bottom = Math.round(size[1] / 2);
|
var bottom = Math.round((size[1] / 2) + (4*rem));
|
||||||
var top = 1 * rem;
|
var top = 1 * rem;
|
||||||
if (size[0] > threshold) {
|
if (size[0] > threshold) {
|
||||||
bottom = 1 * rem;
|
bottom = 5 * rem;
|
||||||
left = 23 * rem;
|
left = 23 * rem;
|
||||||
}
|
}
|
||||||
options.padding = [top, right, bottom, left];
|
options.padding = [top + (this.paddingTop*rem), right+ (this.paddingRight*rem), bottom + (this.paddingBottom*rem), left+ (this.paddingLeft*rem)];
|
||||||
if (this.animate) options["duration"] = 1000;
|
if (this.animate) options["duration"] = 1000;
|
||||||
this.view.instance.fit(this.extent, options);
|
this.view.instance.fit(this.extent, options);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
border-bottom: 1px solid gray('500');
|
border-bottom: 1px solid $gray-500;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row.selected {
|
.row.selected {
|
||||||
background-color: gray('100');
|
background-color: $gray-100;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 44rem) {
|
@media screen and (min-width: 44rem) {
|
||||||
|
|||||||
+8
-4
@@ -1,5 +1,6 @@
|
|||||||
import { Component, Input, OnInit, ComponentFactoryResolver, ViewChild, SimpleChanges, ComponentFactory, Inject} from '@angular/core';
|
import { Component, Input, OnInit, ComponentFactoryResolver, ViewChild, SimpleChanges, ComponentFactory, Inject} from '@angular/core';
|
||||||
import { Feature } from 'ol';
|
import { Feature } from 'ol';
|
||||||
|
import { Geometry} from 'ol/geom';
|
||||||
import { FeatureListComponent,AbstractFeatureListComponent } from '../feature-list/feature-list.component';
|
import { FeatureListComponent,AbstractFeatureListComponent } from '../feature-list/feature-list.component';
|
||||||
import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
||||||
import {IQueryState,PackageService } from '@farmmaps/common';
|
import {IQueryState,PackageService } from '@farmmaps/common';
|
||||||
@@ -17,12 +18,13 @@ import { Observable } from 'rxjs';
|
|||||||
export class FeatureListContainerComponent {
|
export class FeatureListContainerComponent {
|
||||||
|
|
||||||
constructor(private store: Store<mapReducers.State>,private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractFeatureListComponent) public featureLists: AbstractFeatureListComponent[],private packageService:PackageService ) {
|
constructor(private store: Store<mapReducers.State>,private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractFeatureListComponent) public featureLists: AbstractFeatureListComponent[],private packageService:PackageService ) {
|
||||||
|
this.featureLists = [...this.featureLists].reverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Input() features: Array<Feature>
|
@Input() features: Array<Feature<Geometry>>
|
||||||
@Input() queryState: IQueryState;
|
@Input() queryState: IQueryState;
|
||||||
@Input() selectedFeature: Feature;
|
@Input() selectedFeature: Feature<Geometry>;
|
||||||
@Input() clickedFeature:Observable<Feature>;
|
@Input() clickedFeature:Observable<Feature<Geometry>>;
|
||||||
|
|
||||||
@ViewChild(WidgetHostDirective, { static: true }) widgetHost: WidgetHostDirective;
|
@ViewChild(WidgetHostDirective, { static: true }) widgetHost: WidgetHostDirective;
|
||||||
componentRef:any;
|
componentRef:any;
|
||||||
@@ -37,7 +39,7 @@ export class FeatureListContainerComponent {
|
|||||||
let criteria=0;
|
let criteria=0;
|
||||||
if (this.featureLists[i]['forItemType']) {
|
if (this.featureLists[i]['forItemType']) {
|
||||||
criteria++;
|
criteria++;
|
||||||
if( this.featureLists[i]['forItemType'].indexOf(queryState.itemType) >= 0) {
|
if( this.featureLists[i]['forItemType'].split(",").filter(part => part == queryState.itemType).length == 1) {
|
||||||
matches++;
|
matches++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -80,9 +82,11 @@ export class FeatureListContainerComponent {
|
|||||||
}
|
}
|
||||||
if ((changes["features"] && changes["features"].currentValue)) {
|
if ((changes["features"] && changes["features"].currentValue)) {
|
||||||
(<AbstractFeatureListComponent>this.componentRef.instance).features = changes["features"].currentValue;
|
(<AbstractFeatureListComponent>this.componentRef.instance).features = changes["features"].currentValue;
|
||||||
|
this.componentRef.changeDetectorRef.detectChanges();
|
||||||
}
|
}
|
||||||
if(changes["selectedFeature"]) {
|
if(changes["selectedFeature"]) {
|
||||||
(<AbstractFeatureListComponent>this.componentRef.instance).selectedFeature = changes["selectedFeature"].currentValue;
|
(<AbstractFeatureListComponent>this.componentRef.instance).selectedFeature = changes["selectedFeature"].currentValue;
|
||||||
|
this.componentRef.changeDetectorRef.detectChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,11 +1,11 @@
|
|||||||
<div class="card border-0">
|
<div class="card border-0">
|
||||||
<div class="card-body" *ngIf="(schemeItem|async);let schemeItem">
|
<div class="card-body" *ngIf="(schemeItem|async);let schemeItem">
|
||||||
<div><a href="#" (click)="handleBackClick($event)" i18n>back</a></div>
|
<fm-back-button></fm-back-button>
|
||||||
<h4 i18n>Farm</h4>
|
<h4 i18n>Farm</h4>
|
||||||
<h3>{{schemeItem.name}}</h3>
|
<h3>{{schemeItem.name}}</h3>
|
||||||
<div *ngIf="features;let features">
|
<div *ngIf="features;let features">
|
||||||
<div class="cropfields">
|
<div class="cropfields">
|
||||||
<div class="row m-0 pl-3 pr-3" *ngFor="let feature of features" [ngClass]="{'selected':isFeatureSelected(feature)}" (click)="handleFeatureClick(feature)" (mouseenter)="handleFeatureMouseEnter(feature)" (mouseleave)="handleFeatureMouseLeave(feature)">
|
<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>
|
<fm-map-feature-list-feature-container [feature]="feature"></fm-map-feature-list-feature-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+3
-3
@@ -6,17 +6,17 @@ fm-map-feature-list-feature-container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
border-bottom: 1px solid gray('500');
|
border-bottom: 1px solid $gray-500;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
padding-left:1.5rem;
|
padding-left:1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row.selected {
|
.row.selected {
|
||||||
background-color: gray('100');
|
background-color: $gray-100;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cropfields {
|
.cropfields {
|
||||||
border-top: 1px solid gray('500');
|
border-top: 1px solid $gray-500;
|
||||||
margin-left: -1.25rem;
|
margin-left: -1.25rem;
|
||||||
margin-right: -1.25rem;
|
margin-right: -1.25rem;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
<div class="card border-0">
|
<div class="card border-0">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div><a href="#" (click)="handleBackClick($event)" i18n>Back</a></div>
|
<fm-back-button></fm-back-button>
|
||||||
<h3><i class="fm fm-farm"></i> <span i18n>Farms</span></h3>
|
<h3><i class="far fa-farm"></i> <span i18n>Farms</span></h3>
|
||||||
<div *ngIf="features;let features">
|
<div *ngIf="features;let features">
|
||||||
<div class="farms">
|
<div class="farms">
|
||||||
<div class="row m-0 pl-3 pr-3" *ngFor="let feature of features"[ngClass]="{'selected':isFeatureSelected(feature)}" (click)="handleFeatureClick(feature)" (mouseenter)="handleFeatureMouseEnter(feature)" (mouseleave)="handleFeatureMouseLeave(feature)">
|
<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>
|
<fm-map-feature-list-feature-container [feature]="feature"></fm-map-feature-list-feature-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+3
-3
@@ -6,17 +6,17 @@ fm-map-feature-list-feature-container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
border-bottom: 1px solid gray('500');
|
border-bottom: 1px solid $gray-500;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
padding-left:1.5rem;
|
padding-left:1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row.selected {
|
.row.selected {
|
||||||
background-color: gray('100');
|
background-color: $gray-100;
|
||||||
}
|
}
|
||||||
|
|
||||||
.farms {
|
.farms {
|
||||||
border-top: 1px solid gray('500');
|
border-top: 1px solid $gray-500;
|
||||||
margin-left: -1.25rem;
|
margin-left: -1.25rem;
|
||||||
margin-right: -1.25rem;
|
margin-right: -1.25rem;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -9,6 +9,7 @@ import * as mapActions from '../../actions/map.actions';
|
|||||||
import { tassign } from 'tassign';
|
import { tassign } from 'tassign';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { Feature } from 'ol';
|
import { Feature } from 'ol';
|
||||||
|
import { Geometry} from 'ol/geom';
|
||||||
|
|
||||||
@ForItemType("vnd.farmmaps.itemtype.croppingscheme")
|
@ForItemType("vnd.farmmaps.itemtype.croppingscheme")
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@@ -23,7 +24,7 @@ export class FeatureListCroppingschemeComponent extends AbstractFeatureListCompo
|
|||||||
super(store, itemTypeService, location);
|
super(store, itemTypeService, location);
|
||||||
}
|
}
|
||||||
|
|
||||||
getAction(feature:Feature):Action {
|
getAction(feature:Feature<Geometry>):Action {
|
||||||
var queryState = tassign(mapReducers.initialState.queryState, { parentCode: feature.get('code'), itemType: "vnd.farmmaps.itemtype.cropfield" });
|
var queryState = tassign(mapReducers.initialState.queryState, { parentCode: feature.get('code'), itemType: "vnd.farmmaps.itemtype.cropfield" });
|
||||||
return new mapActions.DoQuery(queryState);
|
return new mapActions.DoQuery(queryState);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -1,5 +1,6 @@
|
|||||||
import { Component, Input, OnInit, ComponentFactoryResolver, ViewChild, SimpleChanges, ComponentFactory, Inject, Type} from '@angular/core';
|
import { Component, Input, OnInit, ComponentFactoryResolver, ViewChild, SimpleChanges, ComponentFactory, Inject, Type} from '@angular/core';
|
||||||
import { Feature } from 'ol';
|
import { Feature } from 'ol';
|
||||||
|
import { Geometry } from 'ol/geom';
|
||||||
import { AbstractFeatureListFeatureComponent,FeatureListFeatureComponent } from '../feature-list-feature/feature-list-feature.component';
|
import { AbstractFeatureListFeatureComponent,FeatureListFeatureComponent } from '../feature-list-feature/feature-list-feature.component';
|
||||||
import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
||||||
|
|
||||||
@@ -15,9 +16,10 @@ import { WidgetHostDirective } from '../widget-host/widget-host.directive';
|
|||||||
export class FeatureListFeatureContainerComponent {
|
export class FeatureListFeatureContainerComponent {
|
||||||
|
|
||||||
constructor(private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractFeatureListFeatureComponent) public featureLists: AbstractFeatureListFeatureComponent[] ) {
|
constructor(private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractFeatureListFeatureComponent) public featureLists: AbstractFeatureListFeatureComponent[] ) {
|
||||||
|
this.featureLists = [...this.featureLists].reverse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Input() feature: Feature;
|
@Input() feature: Feature<Geometry>;
|
||||||
|
|
||||||
@ViewChild(WidgetHostDirective, { static: true }) widgetHost: WidgetHostDirective;
|
@ViewChild(WidgetHostDirective, { static: true }) widgetHost: WidgetHostDirective;
|
||||||
|
|
||||||
@@ -31,7 +33,7 @@ export class FeatureListFeatureContainerComponent {
|
|||||||
let criteria=0;
|
let criteria=0;
|
||||||
if (this.featureLists[i]['forItemType']) {
|
if (this.featureLists[i]['forItemType']) {
|
||||||
criteria++;
|
criteria++;
|
||||||
if(this.featureLists[i]['forItemType'].indexOf(this.feature.get("itemType")) >= 0) {
|
if(this.featureLists[i]['forItemType'].split(",").filter(part => part == this.feature.get("itemType")).length == 1) {
|
||||||
matches++;
|
matches++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-7
@@ -1,12 +1,14 @@
|
|||||||
<div *ngIf="feature;let feature" class="d-flex m-0">
|
<div *ngIf="feature;let feature" class="d-flex m-0">
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
<div #container class="thumbnail">
|
<div class="thumbnail">
|
||||||
<canvas #canvas ></canvas>
|
<fm-map-feature-thumbnail [feature]="feature"></fm-map-feature-thumbnail>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-grow p-2 overflow-hidden">
|
<div class="flex-grow p-2 overflow-hidden">
|
||||||
<h1 class="card-title" title="{{feature.get('name')}}">{{feature.get('name')}}</h1>
|
<h1 class="card-title" title="{{feature.get('name')}}">{{feature.get('name')}}</h1>
|
||||||
<div class="card-text"><span>{{areaInHa(feature)| number:'1.2-2'}} ha</span> <span>{{feature.get('cropTypeName')}}</span> </div>
|
<div class="card-text"><span>{{areaInHa(feature)| number:'1.2-2'}}
|
||||||
<div class="card-text"><span>{{feature.get('datadate')|date}}</span> - <span>{{feature.get('dataenddate')|date}}</span> </div>
|
ha</span> <span>{{feature.get('cropTypeName')}}</span> </div>
|
||||||
|
<div class="card-text"><span>{{feature.get('datadate')|date}}</span> -
|
||||||
|
<span>{{feature.get('dataenddate')|date}}</span> </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
+5
-46
@@ -1,14 +1,13 @@
|
|||||||
import { Component, Injectable,ViewChild,AfterViewInit} from '@angular/core';
|
import { Component, Injectable,ViewChild,AfterViewInit} from '@angular/core';
|
||||||
import { Feature } from 'ol';
|
import { Feature } from 'ol';
|
||||||
import * as extent from 'ol/extent';
|
import { Geometry } from 'ol/geom';
|
||||||
import * as render from 'ol/render';
|
|
||||||
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 { commonReducers,ItemTypeService,AppConfig } from '@farmmaps/common';
|
import { commonReducers,ItemTypeService,AppConfig } from '@farmmaps/common';
|
||||||
import { AbstractFeatureListFeatureComponent } from '../feature-list-feature/feature-list-feature.component';
|
import { AbstractFeatureListFeatureComponent } from '../feature-list-feature/feature-list-feature.component';
|
||||||
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
import { ForItemType } from '../for-item/for-itemtype.decorator';
|
||||||
import {getArea} from 'ol/sphere';
|
import {getArea} from 'ol/sphere';
|
||||||
import * as style from 'ol/style';
|
|
||||||
|
|
||||||
|
|
||||||
@ForItemType("vnd.farmmaps.itemtype.cropfield")
|
@ForItemType("vnd.farmmaps.itemtype.cropfield")
|
||||||
@@ -18,58 +17,18 @@ import * as style from 'ol/style';
|
|||||||
templateUrl: './feature-list-feature-cropfield.component.html',
|
templateUrl: './feature-list-feature-cropfield.component.html',
|
||||||
styleUrls: ['./feature-list-feature-cropfield.component.scss']
|
styleUrls: ['./feature-list-feature-cropfield.component.scss']
|
||||||
})
|
})
|
||||||
export class FeatureListFeatureCropfieldComponent extends AbstractFeatureListFeatureComponent implements AfterViewInit {
|
export class FeatureListFeatureCropfieldComponent extends AbstractFeatureListFeatureComponent {
|
||||||
|
|
||||||
@ViewChild('canvas') canvas;
|
|
||||||
@ViewChild('container') container;
|
|
||||||
|
|
||||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService,config:AppConfig) {
|
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService,config:AppConfig) {
|
||||||
super(store, itemTypeService,config);
|
super(store, itemTypeService,config);
|
||||||
}
|
}
|
||||||
|
|
||||||
areaInHa(feature:Feature):number {
|
areaInHa(feature:Feature<Geometry>):number {
|
||||||
if(!feature) return 0;
|
if(!feature) return 0;
|
||||||
// get area from faeture if 0 calculate from polygon
|
// get area from faeture if 0 calculate from polygon
|
||||||
let a = feature.get('area');
|
let a = feature.get('area');
|
||||||
if(a) return a;
|
if(a) return a;
|
||||||
return getArea(feature.getGeometry(),{projectio:"EPSG:3857"}) / 10000;
|
return getArea(feature.getGeometry(),{projection:"EPSG:3857"}) / 10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
render(canvas,width,height,feature:Feature) {
|
|
||||||
let renderContext = render.toContext(canvas.getContext( '2d'),{ size: [width, height] });
|
|
||||||
|
|
||||||
let strokeStyle = new style.Style({
|
|
||||||
stroke: new style.Stroke({ color: 'black',width:1.5 })
|
|
||||||
});
|
|
||||||
|
|
||||||
let geom = feature.getGeometry().clone(),
|
|
||||||
line = geom.getCoordinates()[0],
|
|
||||||
e = extent.boundingExtent( line );
|
|
||||||
|
|
||||||
let dxy = extent.getCenter(e),
|
|
||||||
sxy = [
|
|
||||||
(width - 2 ) / extent.getWidth(e),
|
|
||||||
(height - 2 ) / extent.getHeight(e)
|
|
||||||
];
|
|
||||||
|
|
||||||
let dx = dxy[0],
|
|
||||||
dy = dxy[1],
|
|
||||||
sx = sxy[0],
|
|
||||||
sy = sxy[1];
|
|
||||||
|
|
||||||
geom.translate( -dx, -dy );
|
|
||||||
geom.scale( Math.min(sx, sy), -Math.min(sx, sy));
|
|
||||||
geom.translate( width / 2, height / 2 );
|
|
||||||
|
|
||||||
renderContext.setStyle( strokeStyle );
|
|
||||||
renderContext.drawGeometry( geom );
|
|
||||||
}
|
|
||||||
|
|
||||||
ngAfterViewInit() {
|
|
||||||
this.render(this.canvas.nativeElement,
|
|
||||||
this.container.nativeElement.offsetWidth,
|
|
||||||
this.container.nativeElement.offsetHeight,
|
|
||||||
this.feature);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
<div *ngIf="feature;let feature" class="row m-0">
|
<div *ngIf="feature;let feature" class="row m-0">
|
||||||
<div class="col-3 m-0 p-2 thumbnail">
|
<div class="col-3 w-25 m-0 p-2 thumbnail">
|
||||||
<img *ngIf="feature.get('thumbnail')" [src]="config.getConfig('apiEndPoint') + '/api/v1/items/'+feature.get('code')+'/thumbnail'" />
|
<img *ngIf="feature.get('thumbnail')" [src]="config.getConfig('apiEndPoint') + '/api/v1/items/'+feature.get('code')+'/thumbnail'" />
|
||||||
<div *ngIf="!feature.get('thumbnail')" [style.background-color]="itemTypeService.getColor(feature.get('itemType'))">
|
<div *ngIf="!feature.get('thumbnail')" [style.background-color]="itemTypeService.getColor(feature.get('itemType'))">
|
||||||
<i [ngClass]="itemTypeService.getIcon(feature.get('itemType'))"></i>
|
<i [ngClass]="itemTypeService.getIcon(feature.get('itemType'))"></i>
|
||||||
|
|||||||
+2
-2
@@ -10,12 +10,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail > img {
|
.thumbnail > img {
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
height: auto;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail > div {
|
.thumbnail > div {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
min-height: 3rem;
|
min-height: 3rem;
|
||||||
|
|||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
import { Component, Input, Injectable,Directive} from '@angular/core';
|
import { Component, Input, Injectable,Directive} from '@angular/core';
|
||||||
import { Feature } from 'ol';
|
import { Feature } from 'ol';
|
||||||
|
import { Geometry } from 'ol/geom';
|
||||||
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 { commonReducers,ItemTypeService,AppConfig } from '@farmmaps/common';
|
import { commonReducers,ItemTypeService,AppConfig } from '@farmmaps/common';
|
||||||
@@ -9,7 +10,7 @@ import { commonReducers,ItemTypeService,AppConfig } from '@farmmaps/common';
|
|||||||
@Injectable()
|
@Injectable()
|
||||||
@Directive()
|
@Directive()
|
||||||
export abstract class AbstractFeatureListFeatureComponent {
|
export abstract class AbstractFeatureListFeatureComponent {
|
||||||
@Input() feature: Feature
|
@Input() feature: Feature<Geometry>
|
||||||
|
|
||||||
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService,public config:AppConfig) {
|
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService,public config:AppConfig) {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div *ngIf="features;let features">
|
<div *ngIf="features;let features">
|
||||||
<a href="#" (click)="handleBackClick($event)">Go back</a>
|
<fm-back-button></fm-back-button>
|
||||||
<div class="row m-0 pl-3 pr-3" *ngFor="let feature of features" [ngClass]="{'selected':isFeatureSelected(feature)}" (click)="handleFeatureClick(feature)" (mouseenter)="handleFeatureMouseEnter(feature)" (mouseleave)="handleFeatureMouseLeave(feature)">
|
<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>
|
<fm-map-feature-list-feature-container [feature]="feature"></fm-map-feature-list-feature-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ fm-map-feature-list-feature-container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
border-bottom: 1px solid gray('500');
|
border-bottom: 1px solid $gray-500;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row.selected {
|
.row.selected {
|
||||||
background-color: gray('100');
|
background-color: $gray-100;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { Component, Input, Injectable,Directive,SimpleChanges } from '@angular/core';
|
import { Component, Input, Injectable,Directive,SimpleChanges } from '@angular/core';
|
||||||
import { Location } from '@angular/common';
|
import { Location } from '@angular/common';
|
||||||
import { Feature } from 'ol';
|
import { Feature } from 'ol';
|
||||||
|
import { Geometry} from 'ol/geom';
|
||||||
import { Store,Action} from '@ngrx/store';
|
import { Store,Action} from '@ngrx/store';
|
||||||
import * as mapReducers from '../../reducers/map.reducer';
|
import * as mapReducers from '../../reducers/map.reducer';
|
||||||
import { commonReducers,ItemTypeService, IItem, Item } from '@farmmaps/common';
|
import { commonReducers,ItemTypeService, IItem, Item } from '@farmmaps/common';
|
||||||
@@ -14,20 +15,20 @@ import { IQueryState } from '@farmmaps/common';
|
|||||||
@Injectable()
|
@Injectable()
|
||||||
@Directive()
|
@Directive()
|
||||||
export abstract class AbstractFeatureListComponent {
|
export abstract class AbstractFeatureListComponent {
|
||||||
@Input() features: Array<Feature>;
|
@Input() features: Array<Feature<Geometry>>;
|
||||||
@Input() queryState: IQueryState;
|
@Input() queryState: IQueryState;
|
||||||
@Input() selectedFeature: Feature;
|
@Input() selectedFeature: Feature<Geometry>;
|
||||||
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService, private location: Location) {
|
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService, private location: Location) {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleFeatureClick(feature:Feature) {
|
handleFeatureClick(feature:Feature<Geometry>) {
|
||||||
if(feature) {
|
if(feature) {
|
||||||
let action = this.getAction(feature);
|
let action = this.getAction(feature);
|
||||||
this.store.dispatch(action);
|
this.store.dispatch(action);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getAction(feature:Feature):Action {
|
getAction(feature:Feature<Geometry>):Action {
|
||||||
var newQuery: any = tassign(mapReducers.initialState.queryState);
|
var newQuery: any = tassign(mapReducers.initialState.queryState);
|
||||||
newQuery.parentCode = feature.get('parentCode');
|
newQuery.parentCode = feature.get('parentCode');
|
||||||
newQuery.itemCode = feature.get('code');
|
newQuery.itemCode = feature.get('code');
|
||||||
@@ -48,7 +49,7 @@ export abstract class AbstractFeatureListComponent {
|
|||||||
this.location.back();
|
this.location.back();
|
||||||
}
|
}
|
||||||
|
|
||||||
isFeatureSelected(feature:Feature):boolean {
|
isFeatureSelected(feature:Feature<Geometry>):boolean {
|
||||||
if(!this.selectedFeature) return false;
|
if(!this.selectedFeature) return false;
|
||||||
return feature.getId() == this.selectedFeature.getId();
|
return feature.getId() == this.selectedFeature.getId();
|
||||||
}
|
}
|
||||||
|
|||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
<div #container class="container">
|
||||||
|
<canvas #canvas ></canvas>
|
||||||
|
</div>
|
||||||
|
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
.container {
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
+6
-6
@@ -1,20 +1,20 @@
|
|||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { TestComponent } from './test.component';
|
import { GeometryThumbnailComponent } from './feature-thumbnail.component';
|
||||||
|
|
||||||
describe('TestComponent', () => {
|
describe('GeometryThumbnailComponent', () => {
|
||||||
let component: TestComponent;
|
let component: GeometryThumbnailComponent;
|
||||||
let fixture: ComponentFixture<TestComponent>;
|
let fixture: ComponentFixture<GeometryThumbnailComponent>;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ TestComponent ]
|
declarations: [ GeometryThumbnailComponent ]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(TestComponent);
|
fixture = TestBed.createComponent(GeometryThumbnailComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
+95
@@ -0,0 +1,95 @@
|
|||||||
|
import { Component, Input, AfterViewInit, ViewChild } from '@angular/core';
|
||||||
|
import { Feature} from 'ol';
|
||||||
|
import { Geometry,Polygon,MultiPolygon } from 'ol/geom';
|
||||||
|
import * as extent from 'ol/extent';
|
||||||
|
import * as render from 'ol/render';
|
||||||
|
import * as style from 'ol/style';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'fm-map-feature-thumbnail',
|
||||||
|
templateUrl: './feature-thumbnail.component.html',
|
||||||
|
styleUrls: ['./feature-thumbnail.component.scss']
|
||||||
|
})
|
||||||
|
export class GeometryThumbnailComponent implements AfterViewInit {
|
||||||
|
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
@ViewChild('canvas') canvas;
|
||||||
|
@ViewChild('container') container;
|
||||||
|
|
||||||
|
private geometry:Geometry = null;
|
||||||
|
@Input() set feature(value:Feature<Geometry>) {
|
||||||
|
if(value) {
|
||||||
|
this.geometry = value.getGeometry();
|
||||||
|
} else {
|
||||||
|
this.geometry = null;
|
||||||
|
}
|
||||||
|
this.render(this.canvas,
|
||||||
|
this.geometryStyle,
|
||||||
|
this.geometry,
|
||||||
|
this.width,
|
||||||
|
this.height);
|
||||||
|
};
|
||||||
|
|
||||||
|
private defaultStyle:style.Style = new style.Style({
|
||||||
|
stroke: new style.Stroke({ color: 'black',width:1.5 })
|
||||||
|
});
|
||||||
|
private geometryStyle:style.Style = this.defaultStyle;
|
||||||
|
@Input() set fillColor(value:string) {
|
||||||
|
if(style) {
|
||||||
|
this.geometryStyle = new style.Style({
|
||||||
|
stroke: new style.Stroke({ color: 'black',width:1.5 }),
|
||||||
|
fill: new style.Fill({color: value})
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.geometryStyle = this.defaultStyle
|
||||||
|
}
|
||||||
|
this.render(this.canvas,
|
||||||
|
this.geometryStyle,
|
||||||
|
this.geometry,
|
||||||
|
this.width,
|
||||||
|
this.height);
|
||||||
|
}
|
||||||
|
|
||||||
|
private width:number = 0;
|
||||||
|
private height:number = 0;
|
||||||
|
|
||||||
|
render(canvas,style:style.Style,geometry:Geometry,width:number,height:number) {
|
||||||
|
if(canvas && canvas.nativeElement && geometry && style) {
|
||||||
|
let renderContext = render.toContext(canvas.nativeElement.getContext( '2d'),{ size: [width, height] });
|
||||||
|
|
||||||
|
let geom = geometry.clone() as Polygon,
|
||||||
|
line = geom.getCoordinates()[0],
|
||||||
|
e = extent.boundingExtent( line );
|
||||||
|
|
||||||
|
let dxy = extent.getCenter(e),
|
||||||
|
sxy = [
|
||||||
|
(width - 2 ) / extent.getWidth(e),
|
||||||
|
(height - 2 ) / extent.getHeight(e)
|
||||||
|
];
|
||||||
|
|
||||||
|
let dx = dxy[0],
|
||||||
|
dy = dxy[1],
|
||||||
|
sx = sxy[0],
|
||||||
|
sy = sxy[1];
|
||||||
|
|
||||||
|
geom.translate( -dx, -dy );
|
||||||
|
geom.scale( Math.min(sx, sy), -Math.min(sx, sy));
|
||||||
|
geom.translate(width / 2,height / 2 );
|
||||||
|
renderContext.setStyle( style );
|
||||||
|
renderContext.drawGeometry( geom );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ngAfterViewInit() {
|
||||||
|
this.width = this.container.nativeElement.offsetWidth;
|
||||||
|
this.height = this.container.nativeElement.offsetHeight;
|
||||||
|
this.render(this.canvas,
|
||||||
|
this.geometryStyle,
|
||||||
|
this.geometry,
|
||||||
|
this.width,
|
||||||
|
this.height);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user