227 Commits

Author SHA1 Message Date
Willem Dantuma
2f4e14ca1f Merge branch 'develop' into feature/vectortileselect 2021-01-23 17:28:24 +01:00
Willem Dantuma
bfcdcce9ef Fix fontawesome class names
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2021-01-22 14:52:10 +01:00
Willem Dantuma
9e3e7d5d47 Upgrade to fontawesom 5.15.2 2021-01-22 13:13:48 +01:00
Willem Dantuma
2949e39fcd wip 2021-01-22 12:26:14 +01:00
Willem Dantuma
9376c236aa Merge branch 'develop' into feature/vectortileselect
# Conflicts:
#	package-lock.json
#	package.json
2021-01-21 11:04:57 +01:00
Willem Dantuma
a1079eb21f update libs
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2021-01-21 11:04:22 +01:00
Willem Dantuma
c266ce7d42 Update libs 2021-01-21 11:03:37 +01:00
428e3b002d Fix UTC
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2021-01-18 16:45:37 +01:00
65366ff09b Again....
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2021-01-18 15:23:44 +01:00
0f1ce45b2f AW-1844 Fix fmHasPackage
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2021-01-18 15:21:34 +01:00
1ade8025ab Fix HasPackageDirective
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2021-01-18 15:01:08 +01:00
Willem Dantuma
ac8815e8f1 Commit 2021-01-13 17:33:01 +01:00
41b1295f9e Move mollie code ( srvice ) uit farmmapslib halen ( is open source ), naar farmmaps
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2021-01-13 17:29:48 +01:00
ed5a74ed07 Export new Mollie types
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2021-01-13 17:18:45 +01:00
a08eed7c67 AW-1805 Update mollie service (client)
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2021-01-13 16:40:35 +01:00
cc421742df AW-1805 Add support for validity
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2021-01-12 09:05:27 +01:00
9a38630d01 Fix URL
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2021-01-11 19:50:24 +01:00
978360fad0 Build error
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2021-01-11 19:34:39 +01:00
30dab68468 AW-1805 Add mollie service
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2021-01-11 19:32:08 +01:00
Willem Dantuma
80fec7ccaa Some fixes 2020-12-18 20:16:22 +01:00
Willem Dantuma
1a1cd7a81c Merge branch 'develop' into feature/vectortileselect 2020-12-18 19:22:33 +01:00
a782d8ebe9 add clearlayers action
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-12-16 23:01:59 +01:00
Willem Dantuma
a0816afaea Add SetSelectedItemLayer action
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-12-16 18:04:39 +01:00
Willem Dantuma
6746047fe2 Add setfeatures action
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-12-11 13:35:51 +01:00
Willem Dantuma
7266c98a10 Add router-outlet to map component to make it more reusable
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-12-11 12:08:15 +01:00
Willem Dantuma
e873f5af5b Fix icon
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-12-09 23:39:44 +01:00
Willem Dantuma
44f476d5fd Add app-menu 2020-12-09 21:45:38 +01:00
Willem Dantuma
200f3e95eb Dont's show blank screen 2020-12-09 20:35:01 +01:00
Willem Dantuma
1a8bc43c60 Remove horizontal scrollbar
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-12-09 15:23:50 +01:00
Willem Dantuma
6dccaa8ce5 Wait for item types to be loaded
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-12-08 16:14:58 +01:00
Willem Dantuma
f2cb5d4d64 Update configuration
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-12-07 17:20:34 +01:00
6252cc120b aw-1686 expand user profile; added put operation
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-11-18 15:07:39 +01:00
Willem Dantuma
03284d26dd Merge branch 'develop' into feature/vectortileselect 2020-11-06 08:59:08 +01:00
946cbc6533 AQ-1659 Add getItemListUsingRelationship(...)
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-11-05 17:44:39 +01:00
Willem Dantuma
6277236993 Merge branch 'develop' into feature/vectortileselect 2020-11-03 20:22:25 +01:00
Willem Dantuma
20bda6b81f Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-11-03 20:21:39 +01:00
Willem Dantuma
9a338c04e6 Basic working implementation 2020-11-03 20:21:18 +01:00
65c1643c95 AW-1649 Remove codelistitem
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-11-03 13:05:59 +01:00
Willem Dantuma
9cbc9f1293 Implement event handlers 2020-11-02 21:00:13 +01:00
Willem Dantuma
34b75a4c18 Upgrade openlayers 2020-11-02 20:58:32 +01:00
Willem Dantuma
1991e79ed2 Add landingpage and lazyloading voor 3d map
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-11-02 12:24:15 +01:00
Willem Dantuma
d661e5f3f9 Fix zoom padding
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-11-01 15:35:38 +01:00
Willem Dantuma
0a384a9196 Fix zoomto padding 2020-11-01 15:34:01 +01:00
Willem Dantuma
0e13b98b7f Detect changes
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-31 16:58:03 +01:00
Willem Dantuma
56a7544c1e Make reverse non destructive
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-31 13:43:31 +01:00
Willem Dantuma
61636b6e3d Reverse arrays
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-31 13:38:27 +01:00
Willem Dantuma
ab835e904e Fix routes
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-31 11:45:03 +01:00
Willem Dantuma
cd10165510 Remove old init
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-30 13:12:13 +01:00
Willem Dantuma
446d26607c Fix initalisation
Some checks reported errors
FarmMaps.Develop/FarmMapsLib/pipeline/head Something is wrong with the build of this commit
2020-10-30 13:11:20 +01:00
Willem Dantuma
8d204ce1cd Some fixes
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-30 12:37:02 +01:00
Willem Dantuma
2656a67fca Refactor token refresh flows
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-30 08:22:58 +01:00
Willem Dantuma
46c5f74b49 Refactoring for landingpage support
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-29 19:14:06 +01:00
Willem Dantuma
a5ece9b453 Fix map viewport size
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-28 17:54:46 +01:00
Willem Dantuma
9fb5a9698c Refactor map component
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-28 13:31:12 +01:00
fad2f19ae4 added readWrite property for codeListItem
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-13 08:38:23 +02:00
2ad04fc7c1 Added getCodeListItem api for service
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-12 17:41:24 +02:00
f656ecd23f undo previous commit
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-12 14:05:27 +02:00
d42aad87bd Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-10 12:02:34 +02:00
415ee8ef30 something weird, codeList item in url seems empty. But item is not empty 2020-10-10 12:00:05 +02:00
Willem Dantuma
306065dcbd Fix logout issue
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-09 16:35:14 +02:00
824ba97704 try to fix deleteCodeListItem
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-09 07:47:47 +02:00
ac8ab147bc added codelist service
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-08 14:25:33 +02:00
Willem Dantuma
640c99cde2 Add test component
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-06 09:07:40 +02:00
Willem Dantuma
da2492e017 Add fm-gradient-select
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-06 08:22:10 +02:00
Willem Dantuma
f93d235877 add fm-gradient component
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-05 14:58:47 +02:00
Willem Dantuma
fe798e3f60 Fix AW-1508
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-05 11:08:36 +02:00
Willem Dantuma
b8dcc4e9e0 Add 3D example to test app
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-02 17:48:34 +02:00
Willem Dantuma
4b6175b6c4 Add npm scope
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-02 17:37:36 +02:00
Willem Dantuma
388a2faf84 Fix build
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-02 17:33:25 +02:00
Willem Dantuma
0b0bb4d598 Fix build
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-10-02 17:26:18 +02:00
Willem Dantuma
7696ddd8d2 Add common-map3d to jenkins build
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-10-02 17:23:11 +02:00
Willem Dantuma
1301a9d082 Merge branch 'feature/Resurect_3D' into develop 2020-10-02 17:21:01 +02:00
Willem Dantuma
e87affee08 Refactor 3d to own library 2020-10-02 17:20:00 +02:00
Willem Dantuma
b00b21e6b8 Merge branch 'develop' into feature/Resurect_3D 2020-10-02 16:44:11 +02:00
Willem Dantuma
835851350c Fix i18n tags
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-10-02 07:46:59 +02:00
Willem Dantuma
7bdb48b644 Fix signalr authentication
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-30 18:30:36 +02:00
Willem Dantuma
84d6f44e9b Fix transition
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-29 20:57:14 +02:00
Willem Dantuma
2fd109d967 Fix AW-1414
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-29 15:27:21 +02:00
Willem Dantuma
f9934ccf27 Fix AW-1355
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-29 14:56:23 +02:00
Willem Dantuma
b93218e165 Merge branch 'develop' into feature/Resurect_3D
# Conflicts:
#	angular.json
#	package-lock.json
#	package.json
#	projects/common-map/package.json
2020-09-26 12:17:58 +02:00
Willem Dantuma
8e55308df9 First working angular 10 version
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-26 10:10:38 +02:00
Willem Dantuma
5270739641 Fix versions
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-26 10:03:15 +02:00
Willem Dantuma
ce8e8fa706 Update common
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-09-25 21:24:54 +02:00
Willem Dantuma
d326a82c4e Fix build
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-09-25 21:18:04 +02:00
Willem Dantuma
c1683a058c Fix build
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-09-25 21:16:38 +02:00
Willem Dantuma
aa168bb3a1 Fix build
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-09-25 19:55:08 +02:00
Willem Dantuma
fe53955bea Try to fix build
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-09-25 19:47:39 +02:00
Willem Dantuma
ba3dad1365 Fix dep
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-09-25 19:38:47 +02:00
Willem Dantuma
6d2d259c01 Merge branch 'feature/angular_upgrade_10' into develop
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-09-25 19:28:18 +02:00
Willem Dantuma
92774647ff Upgrade to angular 10 2020-09-25 19:27:53 +02:00
Willem Dantuma
9ca047923f npm auit fix 2020-09-25 17:10:17 +02:00
Willem Dantuma
c893a2820b Fix responsetype
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-22 19:29:44 +02:00
Willem Dantuma
baa0166fc8 Stupid bug :-(
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-22 15:13:00 +02:00
Willem Dantuma
58c200aca0 Another attempt to fix parameter
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-22 15:03:23 +02:00
Willem Dantuma
b8a4b3541d Fix params
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-22 14:46:51 +02:00
Willem Dantuma
584a1514ac Add getItemData
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-22 13:58:33 +02:00
Willem Dantuma
21af6ab2c4 Some styling fixes 2020-09-18 17:19:29 +02:00
Willem Dantuma
c606e02673 Fix static image layer 2020-09-18 16:05:44 +02:00
Willem Dantuma
ff4eb296ff Update libs
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-18 14:50:17 +02:00
Willem Dantuma
ea26cdd628 Update libs
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-18 14:30:20 +02:00
Willem Dantuma
26e28bdda8 Revert changes 2020-09-18 14:29:50 +02:00
Willem Dantuma
15d1f14ee1 More or less working now 2020-09-18 14:20:33 +02:00
Willem Dantuma
22e007b70b First attempt to bring back 3D view in map 2020-09-18 08:38:05 +02:00
Willem Dantuma
9e4a538a07 Implement min/maxzoom on vectorlayer
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-16 20:09:52 +02:00
Willem Dantuma
c44c771feb Use indexKey if specified
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-16 15:02:42 +02:00
Willem Dantuma
394bbab320 Add support for alpha in legend
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-16 14:40:03 +02:00
Willem Dantuma
3008081ae8 Implement stylecache for vectorlayer
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-16 13:38:06 +02:00
Willem Dantuma
7474c00498 Fix layerindex
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-16 10:34:04 +02:00
Willem Dantuma
964bf925e7 Fix typo
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-15 15:01:20 +02:00
Willem Dantuma
fb8129148d Add to module
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-15 14:01:24 +02:00
Willem Dantuma
73db03148a First attempt package preload strategy 2020-09-15 14:00:18 +02:00
Willem Dantuma
6367d3399d Implement default baselayer option
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-09 09:54:50 +02:00
Willem Dantuma
ee4e7113d2 Add TileJSON interface 2020-09-09 09:47:32 +02:00
Willem Dantuma
ad86e41345 Add background-color padding and border
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-04 10:40:34 +02:00
Willem Dantuma
e682b375e7 Add user-menu router outlet
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-04 10:10:01 +02:00
Willem Dantuma
78425a621a Fix fm-hasclaim
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-03 12:43:55 +02:00
1030b1c41a removed logging in weather service.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
changed moment to peerdependency.
2020-09-03 10:37:24 +02:00
76bdad6eaf fixed build
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-03 10:25:39 +02:00
ce56dd9e9f updated weather service with correct date manipulation.
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-09-03 10:19:12 +02:00
e7a53ba7b5 HourlyWeatherData time changed to string.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-02 21:32:47 +02:00
9f1f6934ee made hourly weather data static typed.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-02 16:21:49 +02:00
773bf3f5e7 fix build
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-09-02 15:28:12 +02:00
cdc900d5fd fixed weather service
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-09-02 15:23:54 +02:00
80522a3a2f Revert "AW-1435 Add links to package manager and widget manager"
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This reverts commit 0157812357.
2020-08-17 15:53:02 +02:00
0157812357 AW-1435 Add links to package manager and widget manager
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-17 14:19:38 +02:00
329564d8f6 AW-1431 Oops
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-13 15:47:04 +02:00
ba2a067c8b AW-1431 Expose new property
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-08-13 15:28:30 +02:00
4d67a656f5 AW-1431 Add InitUserSettingsRoot
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-13 13:06:28 +02:00
ad1d40cdd1 AW-1426 Add extra check.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-11 19:13:57 +02:00
131e0eb371 Cleanup
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-11 19:03:05 +02:00
e563011099 New try
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-08-11 18:58:50 +02:00
7c072752c8 Build fixed
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-08-11 18:52:39 +02:00
36ced002e0 Fix build
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-08-11 18:50:08 +02:00
3e1b892eef Fix build?
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-08-11 18:38:15 +02:00
f4004cf2be Revert "AW-1426 Add extra check"
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
This reverts commit a6fd052a4f.
2020-08-11 14:42:45 +02:00
d1d8723186 Rollback c028adfb77
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-08-11 14:40:04 +02:00
a6fd052a4f AW-1426 Add extra check
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-08-11 14:35:04 +02:00
cede944538 Revert "AW-1426 Remove default component if none found"
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
This reverts commit 3b3c2768d3.
2020-08-11 14:24:12 +02:00
3b3c2768d3 AW-1426 Remove default component if none found
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-08-11 14:11:51 +02:00
3dd19c702f Remove Trijntje
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-08-11 13:32:05 +02:00
c028adfb77 Updated statistics confidence interval.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-06 12:04:56 +02:00
1d2caa0fe3 Updated statistics labels.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-06 09:15:31 +02:00
Willem Dantuma
d7ca1512bd Add TaskProgressEvent
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-05 20:05:44 +02:00
Willem Dantuma
ebe435027f Add addedfiles stream
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-05 15:49:02 +02:00
Willem Dantuma
dfefa6746f Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-05 10:34:04 +02:00
Willem Dantuma
c90df5c972 Fix userPackagesChanged 2020-08-05 10:33:55 +02:00
514a91c2c7 Improved implementation to retrieve user packages.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-05 09:02:28 +02:00
Willem Dantuma
ee7d1cb9a2 AW-1419
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-04 16:09:22 +02:00
309b320534 AW-1415 Add postItemPackageTask
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-04 14:08:50 +02:00
fdfa7d3387 Typo
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-03 08:48:11 +02:00
Willem Dantuma
6785bfc3e0 Fix when not having READ rights on the parent
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-08-01 09:44:32 +02:00
Willem Dantuma
c682fb9184 Fix z-index
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-31 09:51:28 +02:00
Willem Dantuma
ca6ea96eae Add interfacetype VectorWFSJson
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-30 09:33:32 +02:00
Willem Dantuma
3ebc197fac Make extent nullable
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-29 08:43:17 +02:00
52871efb09 fix for statistics
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-28 20:02:23 +02:00
f014dc9f93 now use statistics if available in band.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-28 19:05:38 +02:00
e6cda406c9 improved alignment of legend. fixed rain in weatherservice.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-25 09:57:24 +02:00
df04397b13 I info icon now placed in the top right.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-23 19:39:06 +02:00
Willem Dantuma
e0b29c905c Fix height
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-23 11:48:31 +02:00
Willem Dantuma
44ae806b30 Add offline alert
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-23 11:28:07 +02:00
Willem Dantuma
78e3cf74b9 Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-23 09:43:03 +02:00
Willem Dantuma
428353d379 Fix inituser flow 2020-07-23 09:42:44 +02:00
9697e93915 convert hourly to daily with wilco's new changes for weather2.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-22 23:04:06 +02:00
Willem Dantuma
e057e463bd Only on change
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-22 21:16:38 +02:00
Willem Dantuma
d494a7c7d6 Implement healthcheck service
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-22 20:31:12 +02:00
Willem Dantuma
e525227865 another attempt to implement on /offline
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-22 18:49:15 +02:00
Willem Dantuma
10bdd27608 Check token when going online
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-22 09:05:02 +02:00
Willem Dantuma
2790ae74e7 Mirror navigator online flag in observable state 2020-07-22 08:52:41 +02:00
Willem Dantuma
31d01c75c5 And another potential issue
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-22 08:23:53 +02:00
Willem Dantuma
0da8d3d46d Fix editing unidentified type
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-22 08:22:35 +02:00
Willem Dantuma
60761e9f4a Fix typo
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-21 19:28:14 +02:00
Willem Dantuma
ec9684b826 Set upload flag only when file is found
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-21 19:11:30 +02:00
Willem Dantuma
1073044f31 Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-21 18:40:10 +02:00
Willem Dantuma
81126974f5 After cancel a single file close the upload dialog 2020-07-21 18:39:51 +02:00
06f443a503 fix circular dependency error.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-21 17:06:58 +02:00
eb560aaf33 added weather method do receive historical + forecast weatherdata.
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-07-21 16:57:11 +02:00
Willem Dantuma
464b82bfb9 Fix colspan
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-21 11:21:34 +02:00
Willem Dantuma
1c75fb6f71 Fix upload dialog
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-20 15:07:25 +02:00
Willem Dantuma
5f5d8a9712 Do not add when cancelled
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-20 14:59:27 +02:00
Willem Dantuma
dc329a0e29 Try to fix file count
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-20 14:50:00 +02:00
Willem Dantuma
15a09e4b05 Attempt to fix multiple queue events for file upload
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-20 14:13:30 +02:00
94f973406e fixed parent name size.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-15 23:35:22 +02:00
6404e45d66 fix bug.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-15 23:28:17 +02:00
c0f689331e Added parentitem title to geotiff, shape and temporal selected-item components.
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-07-15 23:15:31 +02:00
0f5a5251db only show legend title if one layer
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-15 13:41:25 +02:00
3352bfd805 Added schema layout api to schemaService
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-09 13:45:24 +02:00
Willem Dantuma
60ed2afaa4 Fix build
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-07-07 09:45:13 +02:00
Willem Dantuma
9ac534c171 Fix build
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-07-07 09:42:30 +02:00
Willem Dantuma
cecbdb2ded Fix dates
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-07-07 09:37:17 +02:00
Willem Dantuma
1092d5dcaf Fix build
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-07-07 09:31:47 +02:00
Willem Dantuma
4af6b2937c Refactor Date to string
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-07-07 09:24:45 +02:00
263fb6c3d4 Changed schema service to return any for json object.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-30 16:30:33 +02:00
Willem Dantuma
09fa8b4f1f Fix template selection
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-30 09:11:46 +02:00
Willem Dantuma
214dc3ffa1 Refactor temporallast
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-29 16:09:19 +02:00
Willem Dantuma
fad04744cf Refactor ILayer
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-29 16:00:53 +02:00
Willem Dantuma
033b74517f Export IDataLayer
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-29 15:51:08 +02:00
Willem Dantuma
0b7564e874 Add data layer
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-29 15:44:23 +02:00
Willem Dantuma
0d247e6416 Fix layerswitcher not opening
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-26 09:18:07 +02:00
Willem Dantuma
b92cc7bc09 Fix build
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-26 09:02:33 +02:00
Willem Dantuma
eba18b0235 Close menu's on map click
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-06-26 08:49:35 +02:00
Willem Dantuma
69f8184dfe add closeall action
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-26 08:22:31 +02:00
Willem Dantuma
31c1570ffb Fix relogin issue on mobile
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-25 19:04:40 +02:00
Willem Dantuma
fe2650c4fd Refactored logout
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-25 18:52:13 +02:00
Willem Dantuma
f89209c555 Add logout event handler
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-25 17:21:12 +02:00
Willem Dantuma
b3d0a6f0c7 parse dataenddate
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-25 10:34:25 +02:00
Willem Dantuma
6bd1726fc9 Add dataenddate
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-25 10:01:54 +02:00
Willem Dantuma
b0ff54d157 Add dataenddate
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-25 09:47:53 +02:00
Willem Dantuma
277dc7051e Add shadow and transition
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-24 15:49:57 +02:00
Willem Dantuma
ace4a6b364 Implement toggleaccountmenu action
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-24 15:07:11 +02:00
Willem Dantuma
146514d386 Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-24 13:08:27 +02:00
Willem Dantuma
1187ee9fd6 Implement logout 2020-06-24 13:08:13 +02:00
4527276254 Changed schema service.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-24 11:52:05 +02:00
Willem Dantuma
6f52302875 Fix build
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-24 08:40:28 +02:00
Willem Dantuma
cbe27c2add Refactor template selection logic add forpackage decorator
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-06-24 08:35:34 +02:00
Willem Dantuma
cd156ab1bc Export packageservice
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-24 07:56:28 +02:00
Willem Dantuma
f9d0e2aee0 Implemented hasclaim directive
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-23 17:51:47 +02:00
Willem Dantuma
253b3d3c90 Fix build
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-23 15:44:14 +02:00
Willem Dantuma
28d4adc571 AW-1330
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
2020-06-23 15:39:30 +02:00
Willem Dantuma
925af1e645 Update dependency
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-23 14:18:49 +02:00
Willem Dantuma
4130e0a796 Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-23 13:36:29 +02:00
Willem Dantuma
01933b1602 AW-1330 add atitemlocationitem parameter 2020-06-23 13:36:03 +02:00
0482aa7124 Added provided in root for schema service
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-22 13:37:38 +02:00
75015f6d22 Added schema service
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-22 13:12:02 +02:00
aa3707aa56 Added getSchema method to itemtypes service.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-22 12:20:02 +02:00
Willem Dantuma
ff06b419f2 Fix top in fullscreen mode
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-12 12:53:43 +02:00
Willem Dantuma
c1c0bd2596 Add start of user/account menu
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-12 12:24:08 +02:00
Willem Dantuma
978cbdabfc Read both farmmaps currentuser and authenticate userinfo
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
2020-06-10 21:53:54 +02:00
199 changed files with 90011 additions and 8739 deletions

1
.npmrc
View File

@@ -1 +0,0 @@
@FarmMaps:registry=https://repository.akkerweb.nl/repository/npm-group/

View File

@@ -7,18 +7,22 @@ pipeline {
stages { stages {
stage('npm install'){ stage('npm install'){
steps { steps {
sh '''npm install sh '''rm -rf node_modules/
npm install
cd projects/common cd projects/common
npm install npm install
cd ../common-map cd ../common-map
npm install npm install
cd ../common-map3d
npm install
''' '''
} }
} }
stage('build'){ stage('build'){
steps { steps {
sh '''ng build common sh '''ng build common
ng build common-map''' ng build common-map
ng build common-map3d'''
} }
} }
stage('npm publish'){ stage('npm publish'){
@@ -28,6 +32,9 @@ pipeline {
npm publish npm publish
cd ../common-map cd ../common-map
npm version ${PACKAGE_VERSION} npm version ${PACKAGE_VERSION}
npm publish
cd ../common-map3d
npm version ${PACKAGE_VERSION}
npm publish''' npm publish'''
} }
} }

View File

@@ -11,8 +11,11 @@
"schematics": {}, "schematics": {},
"architect": { "architect": {
"build": { "build": {
"builder": "@angular-devkit/build-angular:browser", "builder": "@angular-builders/custom-webpack:browser",
"options": { "options": {
"customWebpackConfig": {
"path": "./custom-webpack.config.js"
},
"aot": true, "aot": true,
"outputPath": "dist/farmmaps-lib-app", "outputPath": "dist/farmmaps-lib-app",
"index": "src/index.html", "index": "src/index.html",
@@ -22,29 +25,35 @@
"assets": [ "assets": [
{ {
"glob": "**/*", "glob": "**/*",
"input":"src/assets/images", "input": "src/assets/images",
"output":"/images" "output": "/images"
}, },
{ {
"glob": "silent-refresh.html", "glob": "silent-refresh.html",
"input":"src/assets", "input": "src/assets",
"output":"/" "output": "/"
}, },
{ {
"glob": "favicon.ico", "glob": "favicon.ico",
"input":"src/assets", "input": "src/assets",
"output":"/" "output": "/"
},
{
"glob": "**/*",
"input": "node_modules/cesium/Build/Cesium",
"output": "/assets/cesium"
}, },
"src/configuration.json" "src/configuration.json"
], ],
"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-5.15.2/css/all.min.css",
"fonts/FMIconFont/style.css" "fonts/FMIconFont/style.css",
"node_modules/cesium/Build/Cesium/Widgets/widgets.css",
"node_modules/ol/ol.css"
], ],
"scripts": [], "scripts": []
"es5BrowserSupport": true
}, },
"configurations": { "configurations": {
"production": { "production": {
@@ -78,7 +87,7 @@
} }
}, },
"serve": { "serve": {
"builder": "@angular-devkit/build-angular:dev-server", "builder": "@angular-builders/custom-webpack:dev-server",
"options": { "options": {
"browserTarget": "farmmaps-lib-app:build" "browserTarget": "farmmaps-lib-app:build"
}, },
@@ -232,6 +241,46 @@
} }
} }
} }
},
"common-map3d": {
"projectType": "library",
"root": "projects/common-map3d",
"sourceRoot": "projects/common-map3d/src",
"prefix": "fm-map3d",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr:build",
"options": {
"tsConfig": "projects/common-map3d/tsconfig.lib.json",
"project": "projects/common-map3d/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/common-map3d/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/common-map3d/src/test.ts",
"tsConfig": "projects/common-map3d/tsconfig.spec.json",
"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" "defaultProject": "farmmaps-lib-app"

10
custom-webpack.config.js Normal file
View File

@@ -0,0 +1,10 @@
module.exports = {
node: {
// Resolve node module use of fs
fs: "empty",
Buffer: false,
http: "empty",
https: "empty",
zlib: "empty"
}
};

12788
fontawesome-5.15.2/css/all.css Normal file

File diff suppressed because it is too large Load Diff

5
fontawesome-5.15.2/css/all.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,15 @@
/*!
* Font Awesome Pro 5.15.2 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license (Commercial License)
*/
@font-face {
font-family: 'Font Awesome 5 Brands';
font-style: normal;
font-weight: 400;
font-display: block;
src: url("../webfonts/fa-brands-400.eot");
src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url("../webfonts/fa-brands-400.svg#fontawesome") format("svg"); }
.fab {
font-family: 'Font Awesome 5 Brands';
font-weight: 400; }

5
fontawesome-5.15.2/css/brands.min.css vendored Normal file
View File

@@ -0,0 +1,5 @@
/*!
* Font Awesome Pro 5.15.2 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license (Commercial License)
*/
@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands";font-weight:400}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

7138
fontawesome-5.15.2/css/fontawesome.css vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,15 @@
/*!
* Font Awesome Pro 5.15.2 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license (Commercial License)
*/
@font-face {
font-family: 'Font Awesome 5 Pro';
font-style: normal;
font-weight: 300;
font-display: block;
src: url("../webfonts/fa-light-300.eot");
src: url("../webfonts/fa-light-300.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-light-300.woff2") format("woff2"), url("../webfonts/fa-light-300.woff") format("woff"), url("../webfonts/fa-light-300.ttf") format("truetype"), url("../webfonts/fa-light-300.svg#fontawesome") format("svg"); }
.fal {
font-family: 'Font Awesome 5 Pro';
font-weight: 300; }

5
fontawesome-5.15.2/css/light.min.css vendored Normal file
View File

@@ -0,0 +1,5 @@
/*!
* Font Awesome Pro 5.15.2 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license (Commercial License)
*/
@font-face{font-family:"Font Awesome 5 Pro";font-style:normal;font-weight:300;font-display:block;src:url(../webfonts/fa-light-300.eot);src:url(../webfonts/fa-light-300.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-light-300.woff2) format("woff2"),url(../webfonts/fa-light-300.woff) format("woff"),url(../webfonts/fa-light-300.ttf) format("truetype"),url(../webfonts/fa-light-300.svg#fontawesome) format("svg")}.fal{font-family:"Font Awesome 5 Pro";font-weight:300}

View File

@@ -0,0 +1,15 @@
/*!
* Font Awesome Pro 5.15.2 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license (Commercial License)
*/
@font-face {
font-family: 'Font Awesome 5 Pro';
font-style: normal;
font-weight: 400;
font-display: block;
src: url("../webfonts/fa-regular-400.eot");
src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url("../webfonts/fa-regular-400.svg#fontawesome") format("svg"); }
.far {
font-family: 'Font Awesome 5 Pro';
font-weight: 400; }

View File

@@ -0,0 +1,5 @@
/*!
* Font Awesome Pro 5.15.2 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license (Commercial License)
*/
@font-face{font-family:"Font Awesome 5 Pro";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-family:"Font Awesome 5 Pro";font-weight:400}

View File

@@ -0,0 +1,16 @@
/*!
* Font Awesome Pro 5.15.2 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license (Commercial License)
*/
@font-face {
font-family: 'Font Awesome 5 Pro';
font-style: normal;
font-weight: 900;
font-display: block;
src: url("../webfonts/fa-solid-900.eot");
src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url("../webfonts/fa-solid-900.svg#fontawesome") format("svg"); }
.fa,
.fas {
font-family: 'Font Awesome 5 Pro';
font-weight: 900; }

5
fontawesome-5.15.2/css/solid.min.css vendored Normal file
View File

@@ -0,0 +1,5 @@
/*!
* Font Awesome Pro 5.15.2 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license (Commercial License)
*/
@font-face{font-family:"Font Awesome 5 Pro";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.fas{font-family:"Font Awesome 5 Pro";font-weight:900}

View File

@@ -0,0 +1,371 @@
/*!
* Font Awesome Pro 5.15.2 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license (Commercial License)
*/
svg:not(:root).svg-inline--fa {
overflow: visible; }
.svg-inline--fa {
display: inline-block;
font-size: inherit;
height: 1em;
overflow: visible;
vertical-align: -.125em; }
.svg-inline--fa.fa-lg {
vertical-align: -.225em; }
.svg-inline--fa.fa-w-1 {
width: 0.0625em; }
.svg-inline--fa.fa-w-2 {
width: 0.125em; }
.svg-inline--fa.fa-w-3 {
width: 0.1875em; }
.svg-inline--fa.fa-w-4 {
width: 0.25em; }
.svg-inline--fa.fa-w-5 {
width: 0.3125em; }
.svg-inline--fa.fa-w-6 {
width: 0.375em; }
.svg-inline--fa.fa-w-7 {
width: 0.4375em; }
.svg-inline--fa.fa-w-8 {
width: 0.5em; }
.svg-inline--fa.fa-w-9 {
width: 0.5625em; }
.svg-inline--fa.fa-w-10 {
width: 0.625em; }
.svg-inline--fa.fa-w-11 {
width: 0.6875em; }
.svg-inline--fa.fa-w-12 {
width: 0.75em; }
.svg-inline--fa.fa-w-13 {
width: 0.8125em; }
.svg-inline--fa.fa-w-14 {
width: 0.875em; }
.svg-inline--fa.fa-w-15 {
width: 0.9375em; }
.svg-inline--fa.fa-w-16 {
width: 1em; }
.svg-inline--fa.fa-w-17 {
width: 1.0625em; }
.svg-inline--fa.fa-w-18 {
width: 1.125em; }
.svg-inline--fa.fa-w-19 {
width: 1.1875em; }
.svg-inline--fa.fa-w-20 {
width: 1.25em; }
.svg-inline--fa.fa-pull-left {
margin-right: .3em;
width: auto; }
.svg-inline--fa.fa-pull-right {
margin-left: .3em;
width: auto; }
.svg-inline--fa.fa-border {
height: 1.5em; }
.svg-inline--fa.fa-li {
width: 2em; }
.svg-inline--fa.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 {
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, .fa-layers-counter {
display: inline-block;
position: absolute;
text-align: 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: #ff253a;
border-radius: 1em;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: #fff;
height: 1.5em;
line-height: 1;
max-width: 5em;
min-width: 1.5em;
overflow: hidden;
padding: .25em;
right: 0;
text-overflow: ellipsis;
top: 0;
-webkit-transform: scale(0.25);
transform: scale(0.25);
-webkit-transform-origin: top right;
transform-origin: top right; }
.fa-layers-bottom-right {
bottom: 0;
right: 0;
top: auto;
-webkit-transform: scale(0.25);
transform: scale(0.25);
-webkit-transform-origin: bottom right;
transform-origin: bottom right; }
.fa-layers-bottom-left {
bottom: 0;
left: 0;
right: auto;
top: auto;
-webkit-transform: scale(0.25);
transform: scale(0.25);
-webkit-transform-origin: bottom left;
transform-origin: bottom left; }
.fa-layers-top-right {
right: 0;
top: 0;
-webkit-transform: scale(0.25);
transform: scale(0.25);
-webkit-transform-origin: top right;
transform-origin: top right; }
.fa-layers-top-left {
left: 0;
right: auto;
top: 0;
-webkit-transform: scale(0.25);
transform: scale(0.25);
-webkit-transform-origin: top left;
transform-origin: top left; }
.fa-lg {
font-size: 1.33333em;
line-height: 0.75em;
vertical-align: -.0667em; }
.fa-xs {
font-size: .75em; }
.fa-sm {
font-size: .875em; }
.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-fw {
text-align: center;
width: 1.25em; }
.fa-ul {
list-style-type: none;
margin-left: 2.5em;
padding-left: 0; }
.fa-ul > li {
position: relative; }
.fa-li {
left: -2em;
position: absolute;
text-align: center;
width: 2em;
line-height: inherit; }
.fa-border {
border: solid 0.08em #eee;
border-radius: .1em;
padding: .2em .25em .15em; }
.fa-pull-left {
float: left; }
.fa-pull-right {
float: right; }
.fa.fa-pull-left,
.fas.fa-pull-left,
.far.fa-pull-left,
.fal.fa-pull-left,
.fab.fa-pull-left {
margin-right: .3em; }
.fa.fa-pull-right,
.fas.fa-pull-right,
.far.fa-pull-right,
.fal.fa-pull-right,
.fab.fa-pull-right {
margin-left: .3em; }
.fa-spin {
-webkit-animation: fa-spin 2s infinite linear;
animation: fa-spin 2s infinite linear; }
.fa-pulse {
-webkit-animation: fa-spin 1s infinite steps(8);
animation: fa-spin 1s infinite steps(8); }
@-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 {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
-webkit-transform: rotate(90deg);
transform: rotate(90deg); }
.fa-rotate-180 {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";
-webkit-transform: rotate(180deg);
transform: rotate(180deg); }
.fa-rotate-270 {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
-webkit-transform: rotate(270deg);
transform: rotate(270deg); }
.fa-flip-horizontal {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";
-webkit-transform: scale(-1, 1);
transform: scale(-1, 1); }
.fa-flip-vertical {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
-webkit-transform: scale(1, -1);
transform: scale(1, -1); }
.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
-webkit-transform: scale(-1, -1);
transform: scale(-1, -1); }
:root .fa-rotate-90,
:root .fa-rotate-180,
:root .fa-rotate-270,
:root .fa-flip-horizontal,
:root .fa-flip-vertical,
:root .fa-flip-both {
-webkit-filter: none;
filter: none; }
.fa-stack {
display: inline-block;
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; }
.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: #fff; }
.sr-only {
border: 0;
clip: rect(0, 0, 0, 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px; }
.sr-only-focusable:active, .sr-only-focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto; }
.svg-inline--fa .fa-primary {
fill: var(--fa-primary-color, currentColor);
opacity: 1;
opacity: var(--fa-primary-opacity, 1); }
.svg-inline--fa .fa-secondary {
fill: var(--fa-secondary-color, currentColor);
opacity: 0.4;
opacity: var(--fa-secondary-opacity, 0.4); }
.svg-inline--fa.fa-swap-opacity .fa-primary {
opacity: 0.4;
opacity: var(--fa-secondary-opacity, 0.4); }
.svg-inline--fa.fa-swap-opacity .fa-secondary {
opacity: 1;
opacity: var(--fa-primary-opacity, 1); }
.svg-inline--fa mask .fa-primary,
.svg-inline--fa mask .fa-secondary {
fill: black; }
.fad.fa-inverse {
color: #fff; }

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 730 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -23,6 +23,30 @@
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";
}
@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 */

13089
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,56 +11,61 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular/animations": "~9.1.0", "@angular/animations": "~10.1.3",
"@angular/common": "~9.1.0", "@angular/common": "~10.1.3",
"@angular/compiler": "~9.1.0", "@angular/compiler": "~10.1.3",
"@angular/core": "~9.1.0", "@angular/core": "~10.1.3",
"@angular/forms": "~9.1.0", "@angular/forms": "~10.1.3",
"@angular/platform-browser": "~9.1.0", "@angular/platform-browser": "~10.1.3",
"@angular/platform-browser-dynamic": "~9.1.0", "@angular/platform-browser-dynamic": "~10.1.3",
"@angular/router": "~9.1.0", "@angular/router": "~10.1.3",
"@farmmaps/common": ">=0.0.1-prerelease.478 <0.0.1",
"@farmmaps/common-map": ">=0.0.1-prerelease.478 <0.0.1",
"@farmmaps/common-map3d": ">=0.0.1-prerelease.478 <0.0.1",
"@microsoft/signalr": "^3.1.3", "@microsoft/signalr": "^3.1.3",
"@farmmaps/common": ">=0.0.1-prerelease.267 <0.0.1", "@ng-bootstrap/ng-bootstrap": "^7.0",
"@farmmaps/common-map": ">=0.0.1-prerelease.267 <0.0.1", "@ngrx/effects": "^10.0",
"@ng-bootstrap/ng-bootstrap": "^6.0", "@ngrx/router-store": "^10.0",
"@ngrx/effects": "^9.0", "@ngrx/store": "^10.0",
"@ngrx/router-store": "^9.0", "angular-oauth2-oidc": "^10.0.3",
"@ngrx/store": "^9.0",
"ngx-uploadx": "^3.3.4",
"angular-oauth2-oidc": "^9.1",
"bootstrap": "^4.4.1", "bootstrap": "^4.4.1",
"cesium": "^1.73.0",
"core-js": "^2.6.11", "core-js": "^2.6.11",
"font-awesome": "^4.7.0", "ngrx-store-localstorage": "^10.0",
"ngrx-store-localstorage": "^9.0", "ngx-bootstrap": "^5.6.1",
"ngx-openlayers": "1.0.0-next.16",
"ngx-uploadx": "^3.5.1",
"ol": "6.4.3",
"ol-cesium": "^2.11.3",
"resumablejs": "^1.1.0", "resumablejs": "^1.1.0",
"rxjs": "^6.5.4", "rxjs": "^6.5.4",
"tassign": "^1.0.0", "tassign": "^1.0.0",
"tslib": "^1.10.0", "tslib": "^2.0.0",
"zone.js": "~0.10.2", "zone.js": "~0.10.2",
"ngx-openlayers": "1.0.0-next.13", "moment": "^2.27.0"
"ol": "6.1.1"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.901.0", "@angular-builders/custom-webpack": "~10.0.1",
"@angular-devkit/build-ng-packagr": "~0.901.0", "@angular-devkit/build-angular": "^0.1002.0",
"@angular/cli": "^9.1.0", "@angular-devkit/build-ng-packagr": "~0.1001.3",
"@angular/compiler-cli": "~9.1.0", "@angular/cli": "^10.1.3",
"@angular/language-service": "~9.1.0", "@angular/compiler-cli": "~10.1.3",
"@angular/language-service": "~10.1.3",
"@types/jasmine": "~2.8.8", "@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1", "@types/node": "^12.11.1",
"codelyzer": "^5.1.2", "codelyzer": "^5.1.2",
"jasmine-core": "~2.99.1", "jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~5.0.0",
"karma": "^5.0.2", "karma": "~5.0.0",
"karma-chrome-launcher": "~2.2.0", "karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.0.1", "karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~1.1.2", "karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^0.2.2", "karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^9.0.0", "ng-packagr": "^10.1.0",
"protractor": "^5.4.4", "protractor": "~7.0.0",
"ts-node": "^8.8.1", "ts-node": "^8.8.1",
"tslint": "~5.11.0", "tslint": "~6.1.0",
"typescript": "~3.8.3" "typescript": "~4.0.3"
} }
} }

View File

@@ -4,79 +4,10 @@
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@openlayers/pepjs": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/@openlayers/pepjs/-/pepjs-0.5.3.tgz",
"integrity": "sha512-Bgvi5c14BS0FJWyYWWFstNEnXsB30nK8Jt8hkAAdqr7E0gDdBBWVDglF3Ub19wTxvgJ/CVHyTY6VuCtnyRzglg=="
},
"ieee754": {
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
},
"ngx-openlayers": {
"version": "1.0.0-next.13",
"resolved": "https://registry.npmjs.org/ngx-openlayers/-/ngx-openlayers-1.0.0-next.13.tgz",
"integrity": "sha512-6y724s5JV6n1oxEhryxP3wcbwzpierj9RLiMLXInfKOG3l5IO1AtPNkeK9+mKctVDUVm5URIfzzZH02Ld+bvSQ==",
"requires": {
"tslib": "^1.9.0"
}
},
"ol": {
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/ol/-/ol-6.1.1.tgz",
"integrity": "sha512-0dL3i3eJqgOpqIjDKEY3grkeQnjAYfV5L/JCxhOu4SxiaizRwFrFgeas6LILRoxKa03jhQFbut2r2bbgcLGQeA==",
"requires": {
"@openlayers/pepjs": "^0.5.3",
"pbf": "3.2.1",
"pixelworks": "1.1.0",
"rbush": "^3.0.1"
}
},
"pbf": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz",
"integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==",
"requires": {
"ieee754": "^1.1.12",
"resolve-protobuf-schema": "^2.1.0"
}
},
"pixelworks": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/pixelworks/-/pixelworks-1.1.0.tgz",
"integrity": "sha1-Hwla1I3Ki/ihyCWOAJIDGkTyLKU="
},
"protocol-buffers-schema": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.4.0.tgz",
"integrity": "sha512-G/2kcamPF2S49W5yaMGdIpkG6+5wZF0fzBteLKgEHjbNzqjZQ85aAs1iJGto31EJaSTkNvHs5IXuHSaTLWBAiA=="
},
"quickselect": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz",
"integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw=="
},
"rbush": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz",
"integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==",
"requires": {
"quickselect": "^2.0.0"
}
},
"resolve-protobuf-schema": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz",
"integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==",
"requires": {
"protocol-buffers-schema": "^3.3.1"
}
},
"tslib": { "tslib": {
"version": "1.10.0", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz",
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ=="
} }
} }
} }

View File

@@ -4,15 +4,18 @@
"publishConfig": { "publishConfig": {
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/" "registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
}, },
"dependencies": {
"tslib": "^2.0.0"
},
"peerDependencies": { "peerDependencies": {
"@angular/core": "^9.1.0", "@angular/core": "^10.1.3",
"ngrx-store-localstorage": "^9.0", "ngrx-store-localstorage": "^10.0",
"@ngrx/effects": "^9.0", "@ngrx/effects": "^10.0",
"@ngrx/router-store": "^9.0", "@ngrx/router-store": "^10.0",
"@ngrx/store": "^9.0", "@ngrx/store": "^10.0",
"tassign": "^1.0.0", "tassign": "^1.0.0",
"@farmmaps/common": ">=0.0.1-prerelease.265 <0.0.1", "@farmmaps/common": ">=0.0.1-prerelease.420 <0.0.1",
"ngx-openlayers": "1.0.0-next.13", "ngx-openlayers": "1.0.0-next.16",
"ol": "6.1.1" "ol": "6.1.1"
} }
} }

View File

@@ -16,6 +16,7 @@ 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 +33,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 +44,7 @@ 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 class Clear implements Action { export class Clear implements Action {
readonly type = CLEAR; readonly type = CLEAR;
@@ -87,7 +90,7 @@ 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>, public query:IQueryState) { }
} }
export class SelectFeature implements Action { export class SelectFeature implements Action {
@@ -105,7 +108,7 @@ export class SelectItem implements Action {
export class SelectItemSuccess implements Action { export class SelectItemSuccess implements Action {
readonly type = SELECTITEMSUCCESS; readonly type = SELECTITEMSUCCESS;
constructor(public item: IItem) { } constructor(public item: IItem, public parentItem: IItem) { }
} }
export class SelectTemporalItemsSuccess implements Action { export class SelectTemporalItemsSuccess implements Action {
@@ -180,6 +183,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 +213,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;
@@ -256,6 +271,12 @@ 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>) { }
}
export type Actions = SetMapState export type Actions = SetMapState
| Init | Init
| Clear | Clear
@@ -278,6 +299,7 @@ export type Actions = SetMapState
| SetTimeSpan | SetTimeSpan
| AddLayer | AddLayer
| RemoveLayer | RemoveLayer
| ClearLayers
| SetVisibility | SetVisibility
| SetOpacity | SetOpacity
| SetLayerIndex | SetLayerIndex
@@ -291,5 +313,7 @@ export type Actions = SetMapState
| DoQuery | DoQuery
| SetStyle | SetStyle
| ShowLayerSwitcher | ShowLayerSwitcher
| SetReplaceUrl; | SetReplaceUrl
| SetFeatures
| SetSelectedItemLayer;

View File

@@ -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({

View File

@@ -24,7 +24,6 @@ import { IPeriodState } from './models/period.state';
// components // components
import { GpsLocation} from './components/aol/gps-location/gps-location.component'; import { GpsLocation} from './components/aol/gps-location/gps-location.component';
//import {Switch2D3DComponent } from './components/aol/switch2d3d/switch2d3d.component';
import {FeatureListFeatureCropfieldComponent } from './components/feature-list-feature-cropfield/feature-list-feature-cropfield.component'; import {FeatureListFeatureCropfieldComponent } from './components/feature-list-feature-cropfield/feature-list-feature-cropfield.component';
import { FeatureListFeatureCroppingschemeComponent} from './components/feature-list-feature-croppingscheme/feature-list-feature-croppingscheme.component'; import { FeatureListFeatureCroppingschemeComponent} from './components/feature-list-feature-croppingscheme/feature-list-feature-croppingscheme.component';
import { ItemWidgetListComponent} from './components/item-widget-list/item-widget-list.component'; import { ItemWidgetListComponent} from './components/item-widget-list/item-widget-list.component';
@@ -64,8 +63,11 @@ import { WidgetStatusComponent } from './components/widget-status/widget-status.
import { ForChild} from './components/for-item/for-child.decorator'; import { ForChild} from './components/for-item/for-child.decorator';
import {ForItemType } from './components/for-item/for-itemtype.decorator'; import {ForItemType } from './components/for-item/for-itemtype.decorator';
import { ForSourceTask} from './components/for-item/for-sourcetask.decorator'; import { ForSourceTask} from './components/for-item/for-sourcetask.decorator';
import { ForPackage } from './components/for-item/for-package.decorator';
import { PanToLocation} from './components/aol/pan-to-location/pan-to-location.component'; import { PanToLocation} from './components/aol/pan-to-location/pan-to-location.component';
import {LayerSwitcher} from './components/layer-switcher/layer-switcher.component'; import {LayerSwitcher} from './components/layer-switcher/layer-switcher.component';
import {HistogramDetailsComponent} from './components/legend/histogram-details/histogram-details.component';
import {StatisticsDetailsComponent} from './components/legend/statistics-details/statistics-details.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) {
@@ -143,10 +145,11 @@ export {
IPeriodState, IPeriodState,
ForChild, ForChild,
ForItemType, ForItemType,
ForSourceTask ForSourceTask,
ForPackage
} }
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
AngularOpenlayersModule, AngularOpenlayersModule,
@@ -193,7 +196,9 @@ export {
WidgetStatusComponent, WidgetStatusComponent,
GpsLocation, GpsLocation,
PanToLocation, PanToLocation,
LayerSwitcher LayerSwitcher,
HistogramDetailsComponent,
StatisticsDetailsComponent
], ],
entryComponents: [ entryComponents: [
FeatureListComponent, FeatureListComponent,
@@ -246,31 +251,26 @@ export {
FeatureListCropfieldComponent, FeatureListCropfieldComponent,
FeatureListFeatureContainerComponent, FeatureListFeatureContainerComponent,
ZoomToExtentComponent ZoomToExtentComponent
],
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 }
] ]
}) })
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 }
]
};
}
} }

View File

@@ -1,4 +1,4 @@
import { Component, OnInit, Input, ViewChild, ElementRef, OnChanges, SimpleChanges } 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';
@@ -23,9 +23,10 @@ export class GpsLocation implements OnInit,OnChanges{
public path: string = ""; public path: string = "";
public rotate: string = ""; public rotate: string = "";
private resolution: number = 0; private resolution: number = 0;
initialized:boolean = false;
@ViewChild('location', { static: true }) locationElement: ElementRef; @ViewChild('location', { static: true }) locationElement: ElementRef;
constructor(private map: MapComponent) { constructor(@Host() private map: MapComponent) {
} }
@@ -54,12 +55,13 @@ export class GpsLocation implements OnInit,OnChanges{
this.resolution = evt.target.get('resolution'); this.resolution = evt.target.get('resolution');
this.recalcLocationTolerance(); this.recalcLocationTolerance();
}); });
this.initialized = true;
} }
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 Position;
if(p) { 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;
this.recalcLocationTolerance(); this.recalcLocationTolerance();

View File

@@ -1,8 +1,7 @@
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} from '../../../models/color.map';
import {Extent} from 'ol/extent'; import {Extent} from 'ol/extent';
@@ -11,13 +10,12 @@ 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} from 'ol/source'; import {XYZ,ImageStatic,OSM,BingMaps,TileWMS,TileArcGISRest,TileJSON} 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 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';
@Component({ @Component({
selector: 'fm-map-item-layers', selector: 'fm-map-item-layers',
@@ -27,11 +25,17 @@ 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<string> = new EventEmitter<string>();
@Output() onFeatureHover: EventEmitter<string> = new EventEmitter<string>();
private _apiEndPoint: string; private _apiEndPoint: string;
private initialized:boolean = false;
private mapEventHandlerInstalled = false;
private selectedFeatures = {};
private selectionLayer:Layer = null;
constructor(private itemService: ItemService, @Host() private map: MapComponent, public appConfig: AppConfig) { constructor(private itemService: ItemService, @Host() private map: MapComponent, public appConfig: AppConfig) {
super(map); super(map);
this._apiEndPoint = appConfig.getConfig("apiEndPoint"); this._apiEndPoint = appConfig.getConfig("apiEndPoint");
@@ -48,9 +52,11 @@ 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(layer: ILayer, feature): style.Style { getColorFromGradient(item:IItem,layer: ILayer, feature): style.Style {
var value = feature.get(layer.name); 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];
@@ -67,7 +73,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
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));
return new style.Style( this.styleCache[key] = new style.Style(
{ {
image: new style.Circle({ image: new style.Circle({
fill: new style.Fill({ fill: new style.Fill({
@@ -79,33 +85,32 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
color: this.rgbaToHex(red, green, blue, alpha) color: this.rgbaToHex(red, green, blue, alpha)
}), }),
stroke: new style.Stroke({ stroke: new style.Stroke({
color: this.rgbaToHex(red, green, blue, alpha), color: this.rgbaToHex(red, green, blue, 255),
width: 1.25 width: 1.25
}), }),
}); });
}
return this.styleCache[key];
} }
createGeotiffLayer(item:IItem,itemLayer:IItemLayer):Layer { createGeotiffLayer(item:IItem,itemLayer:IItemLayer):Layer {
var layerIndex = -1; var layerIndex = -1;
var layer: Layer = null; var layer: Layer = 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=${item.updated.getTime()}` }); 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 });
var data = item.data; var data = item.data;
var l = (data && data.layers && data.layers.length > 0) ? data.layers[0] : null; var l = (data && data.layers && data.layers.length > 0) ? data.layers[0] : null;
if (l && l.rendering && l.rendering.renderoutputType == "Tiles") { if (l && l.rendering && l.rendering.renderoutputType == "Tiles") {
var rt = l.rendering as IRenderoutputTiles; var rt = l.rendering as IRenderoutputTiles;
let source = new XYZ({ maxZoom: rt.maxzoom, minZoom: rt.minzoom, url: `${this._apiEndPoint}/api/v1/items/${item.code}/tiles/${layerIndex}/{z}/{x}/{y}.png?v=${item.updated.getTime()}` }); let source = new XYZ({crossOrigin: 'use-credentials', maxZoom: rt.maxzoom, minZoom: rt.minzoom, 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 });
} }
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;
let projection = new Projection({ // convert to EPSG:4326 asworkaround for cesium
code: 'image', var projectedExtent = proj.transformExtent( ri.extent, 'EPSG:3857','EPSG:4326');
units: 'pixels', 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)}` });
extent: ri.extent
});
let source = new ImageStatic({ imageExtent: ri.extent, projection: projection, url: `${this._apiEndPoint}/api/v1/items/${item.code}/mapimage/${layerIndex}?v=${item.updated.getTime()}` });
layer = new Image({ source: source }); layer = new Image({ source: source });
} }
return layer; return layer;
@@ -116,19 +121,19 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
var layer: Layer = null; var layer: Layer = 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 = (data && data.layers && data.layers.length > 0) ? data.layers[0] : null; var l:ILayer = (data && data.layers && data.layers.length > 0) ? data.layers[layerIndex] : null;
if (l && l.rendering && l.rendering.renderoutputType == "VectorTiles") { if (l && l.rendering && l.rendering.renderoutputType == "VectorTiles") {
var rt = item.data.layers[layerIndex].rendering as IRenderoutputTiles; var rt = l.rendering as IRenderoutputTiles;
layer = new VectorTileLayer({ layer = new VectorTileLayer({
declutter: true, declutter: true,
source: new VectorTileSource({ source: new VectorTileSource({
maxZoom: rt.maxzoom, maxZoom: rt.maxzoom,
minZoom: rt.minzoom, minZoom: rt.minzoom,
format: new MVT(), format: new MVT(),
url: `${this._apiEndPoint}/api/v1/items/${item.code}/vectortiles/{z}/{x}/{y}.pbf?v=${item.updated.getTime()}` 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(l, feature); return this.getColorFromGradient(item,l, feature);
} }
}) })
} else if (l && l.rendering && l.rendering.renderoutputType == "Tiles") { } else if (l && l.rendering && l.rendering.renderoutputType == "Tiles") {
@@ -137,7 +142,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
source: new XYZ({ source: new XYZ({
maxZoom: rt.maxzoom, maxZoom: rt.maxzoom,
minZoom: rt.minzoom, minZoom: rt.minzoom,
url: `${this._apiEndPoint}/api/v1/items/${item.code}/vectortiles/image_tiles/${layerIndex}/{z}/{x}/{y}.png?v=${item.updated.getTime()}` url: `${this._apiEndPoint}/api/v1/items/${item.code}/vectortiles/image_tiles/${layerIndex}/{z}/{x}/{y}.png?v=${Date.parse(item.updated)}`
}) })
}); });
} else { } else {
@@ -161,7 +166,7 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
layer = new VectorLayer({ layer = new VectorLayer({
source: source, source: source,
style: (feature) => { style: (feature) => {
var key = feature.get("color"); var key =feature.get("code") + "_" + feature.get("color");
if (!this.styleCache[key]) { if (!this.styleCache[key]) {
var color = feature.get("color"); var color = feature.get("color");
this.styleCache[key] = new style.Style( this.styleCache[key] = new style.Style(
@@ -190,9 +195,45 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
} }
}); });
} }
if(l.minzoom) {
layer.setMinZoom(l.minzoom);
}
if(l.maxzoom) {
layer.setMaxZoom(l.maxzoom);
}
return layer; return layer;
} }
createSelectionLayer(itemLayer:IItemLayer):Layer {
var layerIndex = -1;
var layer: Layer = 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.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 { createExternalLayer(item:IItem,itemLayer:IItemLayer):Layer {
let data = item.data as ILayerData; let data = item.data as ILayerData;
var layer: Layer = null; var layer: Layer = null;
@@ -212,11 +253,32 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
layer = new Tile({ source: source }); layer = new Tile({ source: source });
break; break;
} }
case 'TileJSON': {
let source = new TileJSON(data.options);
layer = new Tile({ source: source });
break;
}
case 'TileArcGISRest': { case 'TileArcGISRest': {
let source = new TileArcGISRest(data.options); let source = new TileArcGISRest(data.options);
layer = new Tile({ source: source }); layer = new Tile({ source: source });
break; break;
} }
case 'VectorWFSJson': {
let source = new VectorSource({
format: new GeoJSON(),
url: function (extent) {
return (
data.options.url + '&srsname=' + data.projection +
'&bbox=' +
extent.join(',') +
',EPSG:3857'
);
},
strategy: loadingstrategy.bbox,
});
layer = new VectorLayer({ source: source });
break;
}
default: { default: {
break; break;
} }
@@ -245,7 +307,28 @@ export class ItemLayersComponent extends LayerGroupComponent implements OnChange
ngOnInit() { ngOnInit() {
super.ngOnInit(); super.ngOnInit();
this.updateLayers(this.itemLayers); if(this.itemLayers) {
this.updateLayers(this.itemLayers);
} else if(this.itemLayer) {
this.updateLayers([this.itemLayer])
} else {
this.updateLayers([]);
}
this.initialized=true;
}
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;
}
} }
addOrUpdateOlLayer(itemLayer:IItemLayer,index:number):Layer { addOrUpdateOlLayer(itemLayer:IItemLayer,index:number):Layer {
@@ -294,23 +377,52 @@ 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 && itemLayers.length==1 && itemLayers[0].item.itemType == 'vnd.farmmaps.itemtype.shape.processed') {
this.selectionLayer = this.createSelectionLayer(itemLayers[0]);
olLayers.push(this.selectionLayer)
}
} }
} }
mapEventHandler = (event) => {
//return;
//if(event.type === 'click' && !this.onFeatureSelected.observers.length) return;
//if(event.type === 'pointermode' && !this.onFeatureHover.observers.length) return;
if(this.itemLayer && this.itemLayer.layer) {
this.selectedFeatures = {};
this.itemLayer.layer.getFeatures(event.pixel).then((features) => {
if(!features.length) return;
let fid = features[0].getId();
this.selectedFeatures[fid] = features[0];
})
if(this.selectionLayer) this.selectionLayer.changed();
}
}
ngOnChanges(changes: SimpleChanges) { ngOnChanges(changes: SimpleChanges) {
if (this.instance) { 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(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();
}
} }

View File

@@ -34,7 +34,7 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
@Input() selectedFeature: Feature; @Input() selectedFeature: Feature;
@Input() selectedItem: IItem; @Input() selectedItem: IItem;
@Input() styles:IStyles; @Input() styles:IStyles;
@Output() onFeaturesSelected: EventEmitter<Feature> = new EventEmitter<Feature>(); @Output() onFeatureSelected: EventEmitter<Feature> = new EventEmitter<Feature>();
@Output() onFeatureHover: EventEmitter<Feature> = new EventEmitter<Feature>(); @Output() onFeatureHover: EventEmitter<Feature> = new EventEmitter<Feature>();
private stylesCache:IStyles = {}; private stylesCache:IStyles = {};
@@ -96,9 +96,9 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
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) => {

View File

@@ -13,7 +13,7 @@
</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="fa 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="fa fa-bar-chart" 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 class="float-right"><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">

View File

@@ -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 {

View File

@@ -1,40 +0,0 @@
// import { Component, OnInit,Input } from '@angular/core';
//import { MapComponent } from 'ngx-openlayers';
//import OLCesium from 'olcs/OLCesium.js';
// @Component({
// selector: 'fm-map-switch2d3d',
// template: '<div (click)="handleClick($event)" class="rounded-circle twotreed">{{label}}</div>',
// styles: [`.twotreed {
// width:2.5em;
// height:2.5em;
// background-color: white;
// text-align:center;
// line-height:2.5em;
// font-weight:bold;
// cursor:default;}`]
// })
// export class Switch2D3DComponent {
// @Input() enable:boolean;
// public label: string = "3D";
// private ol3d: OLCesium;
// constructor(private map: MapComponent) {
// }
// ngOnInit() {
// this.ol3d = new OLCesium({ map: this.map.instance }); // ol2dMap is the ol.Map instance
// }
// handleClick(event) {
// this.enable = !this.enable;
// if (this.enable)
// this.ol3d.setEnabled(this.enable);
// this.label = this.enable?"2D":"3D";
// }
// }

View File

@@ -25,10 +25,10 @@ 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, right, bottom, left];

View File

@@ -2,7 +2,7 @@ import { Component, Input, OnInit, ComponentFactoryResolver, ViewChild, SimpleCh
import { Feature } from 'ol'; import { Feature } from 'ol';
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 } from '@farmmaps/common'; import {IQueryState,PackageService } from '@farmmaps/common';
import * as mapReducers from '../../reducers/map.reducer'; import * as mapReducers from '../../reducers/map.reducer';
import * as mapActions from '../../actions/map.actions'; import * as mapActions from '../../actions/map.actions';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
@@ -16,7 +16,8 @@ import { Observable } from 'rxjs';
}) })
export class FeatureListContainerComponent { export class FeatureListContainerComponent {
constructor(private store: Store<mapReducers.State>,private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractFeatureListComponent) public featureLists: AbstractFeatureListComponent[] ) { 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>
@@ -28,30 +29,44 @@ export class FeatureListContainerComponent {
componentRef:any; componentRef:any;
loadComponent(queryState:IQueryState) { loadComponent(queryState:IQueryState) {
var componentFactory: ComponentFactory<AbstractFeatureListComponent> = this.componentFactoryResolver.resolveComponentFactory(FeatureListComponent); // default let componentFactory: ComponentFactory<AbstractFeatureListComponent> = this.componentFactoryResolver.resolveComponentFactory(FeatureListComponent); // default
var selected = -1; let selected = -1;
for (var i = 0; i < this.featureLists.length; i++) { let maxMatches =0;
if (this.featureLists[i]['forItemType'] == queryState.itemType && this.featureLists[i]['forChild'] && queryState.parentCode && queryState.parentCode != "") { let showItem = true;
selected = i; for (let i = 0; i < this.featureLists.length; i++) {
break; let matches=0;
} else if (this.featureLists[i]['forItemType'] == queryState.itemType) { let criteria=0;
selected = i; if (this.featureLists[i]['forItemType']) {
break; criteria++;
if( this.featureLists[i]['forItemType'].indexOf(queryState.itemType) >= 0) {
matches++;
}
}
if(this.featureLists[i]['forChild'] ) {
criteria++;
if(queryState.parentCode && queryState.parentCode != "") {
matches++;
}
}
if(criteria == matches && matches > maxMatches) {
selected=i;
maxMatches = matches;
} }
} }
if (selected >= 0) { if (selected >= 0) {
componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.featureLists[i]['constructor'] as any); componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.featureLists[selected]['constructor'] as any);
if (this.featureLists[selected]['collapseSearch'] === true) { if (this.featureLists[selected]['collapseSearch'] === true) {
this.store.dispatch(new mapActions.CollapseSearch()); this.store.dispatch(new mapActions.CollapseSearch());
} }
} }
const viewContainerRef = this.widgetHost.viewContainerRef; const viewContainerRef = this.widgetHost.viewContainerRef;
viewContainerRef.clear(); viewContainerRef.clear();
if(showItem) {
this.componentRef = viewContainerRef.createComponent(componentFactory); this.componentRef = viewContainerRef.createComponent(componentFactory);
(<AbstractFeatureListComponent>this.componentRef.instance).features = null; (<AbstractFeatureListComponent>this.componentRef.instance).features = null;
(<AbstractFeatureListComponent>this.componentRef.instance).queryState = queryState; (<AbstractFeatureListComponent>this.componentRef.instance).queryState = queryState;
(<AbstractFeatureListComponent>this.componentRef.instance).selectedFeature = null; (<AbstractFeatureListComponent>this.componentRef.instance).selectedFeature = null;
}
} }
ngOnInit() { ngOnInit() {
@@ -66,9 +81,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();
} }
} }
} }

View File

@@ -15,6 +15,7 @@ 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;
@@ -23,11 +24,27 @@ export class FeatureListFeatureContainerComponent {
loadComponent() { loadComponent() {
var componentFactory: ComponentFactory<AbstractFeatureListFeatureComponent> = this.componentFactoryResolver.resolveComponentFactory(FeatureListFeatureComponent); // default var componentFactory: ComponentFactory<AbstractFeatureListFeatureComponent> = this.componentFactoryResolver.resolveComponentFactory(FeatureListFeatureComponent); // default
for (var i = 0; i < this.featureLists.length; i++) {
if (this.featureLists[i]['forItemType'] == this.feature.get("itemType")) { let selected = -1;
componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.featureLists[i]['constructor'] as any); let maxMatches =0;
for (let i = 0; i < this.featureLists.length; i++) {
let matches=0;
let criteria=0;
if (this.featureLists[i]['forItemType']) {
criteria++;
if(this.featureLists[i]['forItemType'].indexOf(this.feature.get("itemType")) >= 0) {
matches++;
}
}
if(criteria == matches && matches > maxMatches) {
selected=i;
maxMatches = matches;
} }
} }
if (selected >= 0) {
componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.featureLists[selected]['constructor'] as any);
}
const viewContainerRef = this.widgetHost.viewContainerRef; const viewContainerRef = this.widgetHost.viewContainerRef;
viewContainerRef.clear(); viewContainerRef.clear();

View File

@@ -0,0 +1,5 @@
export function ForPackage(packageCode: string) {
return function (constructor:Function) {
constructor.prototype.forPackage = packageCode;
};
}

View File

@@ -15,6 +15,7 @@ import { IItem, IListItem } from '@farmmaps/common';
export class ItemListItemContainerComponent { export class ItemListItemContainerComponent {
constructor(private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractItemListItemComponent) public itemComponentList: AbstractItemListItemComponent[] ) { constructor(private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractItemListItemComponent) public itemComponentList: AbstractItemListItemComponent[] ) {
this.itemComponentList = [...this.itemComponentList].reverse();
} }
@Input() item: IListItem; @Input() item: IListItem;
@@ -23,15 +24,35 @@ export class ItemListItemContainerComponent {
loadComponent() { loadComponent() {
var componentFactory: ComponentFactory<AbstractItemListItemComponent> = this.componentFactoryResolver.resolveComponentFactory(ItemListItemComponent); // default var componentFactory: ComponentFactory<AbstractItemListItemComponent> = this.componentFactoryResolver.resolveComponentFactory(ItemListItemComponent); // default
for (var i = 0; i < this.itemComponentList.length; i++) {
if (this.itemComponentList[i]['forItemType'] && let selected = -1;
this.itemComponentList[i]['forItemType'].indexOf(this.item.itemType) >= 0 && let maxMatches =0;
this.itemComponentList[i]['forSourceTask'] && let showItem = true;
this.itemComponentList[i]['forSourceTask'].indexOf(this.item.sourceTask) >= 0 ) for (let i = 0; i < this.itemComponentList.length; i++) {
{ let matches=0;
componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.itemComponentList[i]['constructor'] as any); let criteria=0;
if (this.itemComponentList[i]['forItemType']) {
criteria++;
if(this.itemComponentList[i]['forItemType'].indexOf(this.item.itemType) >= 0) {
matches++;
}
} }
} if (this.itemComponentList[i]['forSourceTask']) {
criteria++;
if(this.itemComponentList[i]['forSourceTask'].indexOf(this.item.sourceTask) >= 0) {
matches++;
}
}
if(criteria == matches && matches > maxMatches) {
selected=i;
maxMatches = matches;
}
}
if (selected >= 0) {
componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.itemComponentList[selected]['constructor'] as any);
}
const viewContainerRef = this.widgetHost.viewContainerRef; const viewContainerRef = this.widgetHost.viewContainerRef;
viewContainerRef.clear(); viewContainerRef.clear();

View File

@@ -1,20 +1,20 @@
<div class="btn btn-outline-secondary layer-switcher" (click)="handleClick($event)"> <div class="btn btn-outline-secondary layer-switcher" (click)="handleClick($event)">
<i class="fa fa-map-o"></i> <i class="fal fa-layer-group"></i>
<div class="layers hidden" [ngClass]="{'hidden':!(showLayerSwitcher|async)}" (click)="$event.stopPropagation();"> <div class="layers hidden" [ngClass]="{'hidden':!(showLayerSwitcher|async)}" (click)="$event.stopPropagation();">
<div class="card layers-card m-1"> <div class="card layers-card m-1">
<div class="card-header"> <div class="card-header">
<span i18n>Layers</span> <span i18n>Layers</span>
<i class="float-right fa fa-close" (click)="close($event)"></i> <i class="float-right fas fa-times" (click)="close($event)"></i>
</div> </div>
<ul class="navbar-nav"> <ul class="navbar-nav">
<li class="nav-item py-0"> <li class="nav-item py-0">
<span><i class="fa fa-map-o" aria-hidden="true"></i>&nbsp;<span i18n>Base maps</span></span> <span><i class="fal fa-layer-group" aria-hidden="true"></i>&nbsp;<span i18n>Base maps</span></span>
<div class="mb-4"> <div class="mb-4">
<fm-map-layer-list [baseLayers]="true" [itemLayers]="baseLayers|async" [selectedLayer]="selectedBaseLayer|async" (onSelectLayer)="handleSelectBaseLayer($event)"></fm-map-layer-list> <fm-map-layer-list [baseLayers]="true" [itemLayers]="baseLayers|async" [selectedLayer]="selectedBaseLayer|async" (onSelectLayer)="handleSelectBaseLayer($event)"></fm-map-layer-list>
</div> </div>
</li> </li>
<li class="nav-item py-0"> <li class="nav-item py-0">
<span><i class="fa fa-map-o" aria-hidden="true"></i>&nbsp;<span i18n>Overlays</span></span> <span><i class="fal fa-layer-group" aria-hidden="true"></i>&nbsp;<span i18n>Overlays</span></span>
<div class="mb-4"> <div class="mb-4">
<fm-map-layer-list [itemLayers]="overlayLayers|async" [selectedLayer]="selectedOverlayLayer|async" (onDelete)="handleOnDelete($event)" (onToggleVisibility)="handleOnToggleVisibility($event)" (onSetOpacity)="handleOnSetOpacity($event)" (onZoomToExtent)="handleZoomToExtent($event)" (onSelectLayer)="handleSelectOverlayLayer($event)"></fm-map-layer-list> <fm-map-layer-list [itemLayers]="overlayLayers|async" [selectedLayer]="selectedOverlayLayer|async" (onDelete)="handleOnDelete($event)" (onToggleVisibility)="handleOnToggleVisibility($event)" (onSetOpacity)="handleOnSetOpacity($event)" (onZoomToExtent)="handleZoomToExtent($event)" (onSelectLayer)="handleSelectOverlayLayer($event)"></fm-map-layer-list>
</div> </div>

View File

@@ -36,10 +36,12 @@ export class LayerSwitcher implements OnInit,OnChanges{
handleClick(event:Event) { handleClick(event:Event) {
event.stopPropagation();
this.store.dispatch(new mapActions.ShowLayerSwitcher(true)); this.store.dispatch(new mapActions.ShowLayerSwitcher(true));
} }
close(event:Event) { close(event:Event) {
event.stopPropagation();
this.store.dispatch(new mapActions.ShowLayerSwitcher(false)); this.store.dispatch(new mapActions.ShowLayerSwitcher(false));
} }

View File

@@ -0,0 +1,15 @@
<div class="row pl-3">
<div class="col-8 nopadding"><span i18n>Average</span>:</div>
<div class="col-4 pull-left nopadding">{{histogram.mean| number:'1.0-2'}}</div>
<div class="col-8 nopadding"><span i18n>Standard deviation</span>:</div>
<div class="col-4 pull-left nopadding">{{histogram.stddev| number:'1.0-2'}}</div>
<div class="col-8 nopadding"><span i18n>Min</span>:</div>
<div class="col-4 pull-left nopadding">{{histogram.min| number:'1.0-2'}}</div>
<div class="col-8 nopadding" ><span i18n>Max</span>:</div>
<div class="col-4 pull-left nopadding">{{histogram.max| number:'1.0-2'}}</div>
<ng-container *ngIf="showConfidenceInterval()">
<div class="col-8 nopadding"><span i18n>Confidence interval</span>:</div>
<div class="col-4 pull-left nopadding">{{histogram.confidence * 100| number:'1.0-0'}}%</div>
</ng-container>
</div>

View File

@@ -0,0 +1,20 @@
import {Component, Input} from '@angular/core';
import {IHistogram, ILayer} from '../../../models/color.map';
@Component({
selector: 'fm-map-histogram-details',
templateUrl: './histogram-details.component.html',
styles: ['.nopadding{\n' +
' padding: 0 !important;\n' +
' margin: 0 !important;\n' +
'}']
})
export class HistogramDetailsComponent {
@Input()
histogram: IHistogram;
showConfidenceInterval(): boolean {
return this.histogram.confidence != null && this.histogram.confidence !== 1;
}
}

View File

@@ -1,11 +1,14 @@
<table class="container" *ngIf="showLegend()"> <table class="container" *ngIf="showLegend()">
<tr> <tr>
<td colspan="2"> <td colspan="3">
<div class="title"> <div class="title">
<h4 *ngIf="showTitle">{{layer.name}}</h4> <h4 *ngIf="showTitle">{{layer.name}}</h4>
<b *ngIf="layer.unit">({{layer.unit}})</b> <b *ngIf="layer.unit">({{layer.unit}})</b>
</div> </div>
</td> </td>
<td>
<a i18n-title title="more info"><i class="fa fa-info-circle text-primary" (click)="hideHistogramDetails = !hideHistogramDetails"></i></a>
</td>
<td colspan="2"> <td colspan="2">
<div class="title" *ngIf="histogramenabled"> <div class="title" *ngIf="histogramenabled">
<h4>{{histogram}}</h4> <h4>{{histogram}}</h4>
@@ -14,26 +17,27 @@
</td> </td>
</tr> </tr>
<tr *ngFor="let entry of layer.renderer.colorMap.entries; let i = index "> <tr *ngFor="let entry of layer.renderer.colorMap.entries; let i = index ">
<td class="legend-items"><span [style.background-color]="getHex(entry.color)" class="color"></span></td> <td class="legend-items"><span [style.background-color]="getAlphaHex(entry.color)" [style.border-color]="getHex(entry.color)"class="color"></span></td>
<td class="legend-items-text"><span *ngIf="!entry.label">{{getScaledValue(entry.value,layer.scale) | number:'1.0-2'}} {{legendunit}}</span><span *ngIf="entry.label">{{entry.label}}</span></td> <td class="legend-items-text"><span *ngIf="!entry.label">{{getScaledValue(entry.value,layer.scale) | number:'1.0-2'}} {{legendunit}}</span><span *ngIf="entry.label">{{entry.label}}</span></td>
<td class="histogram-items"> <td class="histogram-items">
<div *ngIf="showHistogram()"> <div *ngIf="showHistogram()">
<span class="bar" [style.background-color]="getHex(entry.color)" [style.width]="getPart(layer.renderer, i)"> <span class="bar" [style.background-color]="getHex(entry.color)" [style.width]="getPart(layer.renderer, i)">
</span> </span>
<span class="bar-label">{{getLabel(layer.renderer,i)}}</span> <span class="bar-label">{{getLabel(layer.renderer,i)}}</span>
</div> </div>
</td> </td>
</tr> </tr>
<tr *ngIf="showHistogram()"> <tr *ngIf="showHistogram()">
<td colspan="4" class="pb-2 pt-2"> <td colspan="4" class="pb-1 pt-1">
<a i18n-title title="more info"><i class="fa fa-info-circle text-primary" (click)="hideHistogramDetails = !hideHistogramDetails"></i></a> <div class="info" [ngbCollapse]="hideHistogramDetails">
<div class="info pt-2" [ngbCollapse]="hideHistogramDetails"> <ng-container *ngIf="bandContainsStatistics(); else histogram">
<div><span i18n>Average: </span>{{layer.renderer.band.histogram.mean| number:'1.0-3'}}</div> <fm-map-statistics-details [statistics]="layer.renderer.band.statistics"></fm-map-statistics-details>
<div><span i18n>Standard deviation: </span>{{layer.renderer.band.histogram.stddev| number:'1.0-3'}}</div> </ng-container>
<div><span i18n>Min: </span>{{layer.renderer.band.histogram.min| number:'1.0-3'}}</div>
<div><span i18n>Max: </span>{{layer.renderer.band.histogram.max| number:'1.0-3'}}</div> <ng-template #histogram>
<div *ngIf="showConfidenceInterval()"><span i18n>Confidence interval:</span> {{layer.renderer.band.histogram.confidence * 100| number:'1.0-0'}}%</div> <fm-map-histogram-details [histogram]="layer.renderer.band.histogram"></fm-map-histogram-details>
</div> </ng-template>
</div>
</td> </td>
</tr> </tr>
</table> </table>

View File

@@ -20,6 +20,7 @@ span.color {
display:inline-block; display:inline-block;
width: 1.5em; width: 1.5em;
height: 1.5em; height: 1.5em;
border: 2px solid;
} }
.legend-items { .legend-items {

View File

@@ -53,6 +53,10 @@ export class LegendComponent implements OnInit,AfterViewInit {
return '#' + this.componentToHex(color.red) + this.componentToHex(color.green) + this.componentToHex(color.blue); return '#' + this.componentToHex(color.red) + this.componentToHex(color.green) + this.componentToHex(color.blue);
} }
public getAlphaHex(color: IColor): string {
return '#' + this.componentToHex(color.red) + this.componentToHex(color.green) + this.componentToHex(color.blue)+ this.componentToHex(color.alpha);
}
private componentToHex(c: number): string { private componentToHex(c: number): string {
const hex = c.toString(16); const hex = c.toString(16);
return hex.length === 1 ? `0${hex}` : hex; return hex.length === 1 ? `0${hex}` : hex;
@@ -88,8 +92,8 @@ export class LegendComponent implements OnInit,AfterViewInit {
return this.histogramenabled && this.layer.renderer.band.histogram.entries && this.layer.renderer.band.histogram.entries.length > 0 && this.layer.renderer.colorMap.colormapType == "minmax"; return this.histogramenabled && this.layer.renderer.band.histogram.entries && this.layer.renderer.band.histogram.entries.length > 0 && this.layer.renderer.colorMap.colormapType == "minmax";
} }
showConfidenceInterval():boolean { bandContainsStatistics(): boolean {
return this.histogramenabled && this.layer.renderer.band.histogram.confidence != null && this.layer.renderer.band.histogram.confidence != 1; return this.layer.renderer.band.statistics != null;
} }
} }

View File

@@ -0,0 +1,36 @@
<div class="row pl-3">
<div class="col-8 nopadding"><span i18n>Data points</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.populationCount}}</div>
<div class="col-8 nopadding"><span i18n>Min</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.min| number:'1.0-2'}}</div>
<div class="col-8 nopadding"><span i18n>Max</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.max| number:'1.0-2'}}</div>
<div class="col-8 nopadding"><span i18n>Min+1</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.minPlus| number:'1.0-2'}}</div>
<div class="col-8 nopadding"><span i18n>Max-1</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.maxMinus| number:'1.0-2'}}</div>
<div class="col-8 nopadding"><span i18n>Average</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.mean| number:'1.0-2'}}</div>
<div class="col-8 nopadding"><span i18n>Standard deviation</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.stddev| number:'1.0-2'}}</div>
<div class="col-8 nopadding"><span i18n>Mode</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.mode| number:'1.0-2'}}</div>
<div class="col-8 nopadding"><span i18n>Median</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.median| number:'1.0-2'}}</div>
<div class="col-8 nopadding"><span i18n>Kurtosis</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.curtosis| number:'1.0-2'}}</div>
<div class="col-8 nopadding"><span i18n>Skewness</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.skewness| number:'1.0-2'}}</div>
<div class="col-8 nopadding"><span i18n>Variance</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.variance| number:'1.0-2'}}</div>
<div class="col-8 nopadding"><span i18n>Coefficient of variation</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.variationCoefficient | number:'1.0-2'}}</div>
<ng-container *ngIf="statistics.confidenceIntervalLow !== undefined">
<div class="col-8 nopadding">90% <span i18n>Confidence interval</span>:</div>
<div class="col-4 pull-left nopadding">{{statistics.confidenceIntervalLow | number:'1.0-2'}} - {{statistics.confidenceIntervalHigh | number:'1.0-2'}}</div>
</ng-container>
</div>

View File

@@ -0,0 +1,16 @@
import {Component, Input} from '@angular/core';
import {IStatistics} from '../../../models/color.map';
@Component({
selector: 'fm-map-statistics-details',
templateUrl: './statistics-details.component.html',
styles: ['.nopadding{\n' +
' padding: 0 !important;\n' +
' margin: 0 !important;\n' +
'}']
})
export class StatisticsDetailsComponent {
@Input()
statistics: IStatistics;
}

View File

@@ -13,7 +13,7 @@
<input #searchText class="form-control" type="text" (focus)="handleFocus($event)" [ngModel]="searchTextLocal" name="searchTextLocal" (ngModelChange)="handleChange($event)" [ngbTypeahead]="search" [resultTemplate]="rt" [inputFormatter]="formatter" (selectItem)="handleSelect($event)" placeholder="Search" i18n-placeholder /> <input #searchText class="form-control" type="text" (focus)="handleFocus($event)" [ngModel]="searchTextLocal" name="searchTextLocal" (ngModelChange)="handleChange($event)" [ngbTypeahead]="search" [resultTemplate]="rt" [inputFormatter]="formatter" (selectItem)="handleSelect($event)" placeholder="Search" i18n-placeholder />
<div class="input-group-append"> <div class="input-group-append">
<button type="submit" class="btn btn-outline-secondary" [disabled]="disabled"><i class="fa fa-search"></i></button> <button type="submit" class="btn btn-outline-secondary" [disabled]="disabled"><i class="fa fa-search"></i></button>
<button type="button" class="clear btn btn-outline-secondary" [disabled]="!clearEnabled" (click)="handleClearClick($event)"><i class="fa fa-remove"></i></button> <button type="button" class="clear btn btn-outline-secondary" [disabled]="!clearEnabled" (click)="handleClearClick($event)"><i class="fas fa-times"></i></button>
</div> </div>
</div> </div>
<div class="options"> <div class="options">

View File

@@ -12,17 +12,19 @@
panelCollapsed:panelCollapsed$|async, panelCollapsed:panelCollapsed$|async,
searchMinified:searchMinified$|async, searchMinified:searchMinified$|async,
selectedItem:selectedItem$|async, selectedItem:selectedItem$|async,
parentItem:parentItem$|async,
queryState:queryState$|async, queryState:queryState$|async,
searchCollapsed:searchCollapsed$|async, searchCollapsed:searchCollapsed$|async,
clearEnabled:clearEnabled$|async, clearEnabled:clearEnabled$|async,
period:period$|async, period:period$|async,
compassHeading:compassHeading$|async, compassHeading:compassHeading$|async,
styles:styles$|async, styles:styles$|async,
selectedFeature:selectedFeature$|async selectedFeature:selectedFeature$|async,
fullscreen:fullscreen$|async
} as state"> } as state">
<aol-map #map (moveEnd)="handleOnMoveEnd($event)" (click)="handleOnMouseDown($event)" [ngClass]="{'panel-visible':state.panelVisible}" class="map"> <aol-map #map (moveEnd)="handleOnMoveEnd($event)" (click)="handleOnMouseDown($event)" [ngClass]="{'panel-visible':state.panelVisible,'fullscreen':state.fullscreen}" class="map">
<div> <div>
</div> </div>
<aol-view [zoom]="state.mapState.zoom" [rotation]="state.mapState.rotation"> <aol-view [zoom]="state.mapState.zoom" [rotation]="state.mapState.rotation">
<aol-coordinate [x]="state.mapState.xCenter" [y]="state.mapState.yCenter" [srid]="'EPSG:4326'"></aol-coordinate> <aol-coordinate [x]="state.mapState.xCenter" [y]="state.mapState.yCenter" [srid]="'EPSG:4326'"></aol-coordinate>
@@ -34,37 +36,42 @@
<fm-map-item-layers [itemLayers]="state.overlayLayers"></fm-map-item-layers> <fm-map-item-layers [itemLayers]="state.overlayLayers"></fm-map-item-layers>
<fm-map-item-layers [itemLayer]="state.selectedItemLayer"></fm-map-item-layers> <fm-map-item-layers [itemLayer]="state.selectedItemLayer"></fm-map-item-layers>
<aol-layer-vector> <aol-layer-vector>
<fm-map-item-source-vector [styles]="state.styles" [features]="state.features" (onFeaturesSelected)="handleFeatureClick($event)" (onFeatureHover)="handleFeatureHover($event)" [selectedFeature]="state.selectedFeature" [selectedItem]="state.selectedItem"></fm-map-item-source-vector> <fm-map-item-source-vector [styles]="state.styles" [features]="state.features" (onFeatureSelected)="handleFeatureClick($event)" (onFeatureHover)="handleFeatureHover($event)" [selectedFeature]="state.selectedFeature" [selectedItem]="state.selectedItem"></fm-map-item-source-vector>
</aol-layer-vector> </aol-layer-vector>
<fm-map-gps-location [position]="state.position" [headingTolerance]="20" [showHeading]="true" [heading]="state.compassHeading"></fm-map-gps-location> <!-- <fm-map-gps-location [position]="state.position" [headingTolerance]="20" [showHeading]="true" [heading]="state.compassHeading"></fm-map-gps-location> -->
<div class="control-container"> <div class="control-container" >
<!-- <switch2d3d></switch2d3d>--> <router-outlet name="map-controls"></router-outlet>
<fm-map-layer-switcher></fm-map-layer-switcher> <fm-map-layer-switcher></fm-map-layer-switcher>
<fm-map-pan-to-location [position]="state.position" [mapState]="state.mapState" [animate]="true"></fm-map-pan-to-location> <fm-map-pan-to-location [position]="state.position" [mapState]="state.mapState" [animate]="true"></fm-map-pan-to-location>
<fm-map-rotation-reset></fm-map-rotation-reset> <fm-map-rotation-reset></fm-map-rotation-reset>
</div> </div>
<fm-map-file-drop-target [parentCode]="state.parentCode" (onFileDropped)="handleFileDropped($event)"></fm-map-file-drop-target> <fm-map-file-drop-target [parentCode]="state.parentCode" (onFileDropped)="handleFileDropped($event)"></fm-map-file-drop-target>
</aol-map> </aol-map>
<fm-map-map-search #mapSearch [openedModalName]="state.openedModalName" (onOpenModal)="handleOpenModal($event)" (onCloseModal)="handleCloseModal()" [ngClass]="{'menuVisible':state.menuVisible}" (onToggleMenu)="handleToggleMenu($event)" (onSearchCollapse)="handleSearchCollapse($event)" (onSearchExpand)="handleSearchExpand($event)" [collapsed]="state.searchCollapsed" [searchMinified]="state.searchMinified" (onSearch)="handleSearch($event)" (onClear)="handleClearSearch($event)" [filterOptions]="state.queryState" [clearEnabled]="state.clearEnabled" [period]="state.period"></fm-map-map-search> <div *ngIf="noContent">
<fm-side-panel [resizeable]="true" [visible]="state.panelVisible" [collapsed]="state.panelCollapsed" [collapsable]="false"> <fm-map-map-search #mapSearch [openedModalName]="state.openedModalName" (onOpenModal)="handleOpenModal($event)" (onCloseModal)="handleCloseModal()" [ngClass]="{'menuVisible':state.menuVisible}" (onToggleMenu)="handleToggleMenu($event)" (onSearchCollapse)="handleSearchCollapse($event)" (onSearchExpand)="handleSearchExpand($event)" [collapsed]="state.searchCollapsed" [searchMinified]="state.searchMinified" (onSearch)="handleSearch($event)" (onClear)="handleClearSearch($event)" [filterOptions]="state.queryState" [clearEnabled]="state.clearEnabled" [period]="state.period"></fm-map-map-search>
<div class="panel-wrapper"> </div>
<fm-side-panel [resizeable]="true" [visible]="state.panelVisible && noContent" [collapsed]="state.panelCollapsed" [collapsable]="false">
<div class="panel-wrapper" *ngIf="noContent">
<div class="panel-top bg-secondary" *ngIf="!(state.searchMinified)"> <div class="panel-top bg-secondary" *ngIf="!(state.searchMinified)">
</div> </div>
<div class="panel-bottom"> <div class="panel-bottom">
<div *ngIf="!(state.selectedItem)"> <div *ngIf="!(state.selectedItem)">
<fm-map-feature-list-container [features]="state.features" [selectedFeature]="state.selectedFeature" [queryState]="state.queryState" [clickedFeature]="clickedFeature"></fm-map-feature-list-container> <fm-map-feature-list-container [features]="state.features" [selectedFeature]="state.selectedFeature" [queryState]="state.queryState" [clickedFeature]="clickedFeature"></fm-map-feature-list-container>
</div> </div>
<div *ngIf="state.selectedItem;let item"> <div *ngIf="state.selectedItem;let item">
<fm-map-selected-item-container [item]="item" [itemLayer]="state.selectedItemLayer" [overlayLayers]="state.overlayLayers"></fm-map-selected-item-container> <fm-map-selected-item-container [item]="item" [parentItem]="state.parentItem" [itemLayer]="state.selectedItemLayer" [overlayLayers]="state.overlayLayers"></fm-map-selected-item-container>
</div> </div>
<div *ngIf="state.features.length == 0" class="no-results m-2"> <div *ngIf="state.features.length == 0" class="no-results m-2">
<div *ngIf="state.queryState.query">Cannot find <span>{{state.queryState?.query}}</span></div> <div *ngIf="state.queryState.query">Cannot find <span>{{state.queryState?.query}}</span></div>
<div *ngIf="state.queryState?.tags">Cannot find tag <span>{{state.queryState?.tags}}</span></div> <div *ngIf="state.queryState?.tags">Cannot find tag <span>{{state.queryState?.tags}}</span></div>
</div> </div>
</div> </div>
</div> </div>
</fm-side-panel>
<fm-side-panel [resizeable]="true" [visible]="!noContent">
<router-outlet></router-outlet>
</fm-side-panel> </fm-side-panel>
</ng-container> </ng-container>

View File

@@ -1,6 +1,6 @@
@import "~bootstrap/scss/bootstrap.scss"; @import "~bootstrap/scss/bootstrap.scss";
aol-map { position:absolute;width:100%;height:100%;} aol-map { position:absolute;width:100%;height:calc(100vh + 4rem);}
.arrow { .arrow {
top: 3rem; top: 3rem;
@@ -49,7 +49,11 @@ aol-map { position:absolute;width:100%;height:100%;}
.control-container { .control-container {
position: absolute; position: absolute;
right: 1em; right: 1em;
bottom: 1em; bottom: 8.1em;
}
.fullscreen .control-container {
bottom: 5em;
} }
switch2d3d { switch2d3d {

View File

@@ -1,6 +1,6 @@
import { Component, OnInit, OnDestroy, HostListener, ViewChild, AfterViewInit,NgZone } from '@angular/core'; import { Component, OnInit, OnDestroy, HostListener, ViewChild, AfterViewInit,NgZone,ElementRef } from '@angular/core';
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { Observable, Subject, Subscription, from,of } from 'rxjs'; import { Observable, Subject, Subscription, from,of ,EMPTY } from 'rxjs';
import { withLatestFrom, switchMap,skip } from 'rxjs/operators'; import { withLatestFrom, switchMap,skip } from 'rxjs/operators';
import { Router, ActivatedRoute, ParamMap } from '@angular/router'; import { Router, ActivatedRoute, ParamMap } from '@angular/router';
import { Store } from '@ngrx/store'; import { Store } from '@ngrx/store';
@@ -12,7 +12,7 @@ import * as mapActions from '../../actions/map.actions';
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 } from '../../models/item.layer';
import { IQueryState } from '@farmmaps/common'; import { IListItem, IQueryState } from '@farmmaps/common';
import { IPeriodState } from '../../models/period.state'; import { IPeriodState } from '../../models/period.state';
import {IStyles} from '../../models/style.cache'; import {IStyles} from '../../models/style.cache';
import { IDroppedFile } from '../aol/file-drop-target/file-drop-target.component'; import { IDroppedFile } from '../aol/file-drop-target/file-drop-target.component';
@@ -64,8 +64,9 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
public selectedFeature$: Observable<Feature> = this.store.select(mapReducers.selectGetSelectedFeature); public selectedFeature$: Observable<Feature> = this.store.select(mapReducers.selectGetSelectedFeature);
public clickedFeature: Subject<Feature> = new Subject<Feature>(); public clickedFeature: Subject<Feature> = new Subject<Feature>();
public selectedItem$: Observable<IItem> = this.store.select(mapReducers.selectGetSelectedItem); public selectedItem$: Observable<IItem> = this.store.select(mapReducers.selectGetSelectedItem);
public parentItem$: Observable<IItem> =this.store.select(mapReducers.selectGetParentItem);
public queryState$: Observable<IQueryState> = this.store.select(mapReducers.selectGetQueryState); public queryState$: Observable<IQueryState> = this.store.select(mapReducers.selectGetQueryState);
public state$:Observable<{mapState:IMapState,queryState:IQueryState,setStateCount:number}> = this.store.select(mapReducers.selectGetState); public state$:Observable<{mapState:IMapState,queryState:IQueryState}> = this.store.select(mapReducers.selectGetState);
public period$: Observable<IPeriodState> = this.store.select(mapReducers.selectGetPeriod); public period$: Observable<IPeriodState> = this.store.select(mapReducers.selectGetPeriod);
public clearEnabled$: Observable<boolean> = this.store.select(mapReducers.selectGetClearEnabled); public clearEnabled$: Observable<boolean> = this.store.select(mapReducers.selectGetClearEnabled);
public searchCollapsed$: Observable<boolean> = this.store.select(mapReducers.selectGetSearchCollapsed); public searchCollapsed$: Observable<boolean> = this.store.select(mapReducers.selectGetSearchCollapsed);
@@ -78,49 +79,58 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
public overlayLayersCollapsed: boolean = true; public overlayLayersCollapsed: boolean = true;
public extent$: Observable<Extent> = this.store.select(mapReducers.selectGetExtent); public extent$: Observable<Extent> = this.store.select(mapReducers.selectGetExtent);
public styles$:Observable<IStyles> = this.store.select(mapReducers.selectGetStyles); public styles$:Observable<IStyles> = this.store.select(mapReducers.selectGetStyles);
private setStateCount$:Observable<number> = this.store.select(mapReducers.selectgetSetStateCount); public fullscreen$: Observable<boolean> = this.store.select(commonReducers.selectGetFullScreen);
private lastUrl = ""; private lastUrl = "";
private initialized: boolean = false;
public noContent: boolean = false;
@ViewChild('map') map; @ViewChild('map') map;
@ViewChild('contentDiv') contentDiv: ElementRef;
constructor(private store: Store<mapReducers.State | commonReducers.State>,
private route: ActivatedRoute, constructor(private store: Store<mapReducers.State | commonReducers.State>,
private route: ActivatedRoute,
private router: Router, private router: Router,
private uploadService: ResumableFileUploadService, private uploadService: ResumableFileUploadService,
private serializeService: StateSerializerService, private serializeService: StateSerializerService,
public itemTypeService: ItemTypeService, public itemTypeService: ItemTypeService,
private location: Location, private location: Location,
private geolocationService: GeolocationService, private geolocationService: GeolocationService,
private zone: NgZone, private zone: NgZone,
private deviceorientationService:DeviceOrientationService) { private deviceorientationService:DeviceOrientationService) {
this.querySub = this.query$.pipe(skip(1), withLatestFrom(this.mapState$),withLatestFrom(this.setStateCount$)).subscribe(([[queryState,mapState],setStateCount]) =>{ this.querySub = this.query$.pipe(skip(1), withLatestFrom(this.mapState$)).subscribe(([queryState,mapState]) =>{
if(queryState) { if(queryState) {
let newQueryState = tassign(mapReducers.initialQueryState); let newQueryState = tassign(mapReducers.initialQueryState);
console.debug(`Do Query ${setStateCount}`); console.debug(`Do Query`);
let urlparts=[]; let urlparts=[];
if (queryState.itemCode && queryState.itemCode != "") { if (queryState.itemCode && queryState.itemCode != "") {
if(queryState.itemType && queryState.itemType!= "") { if(queryState.itemType && queryState.itemType!= "") {
let itemType = this.itemTypeService.itemTypes[queryState.itemType]; let itemType = this.itemTypeService.itemTypes[queryState.itemType];
if (itemType && itemType.viewer && itemType.viewer == "edit_in_editor" && itemType.editor) { if (itemType && itemType.viewer && itemType.viewer == "edit_in_editor" && itemType.editor) {
urlparts.push('/editor'); urlparts.push('/editor');
urlparts.push(itemType.editor); urlparts.push(itemType.editor);
urlparts.push('item'); urlparts.push('item');
urlparts.push(queryState.itemCode); urlparts.push(queryState.itemCode);
} }
} }
} else { } else {
newQueryState= queryState; newQueryState= queryState;
} }
if(urlparts.length==0 ) { if(urlparts.length==0 ) {
newQueryState.itemCode = queryState.itemCode; newQueryState.itemCode = queryState.itemCode;
this.zone.run(() => { this.zone.run(() => {
this.store.dispatch(new mapActions.SetQueryState(newQueryState,false)); this.replaceUrl(mapState,newQueryState,false);
}) })
} else { } else {
this.router.navigate(urlparts); this.router.navigate(urlparts);
} }
} }
}); });
this.store.dispatch(new mapActions.Init());
// this.store.select(commonReducers.getRootItems).subscribe((l) => {
// if(l && l.length>0) {
// this.store.dispatch(new mapActions.Init());
// }
// });
} }
@HostListener('document:keyup', ['$event']) @HostListener('document:keyup', ['$event'])
@@ -155,11 +165,12 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
this.store.dispatch(new mapActions.DoQuery(queryState)); this.store.dispatch(new mapActions.DoQuery(queryState));
} }
ngOnInit() { ngOnInit() {
this.initialized = false;
console.debug("Init"); console.debug("Init");
this.store.dispatch(new mapActions.Clear()); this.store.dispatch(new mapActions.Clear());
this.selectedFeatures$.next({x:0,y:0,features:[]}); this.selectedFeatures$.next({x:0,y:0,features:[]});
this.selectedFeatures$.next(null); this.selectedFeatures$.next(null);
} }
initCustomStyles() { initCustomStyles() {
@@ -203,8 +214,8 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
normalizeMapState(mapState:IMapState):IMapState { normalizeMapState(mapState:IMapState):IMapState {
if(!mapState) return null; if(!mapState) return null;
return {zoom: this.round(mapState.zoom,0), return {zoom: this.round(mapState.zoom,0),
rotation: this.round(mapState.rotation,2), rotation: this.round(mapState.rotation,2),
xCenter: this.round(mapState.xCenter,5), xCenter: this.round(mapState.xCenter,5),
yCenter: this.round(mapState.yCenter,5), yCenter: this.round(mapState.yCenter,5),
baseLayerCode: mapState.baseLayerCode }; baseLayerCode: mapState.baseLayerCode };
@@ -219,7 +230,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
let queryState = params.get("queryState"); let queryState = params.get("queryState");
var newQueryState = tassign(mapReducers.initialQueryState); var newQueryState = tassign(mapReducers.initialQueryState);
if (queryState != "") { if (queryState != "") {
newQueryState = this.serializeService.deserialize(queryState); newQueryState = this.serializeService.deserialize(queryState);
} }
return newQueryState; return newQueryState;
} else { } else {
@@ -227,66 +238,62 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
} }
} }
ngAfterViewInit() { ngAfterViewInit() {
console.debug("View init"); console.debug("View init");
this.initCustomStyles(); if(this.route.children.length == 0) {
this.noContent=true;
}
this.initCustomStyles();
// url to state // url to state
this.paramSub = this.route.paramMap.pipe(withLatestFrom(this.state$),switchMap(([params,state]) => { let urlMapState = this.getMapStateFromUrl(this.route.snapshot.paramMap);
var newMapState: IMapState = state.mapState; let urlQueryState = this.getQueryStateFromUrl(this.route.snapshot.paramMap);
var newQueryState: IQueryState = state.queryState; if(urlQueryState && urlMapState && this.noContent) {
this.store.dispatch(new mapActions.SetState(urlMapState,urlQueryState));
var queryStateChanged = false; window.localStorage.setItem("FarmMapsCommonMap_mapState",this.serializeMapState(urlMapState));
var mapStateChanged = false; } else if(urlQueryState && this.noContent) {
let urlMapState = this.getMapStateFromUrl(params); this.store.dispatch(new mapActions.SetQueryState(urlQueryState));
if(urlMapState) { } else {
newMapState = urlMapState; this.store.dispatch(new mapActions.SetReplaceUrl(true));
mapStateChanged = this.serializeMapState(state.mapState) != this.serializeMapState(newMapState);
} }
let urlQueryState = this.getQueryStateFromUrl(params); this.paramSub = this.route.paramMap.pipe(withLatestFrom(this.state$),switchMap(([params,state]) => {
if(urlQueryState) { if(this.initialized && this.noContent) {
newQueryState = urlQueryState; let urlQueryState = this.getQueryStateFromUrl(params);
queryStateChanged = this.serializeService.serialize(state.queryState) != this.serializeService.serialize(urlQueryState); if( this.serializeService.serialize(state.queryState) != this.serializeService.serialize(urlQueryState)) {
} return of(new mapActions.SetState(state.mapState,urlQueryState));
}
if(queryStateChanged && mapStateChanged && state.setStateCount ==0) { }
return of(new mapActions.SetState(newMapState,newQueryState)); return EMPTY;
window.localStorage.setItem("FarmMapsCommonMap_mapState",this.serializeMapState(newMapState)); })).subscribe((action) => {
} else if(queryStateChanged) { if(action) {
return of(new mapActions.SetQueryState(newQueryState)); this.zone.run(() => {
} return of(new mapActions.SetReplaceUrl(true)); console.debug("Url to state");
})).subscribe((action) => { this.store.dispatch(action);
if(action) { });
this.zone.run(() => { }
console.debug("Url to state"); });
this.store.dispatch(action);
});
}
});
// state to url // state to url
this.stateSub = this.state$.pipe(switchMap((state) => { this.stateSub = this.state$.pipe(switchMap((state) => {
let newUrl = this.serializeMapState(state.mapState) + "_" + this.serializeService.serialize(state.queryState); let newUrl = this.serializeMapState(state.mapState) + "_" + this.serializeService.serialize(state.queryState);
if(this.lastUrl!=newUrl && state.setStateCount>0) { if(this.lastUrl!=newUrl) {
this.lastUrl=newUrl; this.lastUrl=newUrl;
return of(state); return of(state);
} }
else { else {
return of(null); return of(null);
} }
})).subscribe((newUrlState) =>{ })).subscribe((newUrlState) =>{
if(newUrlState) { if(newUrlState) {
console.debug(`State to url ${newUrlState.setStateCount}`); console.debug(`State to url`);
this.replaceUrl(newUrlState.mapState,newUrlState.queryState,newUrlState.replaceUrl); this.replaceUrl(newUrlState.mapState,newUrlState.queryState,newUrlState.replaceUrl);
} }
}); });
this.initialized = true;
setTimeout(() => {
this.map.instance.updateSize();
}, 500);
} }
handleSearchCollapse(event) { handleSearchCollapse(event) {
@@ -315,48 +322,59 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
event.preventDefault(); event.preventDefault();
var queryState = tassign(mapReducers.initialQueryState, query); var queryState = tassign(mapReducers.initialQueryState, query);
this.store.dispatch(new mapActions.DoQuery(queryState)); this.store.dispatch(new mapActions.DoQuery(queryState));
}
replaceUrl(mapState: IMapState, queryState: IQueryState, replace: boolean = true) {
let parts =["."];
parts.push(mapState.xCenter.toFixed(5));
parts.push(mapState.yCenter.toFixed(5));
parts.push( mapState.zoom.toFixed(0));
parts.push( mapState.rotation.toFixed(2));
if(mapState.baseLayerCode!="") {
parts.push(mapState.baseLayerCode);
parts.push( this.serializeService.serialize(queryState));
console.debug("Replace url",parts);
this.router.navigate(parts, { replaceUrl: replace,relativeTo:this.route.parent });
}
} }
handleOnMoveEnd(event) { replaceUrl(mapState: IMapState, queryState: IQueryState, replace: boolean = true) {
console.debug("Move end"); if(this.noContent) {
this.zone.run(() =>{ let newMapState = this.serializeMapState(mapState);
var map = event.map; let newQueryState = this.serializeService.serialize(queryState);
var view = map.getView(); let currentMapState = this.serializeMapState(this.getMapStateFromUrl(this.route.snapshot.paramMap));
var rotation = view.getRotation(); let urlQueryState = this.getQueryStateFromUrl(this.route.snapshot.paramMap);
var zoom = view.getZoom(); let currentQueryState = urlQueryState==null?"":this.serializeService.serialize(urlQueryState);
var center = transform(view.getCenter(), view.getProjection(), "EPSG:4326"); if(mapState.baseLayerCode!="" && ((newMapState!= currentMapState) || (newQueryState!=currentQueryState))) {
var extent = view.calculateExtent(this.map.instance.getSize()); let parts =["."];
let mapState: IMapState = { xCenter: center[0], yCenter: center[1], zoom: zoom, rotation: rotation, baseLayerCode: null }; parts.push(mapState.xCenter.toFixed(5));
let state = { mapState: mapState, extent: extent }; parts.push(mapState.yCenter.toFixed(5));
let source = from([state]); parts.push( mapState.zoom.toFixed(0));
source.pipe(withLatestFrom(this.selectedBaseLayer$),withLatestFrom(this.setStateCount$)).subscribe(([[state, baselayer],setStateCount]) => { parts.push( mapState.rotation.toFixed(2));
if (mapState && baselayer) { // do not react on first move parts.push(mapState.baseLayerCode);
let newMapState = tassign(state.mapState, { baseLayerCode: baselayer.item.code }); parts.push( this.serializeService.serialize(queryState));
this.store.dispatch(new mapActions.SetMapState(newMapState));
this.store.dispatch(new mapActions.SetViewExtent(state.extent)); console.debug("Replace url",parts);
} this.router.navigate(parts, { replaceUrl: replace,relativeTo:this.route.parent });
}
}
}
handleOnMoveEnd(event) {
if(this.initialized) {
this.zone.run(() =>{
console.debug("Move end");
var map = event.map;
var view = map.getView();
var rotation = view.getRotation();
var zoom = view.getZoom();
var center = transform(view.getCenter(), view.getProjection(), "EPSG:4326");
var viewExtent = view.calculateExtent(this.map.instance.getSize());
let mapState: IMapState = { xCenter: center[0], yCenter: center[1], zoom: zoom, rotation: rotation, baseLayerCode: null };
let state = { mapState: mapState, viewExtent: viewExtent };
console.debug("Center: ",center[0],center[1] );
let source = from([state]);
source.pipe(withLatestFrom(this.selectedBaseLayer$)).subscribe(([state, baselayer]) => {
if (mapState && baselayer) { // do not react on first move
let newMapState = tassign(state.mapState, { baseLayerCode: baselayer.item.code });
this.store.dispatch(new mapActions.SetMapState(newMapState));
this.store.dispatch(new mapActions.SetViewExtent(state.viewExtent));
}
});
}); });
}); }
} }
handleOnMouseDown(event: MouseEvent) { handleOnMouseDown(event: MouseEvent) {
event.stopPropagation(); event.stopPropagation();
this.zone.run(() =>{ this.zone.run(() =>{
this.store.dispatch(new mapActions.CollapseSearch()); this.store.dispatch(new commonActions.CloseAll());
}); });
} }
@@ -365,8 +383,8 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
} }
handleClearSearch(event) { handleClearSearch(event) {
this.store.dispatch(new commonActions.Escape(true, false)); this.store.dispatch(new mapActions.Clear());
} }
handleOnDelete(itemLayer: IItemLayer) { handleOnDelete(itemLayer: IItemLayer) {
this.store.dispatch(new mapActions.RemoveLayer(itemLayer)); this.store.dispatch(new mapActions.RemoveLayer(itemLayer));
@@ -385,7 +403,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
extend(extent, itemLayer.layer.getExtent()); extend(extent, itemLayer.layer.getExtent());
if (extent) { if (extent) {
this.store.dispatch(new mapActions.SetExtent(extent)); this.store.dispatch(new mapActions.SetExtent(extent));
} }
} }
handleSelectBaseLayer(itemLayer: IItemLayer) { handleSelectBaseLayer(itemLayer: IItemLayer) {
@@ -400,7 +418,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
if (this.paramSub) this.paramSub.unsubscribe(); if (this.paramSub) this.paramSub.unsubscribe();
if (this.itemTypeSub) this.itemTypeSub.unsubscribe(); if (this.itemTypeSub) this.itemTypeSub.unsubscribe();
if (this.stateSub) this.stateSub.unsubscribe(); if (this.stateSub) this.stateSub.unsubscribe();
if (this.queryStateSub) this.queryStateSub.unsubscribe(); if (this.queryStateSub) this.queryStateSub.unsubscribe();
if (this.querySub) this.querySub.unsubscribe(); if (this.querySub) this.querySub.unsubscribe();
} }
} }

View File

@@ -1,20 +1,25 @@
.custom-day { .custom-day {
text-align: center; text-align: center;
padding: 0.185rem 0.25rem; padding: 0.185rem 0.25rem;
display: inline-block; display: inline-block;
height: 2rem; height: 2rem;
width: 2rem; width: 2rem;
} }
.custom-day.focused { .custom-day.focused {
background-color: #e6e6e6; background-color: #e6e6e6;
} }
.custom-day.range, .custom-day:hover { .custom-day.range, .custom-day:hover {
background-color: rgb(2, 117, 216); background-color: rgb(2, 117, 216);
color: white; color: white;
} }
.custom-day.faded { .custom-day.faded {
background-color: rgba(2, 117, 216, 0.5); background-color: rgba(2, 117, 216, 0.5);
} }
ngb-datepicker {
overflow: hidden;
max-width: calc(100vw - 3em);
}

View File

@@ -8,42 +8,58 @@ import { IItemLayer } from '../../models/item.layer';
@Component({ @Component({
selector: 'fm-map-selected-item-container', selector: 'fm-map-selected-item-container',
templateUrl: './selected-item-container.component.html', templateUrl: './selected-item-container.component.html',
styleUrls: ['./selected-item-container.component.scss'] styleUrls: ['./selected-item-container.component.scss']
}) })
export class SelectedItemContainerComponent { export class SelectedItemContainerComponent {
constructor(private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractSelectedItemComponent) public selectedItemComponents: AbstractSelectedItemComponent[] ) { constructor(private componentFactoryResolver: ComponentFactoryResolver, @Inject(AbstractSelectedItemComponent) public selectedItemComponents: AbstractSelectedItemComponent[] ) {
this.selectedItemComponents = [...this.selectedItemComponents].reverse();
} }
@Input() item: IItem; @Input() item: IItem;
@Input() parentItem: IItem;
@Input() itemLayer:IItemLayer; @Input() itemLayer:IItemLayer;
@Input() overlayLayers:Array<IItemLayer>; @Input() overlayLayers:Array<IItemLayer>;
@ViewChild(WidgetHostDirective, { static: true }) widgetHost: WidgetHostDirective; @ViewChild(WidgetHostDirective, { static: true }) widgetHost: WidgetHostDirective;
loadComponent() { loadComponent() {
let componentFactory: ComponentFactory<AbstractSelectedItemComponent> = this.componentFactoryResolver.resolveComponentFactory(SelectedItemComponent); // default let componentFactory: ComponentFactory<AbstractSelectedItemComponent> = this.componentFactoryResolver.resolveComponentFactory(SelectedItemComponent); // default
let firstComponentWithTypeAndTask = this.selectedItemComponents
.find(value => value['forSourceTask'] == this.item.sourceTask &&
value['forItemType'] == this.item.itemType
);
if (firstComponentWithTypeAndTask) { let selected = -1;
componentFactory = this.componentFactoryResolver.resolveComponentFactory(firstComponentWithTypeAndTask['constructor'] as any); let maxMatches =0;
} else { let showItem = true;
let firstComponentWithType = this.selectedItemComponents for (let i = 0; i < this.selectedItemComponents.length; i++) {
.find(value => value['forSourceTask'] == null && let matches=0;
value['forItemType'] == this.item.itemType); let criteria=0;
if (this.selectedItemComponents[i]['forItemType'] ) {
criteria++;
if(this.selectedItemComponents[i]['forItemType'].indexOf(this.item.itemType) >= 0) {
matches++;
}
}
if (this.selectedItemComponents[i]['forSourceTask']) {
criteria++;
if( this.selectedItemComponents[i]['forSourceTask'].indexOf(this.item.sourceTask) >= 0) {
matches++;
}
}
if (firstComponentWithType) { if(criteria==matches && matches > maxMatches) {
componentFactory = this.componentFactoryResolver.resolveComponentFactory(firstComponentWithType['constructor'] as any); selected=i;
maxMatches = matches;
} }
} }
if (selected >= 0) {
componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.selectedItemComponents[selected]['constructor'] as any);
}
const viewContainerRef = this.widgetHost.viewContainerRef; const viewContainerRef = this.widgetHost.viewContainerRef;
viewContainerRef.clear(); viewContainerRef.clear();
const componentRef = viewContainerRef.createComponent(componentFactory); const componentRef = viewContainerRef.createComponent(componentFactory);
(<AbstractSelectedItemComponent>componentRef.instance).item = this.item; (<AbstractSelectedItemComponent>componentRef.instance).item = this.item;
(<AbstractSelectedItemComponent>componentRef.instance).parentItem = this.parentItem;
(<AbstractSelectedItemComponent>componentRef.instance).itemLayer = this.itemLayer; (<AbstractSelectedItemComponent>componentRef.instance).itemLayer = this.itemLayer;
(<AbstractSelectedItemComponent>componentRef.instance).overlayLayers = this.overlayLayers; (<AbstractSelectedItemComponent>componentRef.instance).overlayLayers = this.overlayLayers;
} }

View File

@@ -7,9 +7,10 @@ import { commonReducers, ItemTypeService, IItem, Item, ItemService, FolderServic
import { Router, ActivatedRoute, ParamMap, Event } from '@angular/router'; import { Router, ActivatedRoute, ParamMap, Event } from '@angular/router';
import { ForItemType } from '../for-item/for-itemtype.decorator'; import { ForItemType } from '../for-item/for-itemtype.decorator';
import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component'; import { AbstractSelectedItemComponent } from '../selected-item/selected-item.component';
import { Observable } from 'rxjs'; import { Observable,of } from 'rxjs';
import {GeoJSON} from 'ol/format'; import {GeoJSON} from 'ol/format';
import {getArea} from 'ol/sphere'; import {getArea} from 'ol/sphere';
import { withLatestFrom,switchMap,combineLatest } from 'rxjs/operators';
@ForItemType("vnd.farmmaps.itemtype.cropfield") @ForItemType("vnd.farmmaps.itemtype.cropfield")
@@ -38,6 +39,25 @@ export class SelectedItemCropfieldComponent extends AbstractSelectedItemComponen
} }
ngOnInit() { ngOnInit() {
this. items = this.folderService$.getItems(this.item.code, 0, 1000); var childItems = this.folderService$.getItems(this.item.code, 0, 1000);
var atLocationItems = this.itemService$.getItemList(null,null,null,this.item.code,true);
this.items = childItems.pipe(
combineLatest(atLocationItems),
switchMap(([ci,ali]) => {
let retVal:IListItem[] = [];
let codes = {};
ci.forEach((listItem) => {
retVal.push(listItem);
codes[listItem.code]=listItem;
});
ali.forEach((atlocationitem) => {
let listItem = atlocationitem as IListItem;
let allowedItemTypes = "vnd.farmmaps.itemtype.device.senml"; // this is a hack
if(!codes[listItem.code] && allowedItemTypes.indexOf(listItem.itemType) >= 0) {
retVal.push(listItem);
}
});
return of(retVal);
}));
} }
} }

View File

@@ -4,6 +4,7 @@
<div class="card-body"> <div class="card-body">
<div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div> <div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div>
<div class="card menu-card"> <div class="card menu-card">
<h2 *ngIf="parentItem">{{parentItem.name}}</h2>
<h1>{{item.name}}</h1> <h1>{{item.name}}</h1>
</div> </div>
<div class="legend-container" *ngIf="item?.data.layers;let layers"> <div class="legend-container" *ngIf="item?.data.layers;let layers">
@@ -13,15 +14,16 @@
<option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option> <option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option>
</select> </select>
</div> </div>
<fm-map-layer-legend [layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend> <fm-map-layer-legend [showTitle]="layers.length == 1"
[layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>
</div> </div>
</div> </div>
<div class="card menu-card"> <div class="card menu-card">
<ul class="p-0 mt-2"> <ul class="p-0 mt-2">
<li *ngIf="item.isEditable"><a href="#" class="mt-1 mr-1" (click)="handleOnEdit(item)"><i class="fa fa-pencil" aria-hidden="true" i18n-title title="Edit"></i>&nbsp;<span i18n>Edit</span></a></li> <li *ngIf="item.isEditable"><a href="#" class="mt-1 mr-1" (click)="handleOnEdit(item)"><i class="fa fa-pencil" aria-hidden="true" i18n-title title="Edit"></i>&nbsp;<span i18n>Edit</span></a></li>
<ng-container *ngIf="itemTypeService.isLayer(item)"> <ng-container *ngIf="itemTypeService.isLayer(item)">
<li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)"><i class="fa fa-eye" aria-hidden="true" i18n-title title="Add as layer"></i>&nbsp;<span i18n>Add as overlay</span></a></li> <li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-plus" aria-hidden="true" i18n-title title="Add as layer"></i>&nbsp;<span i18n>Add as overlay</span></a></li>
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)"><i class="fa fa-eye" aria-hidden="true" i18n-title title="Remove overlay"></i>&nbsp;<span i18n>Remove overlay</span></a></li> <li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i>&nbsp;<span i18n>Remove overlay</span></a></li>
</ng-container> </ng-container>
</ul> </ul>
</div> </div>

View File

@@ -4,6 +4,7 @@
<div class="card-body"> <div class="card-body">
<div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div> <div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div>
<div class="card menu-card"> <div class="card menu-card">
<h2 *ngIf="parentItem">{{parentItem.name}}</h2>
<h1>{{item.name}}</h1> <h1>{{item.name}}</h1>
</div> </div>
<div class="legend-container" *ngIf="item?.data.layers;let layers"> <div class="legend-container" *ngIf="item?.data.layers;let layers">
@@ -20,8 +21,8 @@
<ul class="p-0 mt-2"> <ul class="p-0 mt-2">
<li *ngIf="item.isEditable"><a href="#" class="mt-1 mr-1" (click)="handleOnEdit(item)" ><i class="fa fa-pencil" aria-hidden="true" i18n-title title="Edit"></i>&nbsp;<span i18n>Edit</span></a></li> <li *ngIf="item.isEditable"><a href="#" class="mt-1 mr-1" (click)="handleOnEdit(item)" ><i class="fa fa-pencil" aria-hidden="true" i18n-title title="Edit"></i>&nbsp;<span i18n>Edit</span></a></li>
<ng-container *ngIf="itemTypeService.isLayer(item)"> <ng-container *ngIf="itemTypeService.isLayer(item)">
<li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)" ><i class="fa fa-eye" aria-hidden="true" i18n-title title="Add as layer"></i>&nbsp;<span i18n>Add as overlay</span></a></li> <li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)" ><i class="fas fa-layer-olus" aria-hidden="true" i18n-title title="Add as layer"></i>&nbsp;<span i18n>Add as overlay</span></a></li>
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)" ><i class="fa fa-eye" aria-hidden="true" i18n-title title="Remove overlay"></i>&nbsp;<span i18n>Remove overlay</span></a></li> <li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)" ><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i>&nbsp;<span i18n>Remove overlay</span></a></li>
</ng-container> </ng-container>
</ul> </ul>
</div> </div>

View File

@@ -4,6 +4,7 @@
<div class="card-body"> <div class="card-body">
<div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div> <div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div>
<div class="card menu-card"> <div class="card menu-card">
<h2 *ngIf="parentItem">{{parentItem.name}}</h2>
<h1>{{item.name}}</h1> <h1>{{item.name}}</h1>
</div> </div>
<div class="legend-container" *ngIf="item?.data.layers;let layers"> <div class="legend-container" *ngIf="item?.data.layers;let layers">
@@ -28,13 +29,17 @@
<option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option> <option *ngFor="let l of layers;" [value]="l.index" [selected]="itemLayer.layerIndex == l.index">{{l.name}}</option>
</select> </select>
</div> </div>
<fm-map-layer-legend [layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend> <fm-map-layer-legend [showTitle]="layers.length == 1"
[layer]="layer(layers,itemLayer.layerIndex)" [histogramenabled]="true"></fm-map-layer-legend>
</div> </div>
</div> </div>
<div class="card menu-card"> <div class="card menu-card">
<ul class="p-0 mt-2"> <ul class="p-0 mt-2">
<li *ngIf="item.isEditable"><a href="#" class="mt-1 mr-1" (click)="handleOnEdit(item)"><i class="fa fa-pencil" aria-hidden="true" i18n-title title="Edit"></i>&nbsp;<span i18n>Edit</span></a></li> <li *ngIf="item.isEditable"><a href="#" class="mt-1 mr-1" (click)="handleOnEdit(item)"><i class="fa fa-pencil" aria-hidden="true" i18n-title title="Edit"></i>&nbsp;<span i18n>Edit</span></a></li>
<li *ngIf="itemTypeService.isLayer(item)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)" class="mt-1 mr-1"><i class="fa fa-eye" aria-hidden="true" i18n-title title="Add as layer"></i>&nbsp;<span i18n>Add as overlay</span></a></li> <ng-container *ngIf="itemTypeService.isLayer(item)">
<li *ngIf="!getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleAddAsLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-plus" aria-hidden="true" i18n-title title="Add as layer"></i>&nbsp;<span i18n>Add as overlay</span></a></li>
<li *ngIf="getItemLayer(item,itemLayer.layerIndex)"><a href="#" (click)="handleRemoveLayer(item,itemLayer.layerIndex)"><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i>&nbsp;<span i18n>Remove overlay</span></a></li>
</ng-container>
<li><a href="#" (click)="handleGoToChart(item)"><i class="fa fa-line-chart" aria-hidden="true" i18m-title title="Show chart"></i>&nbsp;<span i18n>Show chart</span></a></li> <li><a href="#" (click)="handleGoToChart(item)"><i class="fa fa-line-chart" aria-hidden="true" i18m-title title="Show chart"></i>&nbsp;<span i18n>Show chart</span></a></li>
</ul> </ul>
</div> </div>

View File

@@ -35,7 +35,7 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent
nextDate():Date { nextDate():Date {
let temporalItemLayer = this.itemLayer as ITemporalItemLayer; let temporalItemLayer = this.itemLayer as ITemporalItemLayer;
if(temporalItemLayer.nextItemLayer.item) if(temporalItemLayer.nextItemLayer.item)
return temporalItemLayer.nextItemLayer.item.dataDate; return new Date(Date.parse(temporalItemLayer.nextItemLayer.item.dataDate)) ;
return null; return null;
} }
@@ -47,7 +47,7 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent
previousDate():Date { previousDate():Date {
let temporalItemLayer = this.itemLayer as ITemporalItemLayer; let temporalItemLayer = this.itemLayer as ITemporalItemLayer;
if(temporalItemLayer.previousItemLayer.item) if(temporalItemLayer.previousItemLayer.item)
return temporalItemLayer.previousItemLayer.item.dataDate; return new Date(Date.parse(temporalItemLayer.previousItemLayer.item.dataDate));
return null; return null;
} }
@@ -74,7 +74,7 @@ export class SelectedItemTemporalComponent extends AbstractSelectedItemComponent
} }
handleGoToChart(item: IItem) { handleGoToChart(item: IItem) {
this.router.navigate(['/viewer', 'temporal', 'item', item.parentCode, item.dataDate.getUTCFullYear()]); this.router.navigate(['/viewer', 'temporal', 'item', item.parentCode, new Date(Date.parse(item.dataDate)).getUTCFullYear()]);
return false; return false;
} }
} }

View File

@@ -1,6 +1,6 @@
<div *ngIf="item;let item"> <div *ngIf="item;let item">
<div class="card border-0"> <div class="card border-0">
<img *ngIf="item.thumbnail" class="card-img-top" [src]="config.getConfig('apiEndPoint') +'/api/v1/items/'+item.code+'/thumbnail?v='+item.updated.getTime()" /> <img *ngIf="item.thumbnail" class="card-img-top" [src]="getThumbnailUrl(item)" />
<div *ngIf="!item.thumbnail" class="big-icon" [style.background-color]="itemTypeService.getColor(item.itemType)"> <div *ngIf="!item.thumbnail" class="big-icon" [style.background-color]="itemTypeService.getColor(item.itemType)">
<i [ngClass]="itemTypeService.getIcon(item.itemType)"></i> <i [ngClass]="itemTypeService.getIcon(item.itemType)"></i>
</div> </div>
@@ -14,8 +14,8 @@
<li *ngIf="itemTypeService.hasViewer(item)"><a href="#" (click)="handleOnView(item)" class="btn btn-outline-secondary"><i class="fa fa-eye" aria-hidden="true" title="View"></i>&nbsp;<span i18n>View</span></a></li> <li *ngIf="itemTypeService.hasViewer(item)"><a href="#" (click)="handleOnView(item)" class="btn btn-outline-secondary"><i class="fa fa-eye" aria-hidden="true" title="View"></i>&nbsp;<span i18n>View</span></a></li>
<li *ngIf="item.isEditable"><a href="#" (click)="handleOnEdit(item)"><i class="fa fa-pencil" aria-hidden="true" title="Edit"></i> <span i18n>Edit</span></a></li> <li *ngIf="item.isEditable"><a href="#" (click)="handleOnEdit(item)"><i class="fa fa-pencil" aria-hidden="true" title="Edit"></i> <span i18n>Edit</span></a></li>
<ng-container *ngIf="itemTypeService.isLayer(item)"> <ng-container *ngIf="itemTypeService.isLayer(item)">
<li *ngIf="!getItemLayer(item)"><a href="#" (click)="handleAddAsLayer(item)"><i class="fa fa-eye" aria-hidden="true" i18n-title title="Add as layer"></i>&nbsp;<span i18n>Add as overlay</span></a></li> <li *ngIf="!getItemLayer(item)"><a href="#" (click)="handleAddAsLayer(item)"><i class="fas fa-layer-plus" aria-hidden="true" i18n-title title="Add as layer"></i>&nbsp;<span i18n>Add as overlay</span></a></li>
<li *ngIf="getItemLayer(item)"><a href="#" (click)="handleRemoveLayer(item)"><i class="fa fa-eye" aria-hidden="true" i18n-title title="Remove overlay"></i>&nbsp;<span i18n>Remove overlay</span></a></li> <li *ngIf="getItemLayer(item)"><a href="#" (click)="handleRemoveLayer(item)"><i class="fas fa-layer-minus" aria-hidden="true" i18n-title title="Remove overlay"></i>&nbsp;<span i18n>Remove overlay</span></a></li>
</ng-container> </ng-container>
</ul> </ul>
</div> </div>

View File

@@ -11,7 +11,8 @@ import { IItemLayer } from '../../models/item.layer';
@Injectable() @Injectable()
@Directive() @Directive()
export abstract class AbstractSelectedItemComponent { export abstract class AbstractSelectedItemComponent {
@Input() item: IItem @Input() item: IItem;
@Input() parentItem: IItem;
@Input() itemLayer: IItemLayer; @Input() itemLayer: IItemLayer;
@Input() overlayLayers: Array<IItemLayer>; @Input() overlayLayers: Array<IItemLayer>;
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService, private location: Location, public router: Router) { constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService, private location: Location, public router: Router) {
@@ -60,6 +61,7 @@ export abstract class AbstractSelectedItemComponent {
event.preventDefault(); event.preventDefault();
this.location.back(); this.location.back();
} }
} }
@Injectable() @Injectable()
@@ -73,4 +75,8 @@ export class SelectedItemComponent extends AbstractSelectedItemComponent {
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, public config:AppConfig) { constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService, location: Location, router: Router, public config:AppConfig) {
super(store, itemTypeService,location,router); super(store, itemTypeService,location,router);
} }
getThumbnailUrl(item:IItem):string {
return this.config.getConfig('apiEndPoint') +'/api/v1/items/'+item.code+'/thumbnail?v=' + Date.parse(item.updated);
}
} }

View File

@@ -3,8 +3,8 @@ import { Injectable } from '@angular/core';
import { Store, Action } from '@ngrx/store'; import { Store, Action } from '@ngrx/store';
import { Effect, Actions,ofType } from '@ngrx/effects'; import { Effect, Actions,ofType } from '@ngrx/effects';
import { Observable , of, interval } from 'rxjs'; import { EMPTY, Observable , of } from 'rxjs';
import { withLatestFrom, switchMap, map, catchError, mergeMap,delayWhen } from 'rxjs/operators'; import { withLatestFrom, switchMap, map, catchError, mergeMap } from 'rxjs/operators';
import {GeoJSON,WKT} from 'ol/format'; import {GeoJSON,WKT} from 'ol/format';
import {Feature} from 'ol'; import {Feature} from 'ol';
@@ -60,7 +60,7 @@ export class MapEffects {
anchor: [0.5, 1], anchor: [0.5, 1],
scale: 0.05, scale: 0.05,
src: this.featureIconService$.getIconImageDataUrl("fa fa-file-o") src: this.featureIconService$.getIconImageDataUrl("fa fa-file-o")
}), }),
stroke: new style.Stroke({ stroke: new style.Stroke({
color: 'red', color: 'red',
width: 1 width: 1
@@ -82,7 +82,7 @@ export class MapEffects {
fill: new style.Fill({ fill: new style.Fill({
color: 'rgba(0, 0, 255, 0.1)' color: 'rgba(0, 0, 255, 0.1)'
}) })
}))); })));
return actions; return actions;
} }
@@ -103,20 +103,13 @@ export class MapEffects {
catchError(error => of(new commonActions.Fail(error)))); catchError(error => of(new commonActions.Fail(error))));
})); }));
@Effect()
initRootItems$: Observable<Action> = this.actions$.pipe(
ofType(commonActions.INITROOTSUCCESS),
map((action) => new mapActions.Init()
));
@Effect() @Effect()
startSearch$: Observable<Action> = this.actions$.pipe( startSearch$: Observable<Action> = this.actions$.pipe(
ofType(mapActions.STARTSEARCH), ofType(mapActions.STARTSEARCH),
withLatestFrom(this.store$.select(mapReducers.selectgetSetStateCount)), switchMap((action) => {
switchMap(([action,setStateCount]) => {
let a = action as mapActions.StartSearch; let a = action as mapActions.StartSearch;
var startDate = a.queryState.startDate; var startDate = a.queryState.startDate;
var endDate = a.queryState.endDate; var endDate = a.queryState.endDate;
var newAction:Observable<Action>; var newAction:Observable<Action>;
if (a.queryState.itemCode || a.queryState.parentCode || a.queryState.itemType || a.queryState.query || a.queryState.tags) { if (a.queryState.itemCode || a.queryState.parentCode || a.queryState.itemType || a.queryState.query || a.queryState.tags) {
newAction= this.itemService$.getFeatures(a.queryState.bbox, "EPSG:3857", a.queryState.query, a.queryState.tags, startDate, endDate, a.queryState.itemType, a.queryState.parentCode).pipe( newAction= this.itemService$.getFeatures(a.queryState.bbox, "EPSG:3857", a.queryState.query, a.queryState.tags, startDate, endDate, a.queryState.itemType, a.queryState.parentCode).pipe(
@@ -126,13 +119,13 @@ export class MapEffects {
f.id = f.properties["code"]; f.id = f.properties["code"];
} }
} }
return of(new mapActions.StartSearchSuccess(this._geojsonFormat.readFeatures(features), a.queryState,setStateCount)); return of(new mapActions.StartSearchSuccess(this._geojsonFormat.readFeatures(features), a.queryState));
} }
), ),
catchError(error => of(new commonActions.Fail(error)))); catchError(error => of(new commonActions.Fail(error))));
} else { } else {
return []; return [];
} }
return newAction; return newAction;
})); }));
@@ -140,22 +133,36 @@ export class MapEffects {
@Effect() @Effect()
zoomToExtent$: Observable<Action> = this.actions$.pipe( zoomToExtent$: Observable<Action> = this.actions$.pipe(
ofType(mapActions.STARTSEARCHSUCCESS), ofType(mapActions.STARTSEARCHSUCCESS),
delayWhen(action => (action as mapActions.StartSearchSuccess).setStateCount == 1 ? interval(500):interval(0)),
mergeMap((action: mapActions.StartSearchSuccess) => { mergeMap((action: mapActions.StartSearchSuccess) => {
let actions =[]; let actions =[];
actions.push(new commonActions.SetMenuVisible(false)); actions.push(new commonActions.SetMenuVisible(false));
let extent = createEmpty(); let extent = createEmpty();
if (!action.query.bboxFilter) { if (!action.query.bboxFilter) {
if (extent) { if (extent) {
for (let f of action.features) { for (let f of action.features) {
extend(extent, (f as Feature).getGeometry().getExtent()); extend(extent, (f as Feature).getGeometry().getExtent());
} }
} if(action.features && action.features.length >0) {
actions.push(new mapActions.SetExtent(extent)); actions.push(new mapActions.SetExtent(extent));
}
}
} }
return actions; return actions;
})); }));
@Effect()
zoomToExtent2$: Observable<Action> = this.actions$.pipe(
ofType(mapActions.SETFEATURES),
map((action: mapActions.SetFeatures) => {
let extent = createEmpty();
if (extent) {
for (let f of action.features) {
extend(extent, (f as Feature).getGeometry().getExtent());
}
}
return new mapActions.SetExtent(extent);
}));
@Effect() @Effect()
hideMenu$: Observable<Action> = this.actions$.pipe( hideMenu$: Observable<Action> = this.actions$.pipe(
ofType(mapActions.STARTSEARCHSUCCESS), ofType(mapActions.STARTSEARCHSUCCESS),
@@ -167,13 +174,19 @@ export class MapEffects {
selectItem$: Observable<Action> = this.actions$.pipe( selectItem$: Observable<Action> = this.actions$.pipe(
ofType(mapActions.SELECTITEM), ofType(mapActions.SELECTITEM),
withLatestFrom(this.store$.select(mapReducers.selectGetSelectedItem)), withLatestFrom(this.store$.select(mapReducers.selectGetSelectedItem)),
withLatestFrom(this.store$.select(mapReducers.getSetStateCount)), switchMap(([action, selectedItem]) => {
switchMap(([[action, selectedItem],setStateCount]) => {
let a = action as mapActions.SelectItem; let a = action as mapActions.SelectItem;
let itemCode = selectedItem ? selectedItem.code : ""; let itemCode = selectedItem ? selectedItem.code : "";
if (a.itemCode != itemCode || setStateCount == 1) { if (a.itemCode != itemCode) {
return this.itemService$.getItem(a.itemCode).pipe( return this.itemService$.getItem(a.itemCode).pipe(
map((item: IItem) => new mapActions.SelectItemSuccess(item)), switchMap(child => {
return this.itemService$.getItem(child.parentCode)
.pipe(map(parent => {
return {child, parent};
}),catchError(() => { let parent:IItem = null;return of({child,parent})})
);
}),
map(data => new mapActions.SelectItemSuccess(data.child, data.parent)),
catchError(error => of(new commonActions.Fail(error)))) catchError(error => of(new commonActions.Fail(error))))
} else { } else {
return []; return [];
@@ -181,6 +194,14 @@ export class MapEffects {
} }
)); ));
@Effect()
selectItemSuccessSetLayer$: Observable<Action> = this.actions$.pipe(
ofType(mapActions.SELECTITEMSUCCESS),
map((action:mapActions.SelectItemSuccess) =>
new mapActions.SetSelectedItemLayer(action.item)
)
);
@Effect() @Effect()
selectItemSuccess$: Observable<Action> = this.actions$.pipe( selectItemSuccess$: Observable<Action> = this.actions$.pipe(
ofType(mapActions.SELECTITEMSUCCESS), ofType(mapActions.SELECTITEMSUCCESS),
@@ -202,14 +223,14 @@ export class MapEffects {
if(action.item.itemType == "vnd.farmmaps.itemtype.temporal") { if(action.item.itemType == "vnd.farmmaps.itemtype.temporal") {
return this.itemService$.getChildItemList(action.item.code,null).pipe( return this.itemService$.getChildItemList(action.item.code,null).pipe(
map(items => new mapActions.SelectTemporalItemsSuccess( map(items => new mapActions.SelectTemporalItemsSuccess(
items.sort((a, b) => items.sort((a, b) =>
-(b.dataDate.getTime() - a.dataDate.getTime()) -(Date.parse(b.dataDate) - Date.parse(a.dataDate))
) )
)), )),
catchError(error => of(new commonActions.Fail(error)))); catchError(error => of(new commonActions.Fail(error))));
} else { } else {
return []; return [];
} }
} }
)); ));
@@ -231,9 +252,9 @@ export class MapEffects {
feature = f; feature = f;
break; break;
} }
} }
if (feature) { if (feature) {
return of(new mapActions.UpdateFeatureSuccess(this.toPointFeature(deviceUpdateEventAction))); return of(new mapActions.UpdateFeatureSuccess(this.toPointFeature(deviceUpdateEventAction)));
} else { } else {
return []; return [];
} }
@@ -244,10 +265,17 @@ export class MapEffects {
ofType(commonActions.ITEMCHANGEDEVENT), ofType(commonActions.ITEMCHANGEDEVENT),
withLatestFrom(this.store$.select(mapReducers.selectGetSelectedItem)), withLatestFrom(this.store$.select(mapReducers.selectGetSelectedItem)),
mergeMap(([action, selectedItem]) => { mergeMap(([action, selectedItem]) => {
let itemChangedAction = action as commonActions.ItemChangedEvent; let itemChangedAction = action as commonActions.ItemChangedEvent;
if (selectedItem && selectedItem.code == itemChangedAction.itemCode) { if (selectedItem && selectedItem.code == itemChangedAction.itemCode) {
return this.itemService$.getItem(itemChangedAction.itemCode).pipe( return this.itemService$.getItem(itemChangedAction.itemCode).pipe(
map((item: IItem) => new mapActions.SelectItemSuccess(item)), switchMap(child => {
return this.itemService$.getItem(child.parentCode)
.pipe(map(parent => {
return {child, parent};
})
);
}),
map(data => new mapActions.SelectItemSuccess(data.child, data.parent)),
catchError(error => of(new commonActions.Fail(error)))); catchError(error => of(new commonActions.Fail(error))));
} else { } else {
return []; return [];
@@ -256,26 +284,18 @@ export class MapEffects {
getActionFromQueryState(queryState:IQueryState, inSearch:boolean):Observable<Action>|[] { getActionFromQueryState(queryState:IQueryState, inSearch:boolean):Observable<Action>|[] {
if(!inSearch && (queryState.itemType || queryState.parentCode || queryState.itemCode || queryState.query || queryState.tags)) { if(!inSearch && (queryState.itemType || queryState.parentCode || queryState.itemCode || queryState.query || queryState.tags)) {
var newAction:Action; var newAction:Action;
if (queryState.itemCode && queryState.itemCode != "") { if (queryState.itemCode && queryState.itemCode != "") {
newAction= new mapActions.SelectItem(queryState.itemCode); newAction= new mapActions.SelectItem(queryState.itemCode);
} else { } else {
newAction= new mapActions.StartSearch(queryState); newAction= new mapActions.StartSearch(queryState);
} }
return of(newAction);
} else { } else {
return of(new commonActions.Escape(true,false)); newAction = new mapActions.Clear();
} }
} return of(newAction);
}
@Effect()
setQueryState$: Observable<Action> = this.actions$.pipe(
ofType(mapActions.SETQUERYSTATE),
withLatestFrom(this.store$.select(mapReducers.selectGetInSearch)),
switchMap(([action,inSearch]) => {
let a = action as mapActions.SetQueryState;
return this.getActionFromQueryState(a.queryState,inSearch);
}));
@Effect() @Effect()
setState$: Observable<Action> = this.actions$.pipe( setState$: Observable<Action> = this.actions$.pipe(
@@ -286,8 +306,20 @@ export class MapEffects {
return this.getActionFromQueryState(a.queryState,inSearch); return this.getActionFromQueryState(a.queryState,inSearch);
})); }));
@Effect()
escape$:Observable<Action> = this.actions$.pipe(
ofType(commonActions.ESCAPE),
switchMap((action) => {
let a = action as commonActions.Escape;
if(a.escapeKey) {
return of(new mapActions.Clear());
} else {
return EMPTY;
}
}));
constructor(private actions$: Actions, private store$: Store<mapReducers.State>, private folderService$: FolderService, private itemService$: ItemService,private featureIconService$:FeatureIconService,private itemTypeService$:ItemTypeService) { constructor(private actions$: Actions, private store$: Store<mapReducers.State>, private folderService$: FolderService, private itemService$: ItemService,private featureIconService$:FeatureIconService,private itemTypeService$:ItemTypeService) {
this._geojsonFormat = new GeoJSON(); this._geojsonFormat = new GeoJSON();
this._wktFormat = new WKT(); this._wktFormat = new WKT();
} }
} }

View File

@@ -1,3 +1,5 @@
import { IDataLayer } from '@farmmaps/common';
export interface IColor { export interface IColor {
red: number, red: number,
green: number, green: number,
@@ -26,6 +28,25 @@ export interface IHistogram {
confidence?: number; confidence?: number;
} }
export interface IStatistics {
min: number;
max: number;
mean: number;
stddev: number;
populationCount: number;
minPlus: number;
maxMinus: number;
mode: number;
median: number;
curtosis: number;
skewness: number;
variance: number;
variationCoefficient: number;
confidenceIntervalErrorMargin: number;
confidenceIntervalLow: number;
confidenceIntervalHigh: number;
}
export interface IGradientstop { export interface IGradientstop {
relativestop: number, relativestop: number,
color: IColor color: IColor
@@ -39,7 +60,8 @@ export interface IColorMap {
} }
export interface IBand { export interface IBand {
histogram: IHistogram histogram: IHistogram;
statistics: IStatistics;
} }
@@ -64,11 +86,9 @@ export interface IRenderoutputImage {
extent: [number,number,number,number] extent: [number,number,number,number]
} }
export interface ILayer { export interface ILayer extends IDataLayer {
name: string,
unit: string,
index: number,
scale: number,
renderer: IRenderer, renderer: IRenderer,
rendering: IRenderoutput rendering: IRenderoutput,
minzoom: number,
maxzoom: number
} }

View File

@@ -44,9 +44,10 @@ export interface State {
panelCollapsed: boolean, panelCollapsed: boolean,
selectedFeature: Feature, selectedFeature: Feature,
selectedItem:IItem, selectedItem:IItem,
parentItem:IItem,
clearEnabled: boolean, clearEnabled: boolean,
searchCollapsed: boolean, searchCollapsed: boolean,
searchMinified: boolean, searchMinified: boolean,
extent: number[], extent: number[],
baseLayers: Array<IItemLayer> baseLayers: Array<IItemLayer>
overlayLayers: Array<IItemLayer>, overlayLayers: Array<IItemLayer>,
@@ -56,8 +57,8 @@ export interface State {
selectedOverlayLayer: IItemLayer, selectedOverlayLayer: IItemLayer,
styles:IStyles, styles:IStyles,
showLayerSwitcher:boolean, showLayerSwitcher:boolean,
setStateCount:number,
inSearch:boolean, inSearch:boolean,
inZoom:boolean,
replaceUrl:boolean replaceUrl:boolean
} }
@@ -81,7 +82,8 @@ export const initialState: State = {
panelVisible: false, panelVisible: false,
panelCollapsed: false, panelCollapsed: false,
selectedFeature: null, selectedFeature: null,
selectedItem: null, selectedItem: null,
parentItem: null,
clearEnabled: false, clearEnabled: false,
searchCollapsed: true, searchCollapsed: true,
searchMinified:false, searchMinified:false,
@@ -94,12 +96,12 @@ export const initialState: State = {
selectedItemLayer: null, selectedItemLayer: null,
styles: {}, styles: {},
showLayerSwitcher: false, showLayerSwitcher: false,
setStateCount: 0,
inSearch:false, inSearch:false,
inZoom:false,
replaceUrl:true replaceUrl:true
} }
export function reducer(state = initialState, action: mapActions.Actions | commonActions.Actions | RouterNavigationAction): State { export function reducer(state = initialState, action: mapActions.Actions | commonActions.Actions | RouterNavigationAction): State {
switch (action.type) { switch (action.type) {
case ROUTER_NAVIGATION: { case ROUTER_NAVIGATION: {
let a = action as RouterNavigationAction; let a = action as RouterNavigationAction;
@@ -108,16 +110,16 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
case mapActions.SETMAPSTATE: { case mapActions.SETMAPSTATE: {
let a = action as mapActions.SetMapState; let a = action as mapActions.SetMapState;
return tassign(state, { return tassign(state, {
mapState: a.mapState,setStateCount: state.setStateCount+1 mapState: a.mapState
}); });
} }
case mapActions.SETQUERYSTATE: { case mapActions.SETQUERYSTATE: {
let a = action as mapActions.SetQueryState; let a = action as mapActions.SetQueryState;
return tassign(state, { queryState: tassign(a.queryState ),setStateCount: state.setStateCount+1,replaceUrl:a.replaceUrl}); return tassign(state, { queryState: tassign(a.queryState ),replaceUrl:a.replaceUrl});
} }
case mapActions.SETSTATE: { case mapActions.SETSTATE: {
let a = action as mapActions.SetState; let a = action as mapActions.SetState;
return tassign(state, { mapState: tassign(a.mapState), queryState: tassign(a.queryState),setStateCount: state.setStateCount+1}); return tassign(state, { mapState: tassign(a.mapState), queryState: tassign(a.queryState)});
} }
case mapActions.SETVIEWEXTENT: { case mapActions.SETVIEWEXTENT: {
let a = action as mapActions.SetViewExtent; let a = action as mapActions.SetViewExtent;
@@ -125,27 +127,33 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
} }
case mapActions.SETPARENT: { case mapActions.SETPARENT: {
let a = action as mapActions.SetParent; let a = action as mapActions.SetParent;
return tassign(state, { return tassign(state, {
parentCode : a.parentCode parentCode : a.parentCode
}); });
} }
case mapActions.STARTSEARCHSUCCESS: { case mapActions.STARTSEARCHSUCCESS: {
let a = action as mapActions.StartSearchSuccess; let a = action as mapActions.StartSearchSuccess;
return tassign(state, { return tassign(state, {
features: a.features, features: a.features,
inSearch:false inSearch:false
}); });
} }
case mapActions.SETFEATURES: {
let a = action as mapActions.SetFeatures;
return tassign(state, {
features: a.features
});
}
case mapActions.SELECTFEATURE: { case mapActions.SELECTFEATURE: {
let a = action as mapActions.SelectFeature; let a = action as mapActions.SelectFeature;
return tassign(state, { return tassign(state, {
selectedFeature: state.selectedItem?state.selectedFeature: a.feature selectedFeature: state.selectedItem?state.selectedFeature: a.feature
}); });
} }
case mapActions.SELECTITEM: { case mapActions.SELECTITEM: {
let a = action as mapActions.SelectItem; let a = action as mapActions.SelectItem;
let itemCode = state.selectedItem ? state.selectedItem.code : ""; let itemCode = state.selectedItem ? state.selectedItem.code : "";
let inSearch = (a.itemCode != itemCode || state.setStateCount == 1) let inSearch = a.itemCode != itemCode;
return tassign(state, { return tassign(state, {
selectedItem: null, selectedItem: null,
selectedItemLayer: null, selectedItemLayer: null,
@@ -155,17 +163,10 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
} }
case mapActions.SELECTITEMSUCCESS: { case mapActions.SELECTITEMSUCCESS: {
let a = action as mapActions.SelectItemSuccess; let a = action as mapActions.SelectItemSuccess;
var itemLayer = null;
if (a.item && "vnd.farmmaps.itemtype.layer,vnd.farmmaps.itemtype.shape.processed,vnd.farmmaps.itemtype.geotiff.processed".indexOf(a.item.itemType) >=0 ) {
itemLayer = new ItemLayer(a.item);
itemLayer.layerIndex = a.item.data.layers?a.item.data.layers[0].index:-1;
} else if (a.item && a.item.itemType == "vnd.farmmaps.itemtype.temporal") {
itemLayer = new TemporalItemLayer(a.item);
}
return tassign(state, { return tassign(state, {
inSearch:false, inSearch:false,
selectedItem: a.item, selectedItem: a.item,
selectedItemLayer: itemLayer, parentItem: a.parentItem,
panelVisible: a.item != null, panelVisible: a.item != null,
clearEnabled: a.item != null, clearEnabled: a.item != null,
searchCollapsed: false, searchCollapsed: false,
@@ -173,6 +174,20 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
queryState: tassign(state.queryState, {itemCode:a.item ? a.item.code:null}) queryState: tassign(state.queryState, {itemCode:a.item ? a.item.code:null})
}); });
} }
case mapActions.SETSELECTEDITEMLAYER: {
let a = action as mapActions.SetSelectedItemLayer;
var itemLayer = null;
if (a.item && "vnd.farmmaps.itemtype.layer,vnd.farmmaps.itemtype.shape.processed,vnd.farmmaps.itemtype.geotiff.processed".indexOf(a.item.itemType) >=0 ) {
itemLayer = new ItemLayer(a.item);
itemLayer.layerIndex = a.layerIndex>=0?a.layerIndex:a.item.data.layers?a.item.data.layers[0].index:-1;
} else if (a.item && a.item.itemType == "vnd.farmmaps.itemtype.temporal") {
itemLayer = new TemporalItemLayer(a.item);
}
return tassign(state, {
selectedItemLayer: itemLayer,
});
}
case mapActions.SELECTTEMPORALITEMSSUCCESS:{ case mapActions.SELECTTEMPORALITEMSSUCCESS:{
let a = action as mapActions.SelectTemporalItemsSuccess; let a = action as mapActions.SelectTemporalItemsSuccess;
let selectedItemLayer=tassign(state.selectedItemLayer) as TemporalItemLayer; let selectedItemLayer=tassign(state.selectedItemLayer) as TemporalItemLayer;
@@ -181,7 +196,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
if(a.temporalItems.length>0) { if(a.temporalItems.length>0) {
let item = a.temporalItems[a.temporalItems.length-1]; let item = a.temporalItems[a.temporalItems.length-1];
layerIndex = item.data.layers[0].index; layerIndex = item.data.layers[0].index;
selectedItemLayer.selectedItemLayer = new ItemLayer(item,1,true,layerIndex); selectedItemLayer.selectedItemLayer = new ItemLayer(item,1,true,layerIndex);
} else { } else {
selectedItemLayer.selectedItemLayer = null; selectedItemLayer.selectedItemLayer = null;
} }
@@ -189,9 +204,9 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
selectedItemLayer.nextItemLayer = null; selectedItemLayer.nextItemLayer = null;
if(selectedItemLayer.selectedItemLayer) { if(selectedItemLayer.selectedItemLayer) {
let layerIndex = selectedItemLayer.selectedItemLayer.item.data.layers[0].index; let layerIndex = selectedItemLayer.selectedItemLayer.item.data.layers[0].index;
selectedItemLayer.layerIndex = layerIndex; selectedItemLayer.layerIndex = layerIndex;
} }
return tassign(state,{selectedItemLayer:tassign(state.selectedItemLayer,selectedItemLayer as ItemLayer)}); return tassign(state,{selectedItemLayer:tassign(state.selectedItemLayer,selectedItemLayer as ItemLayer)});
} }
case mapActions.NEXTTEMPORAL: { case mapActions.NEXTTEMPORAL: {
@@ -234,11 +249,11 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
temporalLayer.nextItemLayer.opacity=0; temporalLayer.nextItemLayer.opacity=0;
temporalLayer.nextItemLayer.layerIndex = temporalLayer.layerIndex; temporalLayer.nextItemLayer.layerIndex = temporalLayer.layerIndex;
} }
temporalLayer.selectedItemLayer = temporalLayer.previousItemLayer; temporalLayer.selectedItemLayer = temporalLayer.previousItemLayer;
if( temporalLayer.selectedItemLayer) { if( temporalLayer.selectedItemLayer) {
temporalLayer.selectedItemLayer.opacity=1; temporalLayer.selectedItemLayer.opacity=1;
temporalLayer.selectedItemLayer.layerIndex = temporalLayer.layerIndex; temporalLayer.selectedItemLayer.layerIndex = temporalLayer.layerIndex;
} }
temporalLayer.previousItemLayer = index-2 >=0? new ItemLayer(temporalLayer.temporalItems[index-2],0,true,temporalLayer.layerIndex):null; temporalLayer.previousItemLayer = index-2 >=0? new ItemLayer(temporalLayer.temporalItems[index-2],0,true,temporalLayer.layerIndex):null;
if( temporalLayer.previousItemLayer) { if( temporalLayer.previousItemLayer) {
temporalLayer.previousItemLayer.opacity=0; temporalLayer.previousItemLayer.opacity=0;
@@ -289,7 +304,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
}); });
} }
case mapActions.UPDATEFEATURESUCCESS: { case mapActions.UPDATEFEATURESUCCESS: {
let a = action as mapActions.UpdateFeatureSuccess; let a = action as mapActions.UpdateFeatureSuccess;
let features: any[] = []; let features: any[] = [];
var index = -1; var index = -1;
for (var i = 0; i < state.features.length; i++) { for (var i = 0; i < state.features.length; i++) {
@@ -307,10 +322,13 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
case mapActions.COLLAPSESEARCH: { case mapActions.COLLAPSESEARCH: {
return tassign(state, { searchCollapsed: state.panelVisible ? false: true}); return tassign(state, { searchCollapsed: state.panelVisible ? false: true});
} }
case commonActions.CLOSEALL: {
return tassign(state, { searchCollapsed: state.panelVisible ? false: true,showLayerSwitcher:false});
}
case mapActions.SETEXTENT: { case mapActions.SETEXTENT: {
let a = action as mapActions.SetExtent; let a = action as mapActions.SetExtent;
return tassign(state, { extent: a.extent }); return tassign(state, { extent: a.extent });
} }
case mapActions.ADDLAYER: { case mapActions.ADDLAYER: {
let a = action as mapActions.AddLayer; let a = action as mapActions.AddLayer;
let itemLayers = state.overlayLayers.slice(0); let itemLayers = state.overlayLayers.slice(0);
@@ -323,7 +341,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
} else { } else {
return state; return state;
} }
} }
case mapActions.REMOVELAYER: { case mapActions.REMOVELAYER: {
let a = action as mapActions.RemoveLayer; let a = action as mapActions.RemoveLayer;
@@ -337,6 +355,9 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
newLayers.splice(i, 1); newLayers.splice(i, 1);
return tassign(state, { overlayLayers: newLayers, selectedOverlayLayer: selectedOverlayLayer }); return tassign(state, { overlayLayers: newLayers, selectedOverlayLayer: selectedOverlayLayer });
} }
case mapActions.CLEARLAYERS: {
return tassign(state, {overlayLayers: [], selectedOverlayLayer: null});
}
case mapActions.SETVISIBILITY: { case mapActions.SETVISIBILITY: {
let a = action as mapActions.SetVisibility; let a = action as mapActions.SetVisibility;
let newLayers = state.overlayLayers.slice(0); let newLayers = state.overlayLayers.slice(0);
@@ -353,7 +374,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
} }
case mapActions.SETLAYERINDEX: { case mapActions.SETLAYERINDEX: {
let a = action as mapActions.SetLayerIndex; let a = action as mapActions.SetLayerIndex;
if (a.itemLayer == null) { if (a.itemLayer == null) {
if(state.selectedItemLayer.item.itemType == "vnd.farmmaps.itemtype.temporal") { if(state.selectedItemLayer.item.itemType == "vnd.farmmaps.itemtype.temporal") {
var newItemlayer = tassign(state.selectedItemLayer,{layerIndex:a.layerIndex}); var newItemlayer = tassign(state.selectedItemLayer,{layerIndex:a.layerIndex});
let tl = newItemlayer as ITemporalItemLayer; let tl = newItemlayer as ITemporalItemLayer;
@@ -381,7 +402,7 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
} else { } else {
var newItemlayer = new ItemLayer(state.selectedItemLayer.item); var newItemlayer = new ItemLayer(state.selectedItemLayer.item);
newItemlayer.layerIndex = a.layerIndex; newItemlayer.layerIndex = a.layerIndex;
} }
return tassign(state, { selectedItemLayer: newItemlayer}) return tassign(state, { selectedItemLayer: newItemlayer})
} else { } else {
@@ -401,9 +422,13 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
} }
var selectedBaseLayer: IItemLayer = null; var selectedBaseLayer: IItemLayer = null;
var mapState = tassign(state.mapState); var mapState = tassign(state.mapState);
let sb = baseLayers.filter(layer => layer.item.code === mapState.baseLayerCode)[0]; let sb = baseLayers.filter(layer => layer.item.code === mapState.baseLayerCode);
if (baseLayers.length > 0 && mapState.baseLayerCode != "" && sb) { let db = baseLayers.filter(layer => layer.item.data && layer.item.data.default === true);
selectedBaseLayer = sb; if (baseLayers.length > 0 && mapState.baseLayerCode != "" && sb.length>0) {
selectedBaseLayer = sb[0];
selectedBaseLayer.visible = true;
} else if (baseLayers.length >0 && db.length>0){
selectedBaseLayer = db[0];
selectedBaseLayer.visible = true; selectedBaseLayer.visible = true;
} else if (baseLayers.length > 0) { } else if (baseLayers.length > 0) {
selectedBaseLayer = baseLayers[0]; selectedBaseLayer = baseLayers[0];
@@ -426,27 +451,24 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
let a = action as mapActions.SelectOverlayLayer; let a = action as mapActions.SelectOverlayLayer;
return tassign(state, { selectedOverlayLayer: a.itemLayer }); return tassign(state, { selectedOverlayLayer: a.itemLayer });
} }
case commonActions.ESCAPE: {
let a = action as commonActions.Escape; case mapActions.CLEAR: {
let newQueryState = tassign(state.queryState, { query: null, tags: null, itemCode: null, parentCode: null, itemType: null }); let newQueryState = tassign(state.queryState, { query: null, tags: null, itemCode: null, parentCode: null, itemType: null });
if (a.escapeKey) { return tassign(state, {
return tassign(state, { panelVisible: false,
panelVisible: false, panelCollapsed:false,
panelCollapsed:false, selectedItem: null,
selectedItem: null, selectedItemLayer: null,
selectedItemLayer: null, selectedFeature: null,
selectedFeature: null, queryState: newQueryState,
queryState: newQueryState, clearEnabled: false,
clearEnabled: false, searchCollapsed: true,
searchCollapsed: true, searchMinified: false,
searchMinified: false, features: [],
features: [], query:initialState.query,
query:initialState.query, showLayerSwitcher: false,
showLayerSwitcher: false extent: null
}); });
} else {
return tassign(state, {});
}
} }
case mapActions.SETSTYLE:{ case mapActions.SETSTYLE:{
let a = action as mapActions.SetStyle; let a = action as mapActions.SetStyle;
@@ -457,14 +479,11 @@ export function reducer(state = initialState, action: mapActions.Actions | commo
case mapActions.SHOWLAYERSWITCHER:{ case mapActions.SHOWLAYERSWITCHER:{
let a = action as mapActions.ShowLayerSwitcher; let a = action as mapActions.ShowLayerSwitcher;
return tassign(state,{showLayerSwitcher:a.show}); return tassign(state,{showLayerSwitcher:a.show});
} }
case mapActions.SETREPLACEURL: { case mapActions.SETREPLACEURL: {
let a= action as mapActions.SetReplaceUrl; let a= action as mapActions.SetReplaceUrl;
return tassign(state,{replaceUrl:a.replaceUrl}); return tassign(state,{replaceUrl:a.replaceUrl});
} }
case mapActions.CLEAR: {
return tassign(state,{setStateCount:0});
}
default: { default: {
return state; return state;
} }
@@ -478,6 +497,7 @@ export const getPanelVisible = (state: State) => state.panelVisible;
export const getPanelCollapsed = (state: State) => state.panelCollapsed; export const getPanelCollapsed = (state: State) => state.panelCollapsed;
export const getSelectedFeature = (state: State) => state.selectedFeature; export const getSelectedFeature = (state: State) => state.selectedFeature;
export const getSelectedItem = (state: State) => state.selectedItem; export const getSelectedItem = (state: State) => state.selectedItem;
export const getParentItem = (state: State) => state.parentItem;
export const getQueryState = (state: State) => state.queryState; export const getQueryState = (state: State) => state.queryState;
export const getClearEnabled = (state: State) => state.clearEnabled; export const getClearEnabled = (state: State) => state.clearEnabled;
export const getSearchCollapsed = (state: State) => state.searchCollapsed; export const getSearchCollapsed = (state: State) => state.searchCollapsed;
@@ -493,9 +513,8 @@ export const getSelectedItemLayer = (state: State) => state.selectedItemLayer;
export const getPeriod = (state:State) => state.period; export const getPeriod = (state:State) => state.period;
export const getStyles = (state:State) => state.styles; export const getStyles = (state:State) => state.styles;
export const getShowLayerSwitcher = (state:State) => state.showLayerSwitcher; export const getShowLayerSwitcher = (state:State) => state.showLayerSwitcher;
export const getSetStateCount = (state:State) => state.setStateCount;
export const getInSearch = (state:State) => state.inSearch; export const getInSearch = (state:State) => state.inSearch;
export const getState = (state:State) => {return {mapState:state.mapState,queryState:state.queryState,setStateCount:state.setStateCount,replaceUrl:state.replaceUrl};} export const getState = (state:State) => {return {mapState:state.mapState,queryState:state.queryState,replaceUrl:state.replaceUrl};}
export const selectMapState = createFeatureSelector<State>(MODULE_NAME); export const selectMapState = createFeatureSelector<State>(MODULE_NAME);
export const selectGetMapState= createSelector(selectMapState, getMapState); export const selectGetMapState= createSelector(selectMapState, getMapState);
@@ -505,6 +524,7 @@ export const selectGetPanelVisible = createSelector(selectMapState, getPanelVisi
export const selectGetPanelCollapsed = createSelector(selectMapState, getPanelCollapsed); export const selectGetPanelCollapsed = createSelector(selectMapState, getPanelCollapsed);
export const selectGetSelectedFeature = createSelector(selectMapState, getSelectedFeature); export const selectGetSelectedFeature = createSelector(selectMapState, getSelectedFeature);
export const selectGetSelectedItem = createSelector(selectMapState, getSelectedItem); export const selectGetSelectedItem = createSelector(selectMapState, getSelectedItem);
export const selectGetParentItem = createSelector(selectMapState, getParentItem);
export const selectGetQueryState = createSelector(selectMapState, getQueryState); export const selectGetQueryState = createSelector(selectMapState, getQueryState);
export const selectGetClearEnabled = createSelector(selectMapState, getClearEnabled); export const selectGetClearEnabled = createSelector(selectMapState, getClearEnabled);
export const selectGetSearchCollapsed = createSelector(selectMapState, getSearchCollapsed); export const selectGetSearchCollapsed = createSelector(selectMapState, getSearchCollapsed);
@@ -515,12 +535,11 @@ export const selectGetBaseLayers = createSelector(selectMapState, getBaseLayers)
export const selectGetProjection = createSelector(selectMapState, getProjection); export const selectGetProjection = createSelector(selectMapState, getProjection);
export const selectGetSelectedBaseLayer = createSelector(selectMapState, getSelectedBaseLayer); export const selectGetSelectedBaseLayer = createSelector(selectMapState, getSelectedBaseLayer);
export const selectGetSelectedOverlayLayer = createSelector(selectMapState, getSelectedOverlayLayer); export const selectGetSelectedOverlayLayer = createSelector(selectMapState, getSelectedOverlayLayer);
export const selectGetQuery = createSelector(selectMapState, getQuery); export const selectGetQuery = createSelector(selectMapState, getQuery);
export const selectGetSelectedItemLayer = createSelector(selectMapState, getSelectedItemLayer); export const selectGetSelectedItemLayer = createSelector(selectMapState, getSelectedItemLayer);
export const selectGetPeriod = createSelector(selectMapState, getPeriod); export const selectGetPeriod = createSelector(selectMapState, getPeriod);
export const selectGetStyles = createSelector(selectMapState, getStyles); export const selectGetStyles = createSelector(selectMapState, getStyles);
export const selectGetShowLayerSwitcher = createSelector(selectMapState,getShowLayerSwitcher); export const selectGetShowLayerSwitcher = createSelector(selectMapState,getShowLayerSwitcher);
export const selectgetSetStateCount = createSelector(selectMapState,getSetStateCount);
export const selectGetInSearch = createSelector(selectMapState,getInSearch); export const selectGetInSearch = createSelector(selectMapState,getInSearch);
export const selectGetState = createSelector(selectMapState,getState); export const selectGetState = createSelector(selectMapState,getState);

View File

@@ -0,0 +1,24 @@
# CommonMap3d
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.3.
## Code scaffolding
Run `ng generate component component-name --project common-map3d` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project common-map3d`.
> Note: Don't forget to add `--project common-map3d` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build common-map3d` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build common-map3d`, go to the dist folder `cd dist/common-map3d` and run `npm publish`.
## Running unit tests
Run `ng test common-map3d` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -0,0 +1,32 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage/common-map3d'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};

View File

@@ -0,0 +1,7 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/common-map3d",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -0,0 +1,17 @@
{
"name": "@farmmaps/common-map3d",
"version": "0.0.1",
"publishConfig": {
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
},
"peerDependencies": {
"@angular/common": "^10.1.3",
"@angular/core": "^10.1.3",
"ngx-openlayers": "1.0.0-next.16",
"cesium": "^1.73.0",
"ol-cesium": "^2.11.3"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

Some files were not shown because too many files have changed in this diff Show More