@kalisio/kdk 2.5.2 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/main.yaml +35 -6
- package/client.globe.js +8 -0
- package/client.js +8 -0
- package/client.map.js +8 -0
- package/core/api/hooks/hooks.push.js +3 -2
- package/core/api/hooks/hooks.tags.js +56 -0
- package/core/api/models/tags.model.mongodb.js +8 -0
- package/core/api/services/index.js +33 -2
- package/core/api/services/tags/tags.hooks.js +47 -0
- package/core/client/api.js +5 -5
- package/core/client/components/KActivity.vue +3 -2
- package/core/client/components/KChip.vue +2 -2
- package/core/client/components/KEditor.vue +3 -1
- package/core/client/components/KFollower.vue +4 -4
- package/core/client/components/KStore.vue +1 -1
- package/core/client/components/KTab.vue +20 -7
- package/core/client/components/account/KProfile.vue +9 -25
- package/core/client/components/action/KAction.vue +10 -10
- package/core/client/components/action/KToggleFullscreenAction.vue +2 -11
- package/core/client/components/app/KHome.vue +3 -2
- package/core/client/components/collection/KFilter.vue +5 -4
- package/core/client/components/collection/KGrid.vue +5 -1
- package/core/client/components/collection/KItemsFilter.vue +47 -0
- package/core/client/components/collection/KItemsSorter.vue +42 -0
- package/core/client/components/collection/KScrollDown.vue +2 -2
- package/core/client/components/collection/KSearchFilterControl.vue +3 -2
- package/core/client/components/collection/KSorter.vue +33 -37
- package/core/client/components/collection/KTagsFilterControl.vue +14 -40
- package/core/client/components/collection/KTagsFilterView.vue +10 -45
- package/core/client/components/collection/KTimeFilterControl.vue +6 -7
- package/core/client/components/collection/KTimeFilterView.vue +13 -22
- package/core/client/components/collection/KTimeLine.vue +18 -9
- package/core/client/components/form/KColorField.vue +13 -6
- package/core/client/components/form/KColorScaleField.vue +7 -12
- package/core/client/components/form/KFileField.vue +118 -89
- package/core/client/components/form/KForm.vue +30 -18
- package/core/client/components/form/KIconField.vue +4 -1
- package/core/client/components/form/KNumberField.vue +9 -2
- package/core/client/components/form/KSelectField.vue +1 -4
- package/core/client/components/form/KTagField.vue +229 -0
- package/core/client/components/form/KTextField.vue +4 -0
- package/core/client/components/form/KTextareaField.vue +3 -1
- package/core/client/components/input/KShapePicker.vue +5 -5
- package/core/client/components/layout/KFab.vue +32 -20
- package/core/client/components/layout/KPage.vue +11 -6
- package/core/client/components/layout/KWindow.vue +5 -0
- package/core/client/components/media/index.js +2 -6
- package/core/client/components/menu/KMenu.vue +12 -10
- package/core/client/components/menu/KSubMenu.vue +12 -12
- package/core/client/components/messages/KMessageCard.vue +13 -12
- package/core/client/components/messages/KMessageComposer.vue +13 -9
- package/core/client/components/messages/KMessagesTimeLine.vue +16 -8
- package/core/client/components/tags/KTagFilter.vue +99 -0
- package/core/client/components/tags/KTagItem.vue +65 -0
- package/core/client/components/tags/KTagManager.vue +198 -0
- package/core/client/components/tags/KTagSelection.vue +82 -0
- package/core/client/components/time/KDate.vue +3 -17
- package/core/client/components/time/KDateTime.vue +1 -1
- package/core/client/components/time/KTime.vue +0 -4
- package/core/client/composables/collection-filter.js +41 -2
- package/core/client/composables/collection.js +3 -3
- package/core/client/composables/index.js +1 -0
- package/core/client/composables/pwa.js +13 -0
- package/core/client/composables/session.js +7 -8
- package/core/client/composables/user.js +36 -0
- package/core/client/directives/index.js +1 -0
- package/core/client/directives/v-drop-file.js +174 -0
- package/core/client/document.js +2 -1
- package/core/client/exporter.js +17 -3
- package/core/client/i18n/core_en.json +34 -7
- package/core/client/i18n/core_fr.json +36 -9
- package/core/client/i18n.js +26 -11
- package/core/client/layout.js +5 -5
- package/core/client/mixins/mixin.base-activity.js +8 -5
- package/core/client/mixins/mixin.base-editor.js +2 -1
- package/core/client/mixins/mixin.base-field.js +3 -2
- package/core/client/mixins/mixin.base-item.js +12 -10
- package/core/client/mixins/mixin.service.js +3 -1
- package/core/client/platform.js +0 -3
- package/core/client/readers/reader.json.js +2 -2
- package/core/client/utils/index.js +2 -0
- package/core/client/utils/utils.collection.js +6 -6
- package/core/client/utils/utils.colors.js +46 -19
- package/core/client/utils/utils.files.js +19 -0
- package/core/client/utils/utils.locale.js +13 -17
- package/core/client/utils/utils.services.js +27 -0
- package/core/client/utils/utils.shapes.js +2 -2
- package/core/client/utils/utils.tags.js +17 -0
- package/core/client/utils/utils.tours.js +31 -0
- package/core/common/permissions.js +3 -0
- package/core/common/schemas/tags.update.json +35 -0
- package/core/common/schemas/users.update-profile.json +1 -1
- package/core/common/utils.js +5 -5
- package/extras/configs/panes.top.js +11 -0
- package/extras/configs/stickies.js +1 -1
- package/extras/configs/widgets.left.js +13 -1
- package/extras/libs/jsts.min.js +8 -0
- package/{test/client/core/account.js → extras/tests/core/account.mjs} +4 -4
- package/extras/tests/core/api.mjs +114 -0
- package/{test/client/core/collection.js → extras/tests/core/collection.mjs} +8 -8
- package/{test/client/core/dialogs.js → extras/tests/core/dialogs.mjs} +1 -1
- package/extras/tests/core/index.mjs +9 -0
- package/{test/client/core/layout.js → extras/tests/core/layout.mjs} +7 -3
- package/{test/client/core/runner.js → extras/tests/core/runner.mjs} +3 -3
- package/{test/client/core/screens.js → extras/tests/core/screens.mjs} +1 -1
- package/{test/client/core/utils.js → extras/tests/core/utils.mjs} +79 -26
- package/extras/tests/index.mjs +4 -0
- package/{test/client/map/api.js → extras/tests/map/api.mjs} +1 -1
- package/{test/client/map/catalog.js → extras/tests/map/catalog.mjs} +18 -18
- package/{test/client/map/controls.js → extras/tests/map/controls.mjs} +3 -3
- package/extras/tests/map/index.mjs +5 -0
- package/{test/client/map/time.js → extras/tests/map/time.mjs} +3 -3
- package/{test/client/map/utils.js → extras/tests/map/utils.mjs} +6 -5
- package/extras/tours/fab.js +36 -0
- package/extras/tours/layout.js +49 -0
- package/extras/tours/pane.left.js +78 -0
- package/extras/tours/pane.right.js +145 -0
- package/extras/tours/pane.top.js +239 -0
- package/map/api/config/layers.cjs +28 -13
- package/map/api/hooks/hooks.query.js +12 -7
- package/map/api/models/catalog.model.mongodb.js +17 -6
- package/map/api/services/catalog/catalog.hooks.js +1 -1
- package/map/api/services/index.js +18 -1
- package/map/api/services/styles/styles.hooks.js +1 -1
- package/map/client/cesium/utils/utils.cesium.js +25 -65
- package/map/client/cesium/utils/utils.features.js +1 -0
- package/map/client/cesium/utils/utils.geojson.js +1 -0
- package/map/client/cesium/utils/utils.style.js +7 -6
- package/map/client/components/KFeatureEditor.vue +3 -3
- package/map/client/components/KFeaturesChart.vue +4 -4
- package/map/client/components/KFeaturesFilterEditor.vue +19 -13
- package/map/client/components/KFeaturesFilterManager.vue +7 -4
- package/map/client/components/KFeaturesTable.vue +2 -2
- package/map/client/components/KLayerEditor.vue +10 -6
- package/map/client/components/KMeasureTool.vue +2 -1
- package/map/client/components/catalog/KBaseLayersSelector.vue +1 -1
- package/map/client/components/catalog/KCategoryItem.vue +15 -1
- package/map/client/components/catalog/KConnectLayer.vue +2 -2
- package/map/client/components/catalog/KCreateView.vue +3 -2
- package/map/client/components/catalog/KFilteredLayerItem.vue +26 -6
- package/map/client/components/catalog/KImportLayer.vue +6 -3
- package/map/client/components/catalog/KLayerCategories.vue +8 -6
- package/map/client/components/catalog/KLayerItem.vue +12 -2
- package/map/client/components/catalog/KLayersList.vue +180 -0
- package/map/client/components/catalog/KLayersPanel.vue +146 -36
- package/map/client/components/catalog/KLayersSelector.vue +96 -48
- package/map/client/components/catalog/KProjectEditor.vue +0 -9
- package/map/client/components/catalog/KProjectSelector.vue +3 -2
- package/map/client/components/catalog/KProjectsPanel.vue +23 -8
- package/map/client/components/catalog/KViewsPanel.vue +18 -8
- package/map/client/components/catalog/KWeatherLayersSelector.vue +3 -3
- package/map/client/components/form/KDirectionField.vue +3 -6
- package/map/client/components/form/KLayerCategoryField.vue +2 -2
- package/map/client/components/form/KOwsServiceField.vue +25 -24
- package/map/client/components/form/KSelectLayersField.vue +4 -4
- package/map/client/components/form/KSelectViewsField.vue +4 -4
- package/map/client/components/legend/KLayerLegend.vue +11 -2
- package/map/client/components/legend/KLegend.vue +44 -51
- package/map/client/components/location/KLocationCardSection.vue +6 -7
- package/map/client/components/location/KLocationMap.vue +23 -13
- package/map/client/components/stickies/KLevelSlider.vue +10 -8
- package/map/client/components/stickies/KPosition.vue +5 -0
- package/map/client/components/styles/KLayerStyleAction.vue +59 -12
- package/map/client/components/styles/KStyleEditor.vue +72 -9
- package/map/client/components/styles/KStyleEditorSection.vue +82 -33
- package/map/client/components/styles/KStyleManager.vue +126 -60
- package/map/client/components/styles/KStylePreview.vue +9 -25
- package/map/client/components/styles/KStylePreviewItem.vue +22 -1
- package/map/client/components/tools/KSearchTool.vue +1 -1
- package/map/client/components/widget/KElevationProfile.vue +20 -17
- package/map/client/components/widget/KInformationBox.vue +5 -5
- package/map/client/components/widget/KMapillaryViewer.vue +2 -1
- package/map/client/components/widget/KTimeSeries.vue +11 -9
- package/map/client/composables/highlight.js +5 -1
- package/map/client/globe.js +2 -0
- package/map/client/i18n/map_en.json +33 -8
- package/map/client/i18n/map_fr.json +33 -8
- package/map/client/leaflet/GradientPath.js +61 -24
- package/map/client/leaflet/ShapeMarker.js +12 -5
- package/map/client/leaflet/TiledMeshLayer.js +3 -3
- package/map/client/leaflet/utils/utils.geojson.js +66 -8
- package/map/client/leaflet/utils/utils.style.js +14 -15
- package/map/client/mixins/globe/mixin.base-globe.js +181 -34
- package/map/client/mixins/globe/mixin.file-layers.js +3 -0
- package/map/client/mixins/globe/mixin.geojson-layers.js +190 -36
- package/map/client/mixins/globe/mixin.opendap-layers.js +2 -1
- package/map/client/mixins/globe/mixin.style.js +23 -1
- package/map/client/mixins/globe/mixin.tooltip.js +14 -2
- package/map/client/mixins/map/mixin.base-map.js +146 -58
- package/map/client/mixins/map/mixin.edit-layers.js +18 -15
- package/map/client/mixins/map/mixin.geojson-layers.js +181 -106
- package/map/client/mixins/map/mixin.heatmap-layers.js +3 -2
- package/map/client/mixins/map/mixin.map-activity.js +6 -1
- package/map/client/mixins/map/mixin.mapillary-layers.js +2 -1
- package/map/client/mixins/map/mixin.pmtiles-layers.js +3 -3
- package/map/client/mixins/map/mixin.tiled-mesh-layers.js +3 -2
- package/map/client/mixins/map/mixin.tiled-wind-layers.js +3 -2
- package/map/client/mixins/mixin.activity.js +203 -48
- package/map/client/mixins/mixin.context.js +11 -11
- package/map/client/mixins/mixin.feature-service.js +11 -9
- package/map/client/mixins/mixin.weacast.js +5 -3
- package/map/client/readers/reader.geojson.js +3 -1
- package/map/client/utils/utils.capture.js +3 -3
- package/map/client/utils/utils.catalog.js +9 -5
- package/map/client/utils/utils.features.js +120 -54
- package/map/client/utils/utils.js +25 -10
- package/map/client/utils/utils.layers.js +148 -26
- package/map/client/utils/utils.location.js +26 -9
- package/map/client/utils/utils.schema.js +2 -1
- package/map/client/utils/utils.style.js +53 -9
- package/map/common/geotiff-grid-source.js +1 -3
- package/map/common/opendap-utils.js +0 -1
- package/map/common/tms-utils.js +0 -1
- package/map/common/wcs-utils.js +0 -1
- package/map/common/wfs-utils.js +0 -1
- package/map/common/wms-utils.js +7 -1
- package/map/common/wmts-utils.js +0 -1
- package/package.json +12 -12
- package/scripts/init_runner.sh +3 -3
- package/scripts/kash/CHANGELOG.md +27 -0
- package/scripts/kash/kash.sh +556 -237
- package/scripts/kash/scripts/run_tests.sh +44 -5
- package/scripts/setup_workspace.sh +23 -13
- package/test/api/core/config/default.cjs +2 -1
- package/test/api/core/push.test.js +1 -1
- package/test/api/core/tags.test.js +62 -0
- package/test/api/map/config/default.cjs +2 -1
- package/test/api/map/config/layers.json +9 -0
- package/test/api/map/data/openradiation.json +13811 -0
- package/test/api/map/grid-sources.test.js +1 -3
- package/test/api/map/index.test.js +60 -1
- package/test/api/map/style.test.js +30 -1
- package/test.api.js +1 -1
- package/vite/App.vue +18 -0
- package/vite/AppWithGlobe.vue +84 -0
- package/vite/GlobeActivity.vue +58 -0
- package/vite/MapActivity.vue +63 -0
- package/vite/MapActivityWithGlobe.vue +63 -0
- package/vite/README.md +169 -0
- package/vite/config.js +221 -0
- package/vite/index_with_globe.html +50 -0
- package/vite/index_with_map.html +50 -0
- package/vite/package.json +173 -0
- package/vite/quasar.variables.scss +17 -0
- package/vite/vite.config.js +166 -0
- package/vite/yarn.lock +11641 -0
- package/core/client/components/media/KImageViewer.vue +0 -68
- package/core/client/components/media/KMarkdownViewer.vue +0 -55
- package/core/client/components/media/KMediaBrowser.vue +0 -301
- package/coverage/base.css +0 -224
- package/coverage/block-navigation.js +0 -87
- package/coverage/core/api/application.js.html +0 -1870
- package/coverage/core/api/authentication.js.html +0 -874
- package/coverage/core/api/db.js.html +0 -793
- package/coverage/core/api/hooks/hooks.authentication.js.html +0 -139
- package/coverage/core/api/hooks/hooks.authorisations.js.html +0 -955
- package/coverage/core/api/hooks/hooks.groups.js.html +0 -229
- package/coverage/core/api/hooks/hooks.logger.js.html +0 -163
- package/coverage/core/api/hooks/hooks.model.js.html +0 -955
- package/coverage/core/api/hooks/hooks.organisations.js.html +0 -541
- package/coverage/core/api/hooks/hooks.push.js.html +0 -265
- package/coverage/core/api/hooks/hooks.query.js.html +0 -862
- package/coverage/core/api/hooks/hooks.schemas.js.html +0 -298
- package/coverage/core/api/hooks/hooks.service.js.html +0 -319
- package/coverage/core/api/hooks/hooks.storage.js.html +0 -193
- package/coverage/core/api/hooks/hooks.users.js.html +0 -595
- package/coverage/core/api/hooks/index.html +0 -266
- package/coverage/core/api/hooks/index.js.html +0 -115
- package/coverage/core/api/index.html +0 -176
- package/coverage/core/api/index.js.html +0 -148
- package/coverage/core/api/marshall.js.html +0 -448
- package/coverage/core/api/models/groups.model.mongodb.js.html +0 -109
- package/coverage/core/api/models/index.html +0 -131
- package/coverage/core/api/models/messages.model.mongodb.js.html +0 -121
- package/coverage/core/api/models/organisations.model.mongodb.js.html +0 -94
- package/coverage/core/api/models/tags.model.mongodb.js.html +0 -115
- package/coverage/core/api/models/users.model.mongodb.js.html +0 -115
- package/coverage/core/api/services/account/account.hooks.js.html +0 -208
- package/coverage/core/api/services/account/account.service.js.html +0 -436
- package/coverage/core/api/services/account/index.html +0 -131
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +0 -184
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +0 -532
- package/coverage/core/api/services/authorisations/index.html +0 -131
- package/coverage/core/api/services/databases/databases.hooks.js.html +0 -193
- package/coverage/core/api/services/databases/databases.service.js.html +0 -100
- package/coverage/core/api/services/databases/index.html +0 -131
- package/coverage/core/api/services/groups/groups.hooks.js.html +0 -178
- package/coverage/core/api/services/groups/index.html +0 -116
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +0 -184
- package/coverage/core/api/services/import-export/import-export.service.js.html +0 -118
- package/coverage/core/api/services/import-export/index.html +0 -131
- package/coverage/core/api/services/index.html +0 -116
- package/coverage/core/api/services/index.js.html +0 -520
- package/coverage/core/api/services/mailer/index.html +0 -131
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +0 -190
- package/coverage/core/api/services/mailer/mailer.service.js.html +0 -118
- package/coverage/core/api/services/messages/index.html +0 -116
- package/coverage/core/api/services/messages/messages.hooks.js.html +0 -199
- package/coverage/core/api/services/organisations/index.html +0 -131
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +0 -178
- package/coverage/core/api/services/organisations/organisations.service.js.html +0 -343
- package/coverage/core/api/services/push/index.html +0 -131
- package/coverage/core/api/services/push/push.hooks.js.html +0 -190
- package/coverage/core/api/services/push/push.service.js.html +0 -121
- package/coverage/core/api/services/storage/index.html +0 -131
- package/coverage/core/api/services/storage/storage.hooks.js.html +0 -190
- package/coverage/core/api/services/storage/storage.service.js.html +0 -172
- package/coverage/core/api/services/tags/index.html +0 -116
- package/coverage/core/api/services/tags/tags.hooks.js.html +0 -178
- package/coverage/core/api/services/users/index.html +0 -131
- package/coverage/core/api/services/users/users.hooks.js.html +0 -307
- package/coverage/core/api/services/users/users.service.js.html +0 -100
- package/coverage/core/api/utils.js.html +0 -118
- package/coverage/core/common/errors.js.html +0 -88
- package/coverage/core/common/index.html +0 -191
- package/coverage/core/common/index.js.html +0 -115
- package/coverage/core/common/permissions.js.html +0 -733
- package/coverage/core/common/schema.js.html +0 -190
- package/coverage/core/common/utils.js.html +0 -226
- package/coverage/core/common/utils.offline.js.html +0 -199
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +0 -461
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/core/api/application.js.html +0 -1870
- package/coverage/lcov-report/core/api/authentication.js.html +0 -874
- package/coverage/lcov-report/core/api/db.js.html +0 -793
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +0 -139
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +0 -955
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +0 -229
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +0 -163
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +0 -955
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +0 -541
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +0 -265
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +0 -862
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +0 -298
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +0 -319
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +0 -193
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +0 -595
- package/coverage/lcov-report/core/api/hooks/index.html +0 -266
- package/coverage/lcov-report/core/api/hooks/index.js.html +0 -115
- package/coverage/lcov-report/core/api/index.html +0 -176
- package/coverage/lcov-report/core/api/index.js.html +0 -148
- package/coverage/lcov-report/core/api/marshall.js.html +0 -448
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +0 -109
- package/coverage/lcov-report/core/api/models/index.html +0 -131
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +0 -121
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +0 -94
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +0 -115
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +0 -115
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +0 -208
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +0 -436
- package/coverage/lcov-report/core/api/services/account/index.html +0 -131
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +0 -184
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +0 -532
- package/coverage/lcov-report/core/api/services/authorisations/index.html +0 -131
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +0 -193
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +0 -100
- package/coverage/lcov-report/core/api/services/databases/index.html +0 -131
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +0 -178
- package/coverage/lcov-report/core/api/services/groups/index.html +0 -116
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +0 -184
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +0 -118
- package/coverage/lcov-report/core/api/services/import-export/index.html +0 -131
- package/coverage/lcov-report/core/api/services/index.html +0 -116
- package/coverage/lcov-report/core/api/services/index.js.html +0 -520
- package/coverage/lcov-report/core/api/services/mailer/index.html +0 -131
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +0 -190
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +0 -118
- package/coverage/lcov-report/core/api/services/messages/index.html +0 -116
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +0 -199
- package/coverage/lcov-report/core/api/services/organisations/index.html +0 -131
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +0 -178
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +0 -343
- package/coverage/lcov-report/core/api/services/push/index.html +0 -131
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +0 -190
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +0 -121
- package/coverage/lcov-report/core/api/services/storage/index.html +0 -131
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +0 -190
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +0 -172
- package/coverage/lcov-report/core/api/services/tags/index.html +0 -116
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +0 -178
- package/coverage/lcov-report/core/api/services/users/index.html +0 -131
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +0 -307
- package/coverage/lcov-report/core/api/services/users/users.service.js.html +0 -100
- package/coverage/lcov-report/core/api/utils.js.html +0 -118
- package/coverage/lcov-report/core/common/errors.js.html +0 -88
- package/coverage/lcov-report/core/common/index.html +0 -191
- package/coverage/lcov-report/core/common/index.js.html +0 -115
- package/coverage/lcov-report/core/common/permissions.js.html +0 -733
- package/coverage/lcov-report/core/common/schema.js.html +0 -190
- package/coverage/lcov-report/core/common/utils.js.html +0 -226
- package/coverage/lcov-report/core/common/utils.offline.js.html +0 -199
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -461
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +0 -463
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +0 -397
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +0 -1309
- package/coverage/lcov-report/map/api/hooks/index.html +0 -161
- package/coverage/lcov-report/map/api/hooks/index.js.html +0 -94
- package/coverage/lcov-report/map/api/index.html +0 -131
- package/coverage/lcov-report/map/api/index.js.html +0 -139
- package/coverage/lcov-report/map/api/marshall.js.html +0 -178
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +0 -106
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +0 -127
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +0 -196
- package/coverage/lcov-report/map/api/models/index.html +0 -161
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +0 -109
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +0 -274
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +0 -610
- package/coverage/lcov-report/map/api/services/alerts/index.html +0 -131
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +0 -313
- package/coverage/lcov-report/map/api/services/catalog/index.html +0 -116
- package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +0 -1510
- package/coverage/lcov-report/map/api/services/daptiles/index.html +0 -116
- package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +0 -310
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +0 -544
- package/coverage/lcov-report/map/api/services/features/index.html +0 -131
- package/coverage/lcov-report/map/api/services/index.html +0 -116
- package/coverage/lcov-report/map/api/services/index.js.html +0 -946
- package/coverage/lcov-report/map/api/services/projects/index.html +0 -116
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +0 -439
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +0 -466
- package/coverage/lcov-report/map/common/errors.js.html +0 -94
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +0 -544
- package/coverage/lcov-report/map/common/grid.js.html +0 -1612
- package/coverage/lcov-report/map/common/index.html +0 -371
- package/coverage/lcov-report/map/common/index.js.html +0 -172
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +0 -556
- package/coverage/lcov-report/map/common/moment-utils.js.html +0 -157
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +0 -868
- package/coverage/lcov-report/map/common/opendap-utils.js.html +0 -826
- package/coverage/lcov-report/map/common/permissions.js.html +0 -124
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +0 -418
- package/coverage/lcov-report/map/common/tms-utils.js.html +0 -274
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +0 -364
- package/coverage/lcov-report/map/common/wcs-utils.js.html +0 -586
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +0 -1033
- package/coverage/lcov-report/map/common/wfs-utils.js.html +0 -574
- package/coverage/lcov-report/map/common/wms-utils.js.html +0 -451
- package/coverage/lcov-report/map/common/wmts-utils.js.html +0 -547
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov.info +0 -10392
- package/coverage/map/api/hooks/hooks.catalog.js.html +0 -463
- package/coverage/map/api/hooks/hooks.features.js.html +0 -397
- package/coverage/map/api/hooks/hooks.query.js.html +0 -1309
- package/coverage/map/api/hooks/index.html +0 -161
- package/coverage/map/api/hooks/index.js.html +0 -94
- package/coverage/map/api/index.html +0 -131
- package/coverage/map/api/index.js.html +0 -139
- package/coverage/map/api/marshall.js.html +0 -178
- package/coverage/map/api/models/alerts.model.mongodb.js.html +0 -106
- package/coverage/map/api/models/catalog.model.mongodb.js.html +0 -127
- package/coverage/map/api/models/features.model.mongodb.js.html +0 -196
- package/coverage/map/api/models/index.html +0 -161
- package/coverage/map/api/models/projects.model.mongodb.js.html +0 -109
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +0 -274
- package/coverage/map/api/services/alerts/alerts.service.js.html +0 -610
- package/coverage/map/api/services/alerts/index.html +0 -131
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +0 -313
- package/coverage/map/api/services/catalog/index.html +0 -116
- package/coverage/map/api/services/daptiles/daptiles.service.js.html +0 -1510
- package/coverage/map/api/services/daptiles/index.html +0 -116
- package/coverage/map/api/services/features/features.hooks.js.html +0 -310
- package/coverage/map/api/services/features/features.service.js.html +0 -544
- package/coverage/map/api/services/features/index.html +0 -131
- package/coverage/map/api/services/index.html +0 -116
- package/coverage/map/api/services/index.js.html +0 -946
- package/coverage/map/api/services/projects/index.html +0 -116
- package/coverage/map/api/services/projects/projects.hooks.js.html +0 -439
- package/coverage/map/common/dynamic-grid-source.js.html +0 -466
- package/coverage/map/common/errors.js.html +0 -94
- package/coverage/map/common/geotiff-grid-source.js.html +0 -544
- package/coverage/map/common/grid.js.html +0 -1612
- package/coverage/map/common/index.html +0 -371
- package/coverage/map/common/index.js.html +0 -172
- package/coverage/map/common/meteo-model-grid-source.js.html +0 -556
- package/coverage/map/common/moment-utils.js.html +0 -157
- package/coverage/map/common/opendap-grid-source.js.html +0 -868
- package/coverage/map/common/opendap-utils.js.html +0 -826
- package/coverage/map/common/permissions.js.html +0 -124
- package/coverage/map/common/time-based-grid-source.js.html +0 -418
- package/coverage/map/common/tms-utils.js.html +0 -274
- package/coverage/map/common/wcs-grid-source.js.html +0 -364
- package/coverage/map/common/wcs-utils.js.html +0 -586
- package/coverage/map/common/weacast-grid-source.js.html +0 -1033
- package/coverage/map/common/wfs-utils.js.html +0 -574
- package/coverage/map/common/wms-utils.js.html +0 -451
- package/coverage/map/common/wmts-utils.js.html +0 -547
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -196
- package/coverage/tmp/coverage-122123-1739872365211-0.json +0 -1
- package/coverage/tmp/coverage-122135-1739872365196-0.json +0 -1
- package/coverage/tmp/coverage-122146-1739872365184-0.json +0 -1
- package/coverage/tmp/coverage-122158-1739872365169-0.json +0 -1
- package/coverage/tmp/coverage-122165-1739872365141-0.json +0 -1
- package/extras/tours/core/account-profile.js +0 -32
- package/extras/tours/core/account.js +0 -143
- package/extras/tours/core/add-member.js +0 -75
- package/extras/tours/core/add-tag.js +0 -13
- package/extras/tours/core/create-group.js +0 -19
- package/extras/tours/core/create-organisation.js +0 -19
- package/extras/tours/core/create-tag.js +0 -26
- package/extras/tours/core/edit-member-role.js +0 -13
- package/extras/tours/core/groups.js +0 -65
- package/extras/tours/core/join-group.js +0 -13
- package/extras/tours/core/login.js +0 -41
- package/extras/tours/core/members.js +0 -108
- package/extras/tours/core/register.js +0 -61
- package/extras/tours/core/send-reset-password.js +0 -14
- package/extras/tours/core/tags.js +0 -65
- package/extras/tours/map/catalog-panel.js +0 -112
- package/extras/tours/map/fab.js +0 -26
- package/extras/tours/map/navigation-bar.js +0 -187
- package/extras/tours/map/side-nav.js +0 -36
- package/test/api/core/test-log-2025-05-26.log +0 -22
- package/test/api/map/test-log-2025-05-26.log +0 -12
- package/test/client/core/api.js +0 -361
- package/test/client/core/index.js +0 -9
- package/test/client/index.js +0 -4
- package/test/client/map/index.js +0 -5
- package/test.client.js +0 -1
- /package/{test/client/core/time.js → extras/tests/core/time.mjs} +0 -0
- /package/extras/tours/{map/add-layer.js → add-layer.js} +0 -0
- /package/extras/tours/{map/catalog-categories.js → catalog-categories.js} +0 -0
- /package/extras/tours/{map/connect-layer.js → connect-layer.js} +0 -0
- /package/extras/tours/{map/create-layer.js → create-layer.js} +0 -0
- /package/extras/tours/{map/create-view.js → create-view.js} +0 -0
- /package/extras/tours/{map/import-layer.js → import-layer.js} +0 -0
- /package/extras/tours/{map/timeline.js → pane.bottom.js} +0 -0
|
@@ -2,13 +2,13 @@ import L from 'leaflet'
|
|
|
2
2
|
import _ from 'lodash'
|
|
3
3
|
import sift from 'sift'
|
|
4
4
|
import logger from 'loglevel'
|
|
5
|
-
import { point, rhumbDistance, rhumbBearing, rhumbDestination } from '@turf/turf'
|
|
6
|
-
import { Time, Units, utils as kdkCoreUtils } from '../../../../core.client.js'
|
|
5
|
+
import { point, rhumbDistance, rhumbBearing, rhumbDestination, getType } from '@turf/turf'
|
|
6
|
+
import { Time, Units, Events, utils as kdkCoreUtils } from '../../../../core.client.js'
|
|
7
7
|
import { getUpdateFeatureFunction, hasUnitInLeafletLayerTemplate, GeoJsonLeafletLayerFilters } from '../../leaflet/utils/utils.geojson.js'
|
|
8
8
|
import { MaskLayer } from '../../leaflet/MaskLayer.js'
|
|
9
9
|
import { TiledFeatureLayer } from '../../leaflet/TiledFeatureLayer.js'
|
|
10
10
|
import {
|
|
11
|
-
fetchGeoJson, LeafletEvents, bindLeafletEvents, unbindLeafletEvents, getFeatureId, isInMemoryLayer, getFeatureStyleType,
|
|
11
|
+
fetchGeoJson, getGeoJsonFeatures, LeafletEvents, bindLeafletEvents, unbindLeafletEvents, getFeatureId, isInMemoryLayer, getFeatureStyleType,
|
|
12
12
|
convertSimpleStyleToPointStyle, convertSimpleStyleToLineStyle, convertSimpleStyleToPolygonStyle, createMarkerFromPointStyle
|
|
13
13
|
} from '../../utils.map.js'
|
|
14
14
|
import * as maths from '../../../../core/client/utils/utils.math.js'
|
|
@@ -61,7 +61,7 @@ export const geojsonLayers = {
|
|
|
61
61
|
// Use probes as reference
|
|
62
62
|
const geoJson = await this.getProbeFeatures(options)
|
|
63
63
|
// When probes are fetched, we flag them with a 'measureRequestIssued' property that we may use in dynamic styling
|
|
64
|
-
const features = (geoJson
|
|
64
|
+
const features = getGeoJsonFeatures(geoJson)
|
|
65
65
|
features.forEach(feature => { feature.measureRequestIssued = true })
|
|
66
66
|
successCallback(geoJson)
|
|
67
67
|
initialized = true
|
|
@@ -143,33 +143,92 @@ export const geojsonLayers = {
|
|
|
143
143
|
leafletOptions.container = this.createLeafletLayer(clusterOptions)
|
|
144
144
|
bindLeafletEvents(leafletOptions.container, LeafletEvents.Cluster, this, options)
|
|
145
145
|
},
|
|
146
|
+
processGeoJsonPaneOptions (options) {
|
|
147
|
+
const leafletOptions = options.leaflet || options
|
|
148
|
+
// Min/Max zoom are automatically managed on tiled layers by inheriting GridLayer
|
|
149
|
+
// but on non-tiled layers we need to use a pane to manage it.
|
|
150
|
+
// However, as we'd like to be able to easily control layer display order we create a pane for each layer by default anyway.
|
|
151
|
+
const panes = _.get(leafletOptions, 'panes', [])
|
|
152
|
+
const defaultPane = _.find(panes, { name: _.get(leafletOptions, 'pane') })
|
|
153
|
+
const hasMinZoom = !!_.get(leafletOptions, 'minZoom')
|
|
154
|
+
const hasMaxZoom = !!_.get(leafletOptions, 'maxZoom')
|
|
155
|
+
const hasZIndex = !!_.get(leafletOptions, 'zIndex')
|
|
156
|
+
const hasPaneZIndex = _.get(defaultPane, 'zIndex')
|
|
157
|
+
const name = options.name
|
|
158
|
+
// Default pane will be automatically used for Leaflet vector layers (ie polygons/lines)
|
|
159
|
+
const layerPane = defaultPane || { name }
|
|
160
|
+
if (hasMinZoom) layerPane.minZoom = _.get(leafletOptions, 'minZoom')
|
|
161
|
+
if (hasMaxZoom) layerPane.maxZoom = _.get(leafletOptions, 'maxZoom')
|
|
162
|
+
if (hasZIndex && !hasPaneZIndex) layerPane.zIndex = _.get(leafletOptions, 'zIndex')
|
|
163
|
+
if (!_.find(panes, { name: layerPane.name })) panes.push(layerPane)
|
|
164
|
+
// Set layer to use its default pane as target
|
|
165
|
+
// Avoid erasing any existing pane, if so the pane should have been created taken into account the layer zIndex up-front
|
|
166
|
+
if (!_.has(leafletOptions, 'pane')) leafletOptions.pane = layerPane.name
|
|
167
|
+
if (!_.has(leafletOptions, 'shadowPane')) leafletOptions.shadowPane = layerPane.name
|
|
168
|
+
// Make default pane available to styles as well as eg shape markers are created from here
|
|
169
|
+
for (const type of ['point', 'line', 'polygon']) {
|
|
170
|
+
_.set(leafletOptions, `style.${type}.pane`, layerPane.name)
|
|
171
|
+
_.set(leafletOptions, `style.${type}.shadowPane`, layerPane.name)
|
|
172
|
+
}
|
|
173
|
+
// If we only use this default pane all elements of a layer will be affected to this pane.
|
|
174
|
+
// We prefer the markers and their shadows to be affected to different panes than others elements like Leaflet does by default.
|
|
175
|
+
// This is notably required if we'd like to be able to control the rendering order of the elements with bringToFront/bringToBack functions.
|
|
176
|
+
// Except if a z-index is specified as in this case the user wants to control the order by himself
|
|
177
|
+
if (!hasZIndex && !hasPaneZIndex) {
|
|
178
|
+
// No z-index means that the pane will use the default for overlays in Leaflet which is 400
|
|
179
|
+
// so that we use the default for markers and shadows in Leaflet as well.
|
|
180
|
+
if (!_.find(panes, { name: `${name}-markers` })) panes.push(Object.assign({ name: `${name}-markers`, zIndex: 600 }, _.omit(layerPane, ['name'])))
|
|
181
|
+
if (!_.find(panes, { name: `${name}-shadows` })) panes.push(Object.assign({ name: `${name}-shadows`, zIndex: 500 }, _.omit(layerPane, ['name'])))
|
|
182
|
+
// Avoid erasing any existing pane, if so the pane should have been created taken into account the layer zIndex up-front
|
|
183
|
+
if (!_.has(leafletOptions, 'shadowPane')) leafletOptions.shadowPane = `${name}-shadows`
|
|
184
|
+
// Make panes available to styles as eg shape markers are created from here
|
|
185
|
+
_.set(leafletOptions, 'style.point.pane', `${name}-markers`)
|
|
186
|
+
_.set(leafletOptions, 'style.point.shadowPane', `${name}-shadows`)
|
|
187
|
+
}
|
|
188
|
+
leafletOptions.panes = panes
|
|
189
|
+
},
|
|
190
|
+
processGeoJsonStyleOptions (options) {
|
|
191
|
+
const leafletOptions = options.leaflet || options
|
|
192
|
+
// Optimize templating by creating compilers up-front
|
|
193
|
+
const layerStyleTemplate = _.get(leafletOptions, 'template')
|
|
194
|
+
if (layerStyleTemplate) {
|
|
195
|
+
// We allow to template style properties according to feature, because it can be slow you have to specify a subset of properties
|
|
196
|
+
leafletOptions.template = layerStyleTemplate.map(property => ({
|
|
197
|
+
property, compiler: _.template(_.get(leafletOptions, property))
|
|
198
|
+
}))
|
|
199
|
+
}
|
|
200
|
+
const popupTemplate = _.get(leafletOptions, 'popup.template')
|
|
201
|
+
if (popupTemplate) {
|
|
202
|
+
leafletOptions.popup.compiler = _.template(popupTemplate)
|
|
203
|
+
}
|
|
204
|
+
const tooltipTemplate = _.get(leafletOptions, 'tooltip.template')
|
|
205
|
+
if (tooltipTemplate) {
|
|
206
|
+
leafletOptions.tooltip.compiler = _.template(tooltipTemplate)
|
|
207
|
+
}
|
|
208
|
+
// Optimize styling by creating color scales up-front
|
|
209
|
+
const variables = _.get(options, 'variables', [])
|
|
210
|
+
variables.forEach(variable => {
|
|
211
|
+
if (_.has(variable, 'chromajs')) {
|
|
212
|
+
variable.colorScale = kdkCoreUtils.buildColorScale(_.get(variable, 'chromajs'))
|
|
213
|
+
}
|
|
214
|
+
})
|
|
215
|
+
// Convert and store the style
|
|
216
|
+
if (leafletOptions.style) {
|
|
217
|
+
leafletOptions.layerPointStyle = _.get(leafletOptions.style, 'point')
|
|
218
|
+
leafletOptions.layerLineStyle = _.get(leafletOptions.style, 'line')
|
|
219
|
+
leafletOptions.layerPolygonStyle = _.get(leafletOptions.style, 'polygon')
|
|
220
|
+
} else {
|
|
221
|
+
leafletOptions.layerPointStyle = convertSimpleStyleToPointStyle(leafletOptions)
|
|
222
|
+
leafletOptions.layerLineStyle = convertSimpleStyleToLineStyle(leafletOptions)
|
|
223
|
+
leafletOptions.layerPolygonStyle = convertSimpleStyleToPolygonStyle(leafletOptions)
|
|
224
|
+
}
|
|
225
|
+
},
|
|
146
226
|
async createLeafletGeoJsonLayer (options) {
|
|
147
227
|
const leafletOptions = options.leaflet || options
|
|
148
228
|
// Check for valid type
|
|
149
229
|
if (leafletOptions.type !== 'geoJson') return
|
|
150
230
|
|
|
151
231
|
try {
|
|
152
|
-
// min/max zoom are automatically managed on tiled layers by inheriting GridLayer
|
|
153
|
-
// on non-tiled layers we need to use a pane to manage it
|
|
154
|
-
const hasMinZoom = !!_.get(leafletOptions, 'minZoom')
|
|
155
|
-
const hasMaxZoom = !!_.get(leafletOptions, 'maxZoom')
|
|
156
|
-
const hasZIndex = !!_.get(leafletOptions, 'zIndex')
|
|
157
|
-
if (!leafletOptions.tiled && (hasMinZoom || hasMaxZoom)) {
|
|
158
|
-
const pane = { name: options.name }
|
|
159
|
-
if (hasMinZoom) pane.minZoom = _.get(leafletOptions, 'minZoom')
|
|
160
|
-
if (hasMaxZoom) pane.maxZoom = _.get(leafletOptions, 'maxZoom')
|
|
161
|
-
if (hasZIndex) pane.zIndex = _.get(leafletOptions, 'zIndex')
|
|
162
|
-
leafletOptions.panes = [pane]
|
|
163
|
-
leafletOptions.pane = options.name
|
|
164
|
-
leafletOptions.shadowPane = options.name
|
|
165
|
-
// Make pane available to styles as well as eg shape markers are created from here
|
|
166
|
-
for (const type of ['point', 'line', 'polygon']) {
|
|
167
|
-
if (_.has(leafletOptions, `style.${type}`)) {
|
|
168
|
-
_.set(leafletOptions, `style.${type}.pane`, options.name)
|
|
169
|
-
_.set(leafletOptions, `style.${type}.shadowPane`, options.name)
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
232
|
// If not explicitely disable use defaults for clustering
|
|
174
233
|
if (!_.has(leafletOptions, 'cluster') && _.get(this, 'activityOptions.engine.cluster')) {
|
|
175
234
|
// Merge existing config or create a new one on layer
|
|
@@ -186,39 +245,9 @@ export const geojsonLayers = {
|
|
|
186
245
|
} else {
|
|
187
246
|
await this.processGeoJsonLayerOptions(options)
|
|
188
247
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
// We allow to template style properties according to feature, because it can be slow you have to specify a subset of properties
|
|
193
|
-
leafletOptions.template = layerStyleTemplate.map(property => ({
|
|
194
|
-
property, compiler: _.template(_.get(leafletOptions, property))
|
|
195
|
-
}))
|
|
196
|
-
}
|
|
197
|
-
const popupTemplate = _.get(leafletOptions, 'popup.template')
|
|
198
|
-
if (popupTemplate) {
|
|
199
|
-
leafletOptions.popup.compiler = _.template(popupTemplate)
|
|
200
|
-
}
|
|
201
|
-
const tooltipTemplate = _.get(leafletOptions, 'tooltip.template')
|
|
202
|
-
if (tooltipTemplate) {
|
|
203
|
-
leafletOptions.tooltip.compiler = _.template(tooltipTemplate)
|
|
204
|
-
}
|
|
205
|
-
// Optimize styling by creating color scales up-front
|
|
206
|
-
const variables = _.get(options, 'variables', [])
|
|
207
|
-
variables.forEach(variable => {
|
|
208
|
-
if (_.has(variable, 'chromajs')) {
|
|
209
|
-
variable.colorScale = kdkCoreUtils.buildColorScale(_.get(variable, 'chromajs'))
|
|
210
|
-
}
|
|
211
|
-
})
|
|
212
|
-
// Convert and store the style
|
|
213
|
-
if (leafletOptions.style) {
|
|
214
|
-
leafletOptions.layerPointStyle = _.get(leafletOptions.style, 'point')
|
|
215
|
-
leafletOptions.layerLineStyle = _.get(leafletOptions.style, 'line')
|
|
216
|
-
leafletOptions.layerPolygonStyle = _.get(leafletOptions.style, 'polygon')
|
|
217
|
-
} else {
|
|
218
|
-
leafletOptions.layerPointStyle = convertSimpleStyleToPointStyle(leafletOptions)
|
|
219
|
-
leafletOptions.layerLineStyle = convertSimpleStyleToLineStyle(leafletOptions)
|
|
220
|
-
leafletOptions.layerPolygonStyle = convertSimpleStyleToPolygonStyle(leafletOptions)
|
|
221
|
-
}
|
|
248
|
+
this.processGeoJsonStyleOptions(options)
|
|
249
|
+
// Do this after style because it may alter it
|
|
250
|
+
this.processGeoJsonPaneOptions(options)
|
|
222
251
|
// Merge generic GeoJson options and layer options
|
|
223
252
|
const geoJsonOptions = this.getGeoJsonOptions(options)
|
|
224
253
|
Object.keys(geoJsonOptions).forEach(key => {
|
|
@@ -247,13 +276,6 @@ export const geojsonLayers = {
|
|
|
247
276
|
}
|
|
248
277
|
// Bind event
|
|
249
278
|
layer.on('update', (data) => this.onLayerUpdated(options, layer, data))
|
|
250
|
-
if (leafletOptions.container) layer.once('add', () => leafletOptions.container.addTo(this.map))
|
|
251
|
-
// Add FeatureGroup interface so that layer edition works as well
|
|
252
|
-
layer.toGeoJSON = () => ({ type: 'FeatureCollection', features: _.values(layer._features) })
|
|
253
|
-
layer.clearLayers = () => layer._onNewData(true, { type: 'FeatureCollection', features: [] })
|
|
254
|
-
layer.getLayers = () => _.values(layer._featureLayers)
|
|
255
|
-
layer.addLayer = (geoJsonLayer) => layer._onNewData(false, geoJsonLayer.toGeoJSON())
|
|
256
|
-
layer.removeLayer = (geoJsonLayer) => layer.remove(geoJsonLayer.toGeoJSON())
|
|
257
279
|
// We launch a first update to initialize data
|
|
258
280
|
layer.update()
|
|
259
281
|
} else {
|
|
@@ -309,10 +331,10 @@ export const geojsonLayers = {
|
|
|
309
331
|
logger.warn(`[KDK] cannot get a style type from the feature of geometry type ${feature.geometry.type}`)
|
|
310
332
|
return
|
|
311
333
|
}
|
|
312
|
-
return this.generateStyle(styleType, feature, options, _.get(this,
|
|
334
|
+
return this.generateStyle(styleType, feature, options, _.get(this, `activityOptions.engine.style.${styleType}`), this.map.getZoom())
|
|
313
335
|
},
|
|
314
336
|
pointToLayer: (feature, latlng) => {
|
|
315
|
-
const style = this.generateStyle('point', feature, options, _.get(this, 'activityOptions.engine'))
|
|
337
|
+
const style = this.generateStyle('point', feature, options, _.get(this, 'activityOptions.engine.style.point'), this.map.getZoom())
|
|
316
338
|
if (!style) {
|
|
317
339
|
logger.warn('[KDK] cannot generate point style from a feature')
|
|
318
340
|
return
|
|
@@ -325,16 +347,24 @@ export const geojsonLayers = {
|
|
|
325
347
|
getUpdateAnimation(name, layer, options, geoJson) {
|
|
326
348
|
const { duration, removeMissing, animate } = options
|
|
327
349
|
const animatedProperties = _.keys(animate)
|
|
328
|
-
|
|
350
|
+
animatedProperties.forEach(property => {
|
|
351
|
+
_.defaultsDeep(animate, {
|
|
352
|
+
[property]: { easing: { function: 'linear' }, bearing: false }
|
|
353
|
+
})
|
|
354
|
+
})
|
|
355
|
+
const features = getGeoJsonFeatures(geoJson)
|
|
329
356
|
features.forEach(feature => {
|
|
330
357
|
const previousLayer = layer.getLayer(layer.options.getFeatureId(feature))
|
|
331
358
|
const previousFeature = (previousLayer ? previousLayer.feature : null)
|
|
332
359
|
if (previousFeature) {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
const
|
|
360
|
+
// Remove reference to previous feature otherwise it will create a reference tree that will grow as timle passes by
|
|
361
|
+
// and that will never be clear by garbage collector unless the layer is destroyed
|
|
362
|
+
delete previousFeature['previousFeature']
|
|
363
|
+
feature.previousFeature = previousFeature
|
|
364
|
+
const startLongitude = feature.previousFeature.geometry.coordinates[0]
|
|
365
|
+
const startLatitude = feature.previousFeature.geometry.coordinates[1]
|
|
366
|
+
const endLongitude = feature.geometry.coordinates[0]
|
|
367
|
+
const endLatitude = feature.geometry.coordinates[1]
|
|
338
368
|
const rhumbStart = point([startLongitude, startLatitude])
|
|
339
369
|
const rhumbEnd = point([endLongitude, endLatitude])
|
|
340
370
|
Object.assign(feature, {
|
|
@@ -345,12 +375,29 @@ export const geojsonLayers = {
|
|
|
345
375
|
})
|
|
346
376
|
}
|
|
347
377
|
})
|
|
378
|
+
// Note: as this callback is called frequently by the animation system
|
|
379
|
+
// we don't use lodash utility functions like _.get/_.set to improve performances
|
|
348
380
|
return (timestamp) => {
|
|
349
381
|
// Initialize animation time origin
|
|
350
382
|
if (!options.startTime) options.startTime = timestamp
|
|
351
|
-
const { id, startTime } = options
|
|
352
|
-
const
|
|
353
|
-
|
|
383
|
+
const { id, startTime, fps } = options
|
|
384
|
+
const elapsedSinceStart = timestamp - startTime
|
|
385
|
+
// If we target a specific frame rate check if we need to update or not
|
|
386
|
+
if (fps && options.lastTime) {
|
|
387
|
+
const elapsedSinceLastFrame = timestamp - options.lastTime
|
|
388
|
+
const fpsInterval = 1000 / fps
|
|
389
|
+
if (elapsedSinceLastFrame < fpsInterval) {
|
|
390
|
+
options.id = requestAnimationFrame(options.step)
|
|
391
|
+
// For debug purpose only, avoid flooding the browser
|
|
392
|
+
//logger.debug('[KDK] Skipping update layer animation frame')
|
|
393
|
+
return
|
|
394
|
+
} else {
|
|
395
|
+
// For debug purpose only, avoid floodign the browser
|
|
396
|
+
//logger.debug('[KDK] Drawing update layer animation frame')
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
// Else animate if animation not yet finished
|
|
400
|
+
const percent = Math.abs(elapsedSinceStart / (1000 * duration))
|
|
354
401
|
if (percent <= 1) {
|
|
355
402
|
const animatedFeatures = []
|
|
356
403
|
features.forEach(feature => {
|
|
@@ -358,54 +405,61 @@ export const geojsonLayers = {
|
|
|
358
405
|
animatedFeatures.push(feature)
|
|
359
406
|
return
|
|
360
407
|
}
|
|
361
|
-
const endLongitude =
|
|
362
|
-
const endLatitude =
|
|
408
|
+
const endLongitude = feature.geometry.coordinates[0]
|
|
409
|
+
const endLatitude = feature.geometry.coordinates[1]
|
|
363
410
|
let dLongitude = endLongitude, dLatitude = endLatitude
|
|
364
411
|
if (animate.geometry) {
|
|
365
|
-
const easingGeometryFunction =
|
|
366
|
-
const easingGeometryParameters =
|
|
412
|
+
const easingGeometryFunction = animate.geometry.easing.function
|
|
413
|
+
const easingGeometryParameters = animate.geometry.easing.parameters || []
|
|
367
414
|
const percentGeometry = maths[easingGeometryFunction](percent, ...easingGeometryParameters)
|
|
368
415
|
if (animate.geometry.rhumb) {
|
|
369
416
|
const destination = rhumbDestination(feature.rhumbStart, percentGeometry * feature.rhumbDistance, feature.rhumbBearing)
|
|
370
|
-
dLongitude =
|
|
371
|
-
dLatitude =
|
|
417
|
+
dLongitude = destination.geometry.coordinates[0]
|
|
418
|
+
dLatitude = destination.geometry.coordinates[1]
|
|
372
419
|
} else {
|
|
373
|
-
const startLongitude =
|
|
374
|
-
const startLatitude =
|
|
375
|
-
|
|
376
|
-
|
|
420
|
+
const startLongitude = feature.previousFeature.geometry.coordinates[0]
|
|
421
|
+
const startLatitude = feature.previousFeature.geometry.coordinates[1]
|
|
422
|
+
dLongitude = startLongitude + percentGeometry * (endLongitude - startLongitude)
|
|
423
|
+
dLatitude = startLatitude + percentGeometry * (endLatitude - startLatitude)
|
|
377
424
|
}
|
|
378
425
|
}
|
|
379
426
|
const properties = {}
|
|
427
|
+
const previousFeatureProperties = feature.previousFeature.properties || {}
|
|
428
|
+
const featureProperties = feature.properties || {}
|
|
380
429
|
animatedProperties.forEach(property => {
|
|
381
430
|
// Skip geometry as specifically managed above
|
|
382
431
|
if (property === 'geometry') return
|
|
383
|
-
const
|
|
384
|
-
const
|
|
432
|
+
const animateProperty = animate[property]
|
|
433
|
+
const easingPropertyFunction = animateProperty.easing.function
|
|
434
|
+
const easingPropertyParameters = animateProperty.easing.parameters || []
|
|
385
435
|
const percentProperty = maths[easingPropertyFunction](percent, ...easingPropertyParameters)
|
|
386
|
-
const startValue =
|
|
387
|
-
const endValue =
|
|
436
|
+
const startValue = previousFeatureProperties[property]
|
|
437
|
+
const endValue = featureProperties[property]
|
|
388
438
|
let dValue = startValue + percentProperty * (endValue - startValue)
|
|
389
|
-
if (
|
|
439
|
+
if (animateProperty.bearing) {
|
|
390
440
|
// Take care to animate using the shortest "path", eg from 355° to 5° avoid running counterclockwise
|
|
391
441
|
// First computes the smallest angle difference, either clockwise or counterclockwise.
|
|
392
442
|
const bearingDifference = (endValue - startValue + 540) % 360 - 180
|
|
393
443
|
// Then normalize the final result to be between 0 and 360
|
|
394
444
|
dValue = (startValue + percentProperty * bearingDifference + 360) % 360
|
|
395
445
|
}
|
|
396
|
-
|
|
446
|
+
properties[property] = dValue
|
|
397
447
|
})
|
|
398
|
-
animatedFeatures.push(
|
|
448
|
+
animatedFeatures.push({
|
|
449
|
+
type: feature.type,
|
|
399
450
|
geometry: {
|
|
451
|
+
type: feature.geometry.type,
|
|
400
452
|
coordinates: [dLongitude, dLatitude]
|
|
401
453
|
},
|
|
402
|
-
properties
|
|
403
|
-
|
|
454
|
+
properties: Object.assign({}, featureProperties, properties),
|
|
455
|
+
style: feature.style
|
|
456
|
+
})
|
|
404
457
|
})
|
|
405
458
|
layer._onNewData(_.isNil(removeMissing) ? layer.options.removeMissing : removeMissing, animatedFeatures)
|
|
459
|
+
options.lastTime = timestamp
|
|
406
460
|
options.id = requestAnimationFrame(options.step)
|
|
407
461
|
} else {
|
|
408
|
-
options.id
|
|
462
|
+
delete options.id
|
|
409
463
|
}
|
|
410
464
|
}
|
|
411
465
|
},
|
|
@@ -417,12 +471,12 @@ export const geojsonLayers = {
|
|
|
417
471
|
logger.warn(`Impossible to update non-realtime layer ${name}`)
|
|
418
472
|
return // Cannot update non-realtime layer
|
|
419
473
|
}
|
|
420
|
-
|
|
421
474
|
const replace = _.get(options, 'replace', false)
|
|
422
475
|
if (replace) {
|
|
423
476
|
// Replace given features, we first remove them to add them back afterwards
|
|
424
477
|
this.updateLayer(name, geoJson, { remove: true })
|
|
425
|
-
|
|
478
|
+
// Avoid infinite regression by removing the replace option
|
|
479
|
+
this.updateLayer(name, geoJson, _.omit(options, ['replace']))
|
|
426
480
|
} else {
|
|
427
481
|
// Backward compatibility when third parameter was the remove flag
|
|
428
482
|
const remove = (typeof options === 'boolean' ? options : options.remove)
|
|
@@ -439,26 +493,39 @@ export const geojsonLayers = {
|
|
|
439
493
|
*/
|
|
440
494
|
if (remove) {
|
|
441
495
|
if (typeof layer.remove !== 'function') return
|
|
442
|
-
let features = (geoJson
|
|
496
|
+
let features = getGeoJsonFeatures(geoJson)
|
|
443
497
|
// Filter features to ensure some have not been already removed
|
|
444
498
|
// FIXME: indeed it seems to causes a bug with clustering, see https://github.com/kalisio/kdk/issues/140
|
|
445
499
|
features = features.filter(feature => layer.getLayer(layer.options.getFeatureId(feature)))
|
|
446
500
|
layer.remove(features)
|
|
447
501
|
} else if (geoJson) {
|
|
448
502
|
if (typeof layer._onNewData === 'function') {
|
|
449
|
-
|
|
503
|
+
let duration = _.get(options, 'duration', 0)
|
|
504
|
+
const features = (Array.isArray(geoJson) ? geoJson : (geoJson.type === 'FeatureCollection' ? geoJson.features : [geoJson]))
|
|
505
|
+
// Nothing to animate in this case
|
|
506
|
+
if (duration && (features.length === 0)) {
|
|
507
|
+
duration = 0
|
|
508
|
+
}
|
|
509
|
+
if (duration && _.some(features, feature => (getType(feature) !== 'Point'))) {
|
|
510
|
+
logger.warn(`Impossible to animate layer ${name} as it does not contain only point geometries`)
|
|
511
|
+
duration = 0
|
|
512
|
+
}
|
|
450
513
|
if (duration) {
|
|
514
|
+
// For debug purpose only, avoid flooding the browser
|
|
515
|
+
//logger.debug(`Calling updateLayer(${name}) with`, options)
|
|
451
516
|
_.defaultsDeep(options, {
|
|
452
517
|
animate: {
|
|
453
|
-
geometry: { easing: { function: '
|
|
518
|
+
geometry: { easing: { function: 'linear' }, rhumb: false }
|
|
454
519
|
}
|
|
455
520
|
})
|
|
456
521
|
// Stop any scheduled animation on the same layer
|
|
457
|
-
|
|
522
|
+
const frameId = _.get(this.updateAnimations, `${name}.id`)
|
|
523
|
+
if (!_.isNil(frameId)) cancelAnimationFrame(frameId)
|
|
458
524
|
options.step = this.getUpdateAnimation(name, layer, options, geoJson)
|
|
459
525
|
options.id = requestAnimationFrame(options.step)
|
|
460
526
|
_.set(this.updateAnimations, name, options)
|
|
461
527
|
} else {
|
|
528
|
+
_.unset(this.updateAnimations, name)
|
|
462
529
|
layer._onNewData(removeMissing, geoJson)
|
|
463
530
|
}
|
|
464
531
|
}
|
|
@@ -577,6 +644,12 @@ export const geojsonLayers = {
|
|
|
577
644
|
}
|
|
578
645
|
}
|
|
579
646
|
},
|
|
647
|
+
onEditStopGeoJsonLayers ({ status, layer }) {
|
|
648
|
+
// Check if we have to cache/update geojson data for this layer
|
|
649
|
+
if (isInMemoryLayer(layer)) {
|
|
650
|
+
this.geojsonCache[layer.name] = this.toGeoJson(layer.name)
|
|
651
|
+
}
|
|
652
|
+
},
|
|
580
653
|
onLayerRemovedGeoJsonLayers (layer) {
|
|
581
654
|
// Remove cached geojson data if any
|
|
582
655
|
if (_.has(this.geojsonCache, layer.name)) {
|
|
@@ -586,11 +659,12 @@ export const geojsonLayers = {
|
|
|
586
659
|
},
|
|
587
660
|
created () {
|
|
588
661
|
this.registerLeafletConstructor(this.createLeafletGeoJsonLayer)
|
|
589
|
-
|
|
662
|
+
Events.on('time-current-time-changed', this.onCurrentTimeChangedGeoJsonLayers)
|
|
590
663
|
this.$engineEvents.on('selected-level-changed', this.onCurrentLevelChangedGeoJsonLayers)
|
|
591
|
-
|
|
664
|
+
Events.on('units-changed', this.onDefaultUnitChangedGeoJsonLayers)
|
|
592
665
|
this.$engineEvents.on('zoomend', this.onMapZoomChangedGeoJsonLayers)
|
|
593
666
|
this.$engineEvents.on('layer-shown', this.onLayerShownGeoJsonLayers)
|
|
667
|
+
this.$engineEvents.on('edit-stop', this.onEditStopGeoJsonLayers)
|
|
594
668
|
this.$engineEvents.on('layer-removed', this.onLayerRemovedGeoJsonLayers)
|
|
595
669
|
|
|
596
670
|
// Used to store animation options when animating a layer
|
|
@@ -599,11 +673,12 @@ export const geojsonLayers = {
|
|
|
599
673
|
this.geojsonCache = {}
|
|
600
674
|
},
|
|
601
675
|
beforeUnmount () {
|
|
602
|
-
|
|
676
|
+
Events.off('time-current-time-changed', this.onCurrentTimeChangedGeoJsonLayers)
|
|
603
677
|
this.$engineEvents.off('selected-level-changed', this.onCurrentLevelChangedGeoJsonLayers)
|
|
604
|
-
|
|
678
|
+
Events.off('units-changed', this.onDefaultUnitChangedGeoJsonLayers)
|
|
605
679
|
this.$engineEvents.off('zoomend', this.onMapZoomChangedGeoJsonLayers)
|
|
606
680
|
this.$engineEvents.off('layer-shown', this.onLayerShownGeoJsonLayers)
|
|
681
|
+
this.$engineEvents.off('edit-stop', this.onEditStopGeoJsonLayers)
|
|
607
682
|
this.$engineEvents.off('layer-removed', this.onLayerRemovedGeoJsonLayers)
|
|
608
683
|
|
|
609
684
|
this.geojsonCache = {}
|
|
@@ -4,6 +4,7 @@ import sift from 'sift'
|
|
|
4
4
|
import centroid from '@turf/centroid'
|
|
5
5
|
import HeatmapOverlay from 'leaflet-heatmap'
|
|
6
6
|
import { Time } from '../../../../core/client/time.js'
|
|
7
|
+
import { Events } from '../../../../core/client/events.js'
|
|
7
8
|
import { fetchGeoJson } from '../../utils/utils.features.js'
|
|
8
9
|
|
|
9
10
|
export const heatmapLayers = {
|
|
@@ -103,10 +104,10 @@ export const heatmapLayers = {
|
|
|
103
104
|
},
|
|
104
105
|
created () {
|
|
105
106
|
this.registerLeafletConstructor(this.createLeafletHeatmapLayer)
|
|
106
|
-
|
|
107
|
+
Events.on('time-current-time-changed', this.onCurrentTimeChangedHeatmapLayers)
|
|
107
108
|
},
|
|
108
109
|
beforeUnmount () {
|
|
109
|
-
|
|
110
|
+
Events.off('time-current-time-changed', this.onCurrentTimeChangedHeatmapLayers)
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _ from 'lodash'
|
|
2
|
+
|
|
1
3
|
export const activity = {
|
|
2
4
|
methods: {
|
|
3
5
|
async initializeMap (container) {
|
|
@@ -11,7 +13,10 @@ export const activity = {
|
|
|
11
13
|
},
|
|
12
14
|
storeView () {
|
|
13
15
|
// Check if the activity is using context restoration
|
|
14
|
-
if (typeof this.storeContext === 'function')
|
|
16
|
+
if (typeof this.storeContext === 'function') {
|
|
17
|
+
// Do not store context on each animation frame to avoid too much CPU consumption
|
|
18
|
+
if (!_.get(this.centerAnimation, 'id')) this.storeContext('view')
|
|
19
|
+
}
|
|
15
20
|
},
|
|
16
21
|
onMapResized (size) {
|
|
17
22
|
// Avoid to refresh the layout when leaving the component
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _ from 'lodash'
|
|
2
2
|
import logger from 'loglevel'
|
|
3
|
+
import { Store } from '../../../../core/client/index.js'
|
|
3
4
|
import { LeafletEvents, bindLeafletEvents } from '../../utils.map.js'
|
|
4
5
|
|
|
5
6
|
export const mapillaryLayers = {
|
|
@@ -34,7 +35,7 @@ export const mapillaryLayers = {
|
|
|
34
35
|
},
|
|
35
36
|
created () {
|
|
36
37
|
// Check whether the token is initialized
|
|
37
|
-
this.mapillaryToken =
|
|
38
|
+
this.mapillaryToken = Store.get('capabilities.api.mapillary.token')
|
|
38
39
|
if (!this.mapillaryToken) {
|
|
39
40
|
logger.warn('You must provide a client token to use Mapillary')
|
|
40
41
|
return
|
|
@@ -5,7 +5,7 @@ import sift from 'sift'
|
|
|
5
5
|
import L from 'leaflet'
|
|
6
6
|
import * as protomaps from 'protomaps-leaflet'
|
|
7
7
|
import { mapbox_style } from '@kalisio/leaflet-pmtiles'
|
|
8
|
-
import { api, Time, Units, TemplateContext } from '../../../../core/client/index.js'
|
|
8
|
+
import { api, Time, Units, Events, TemplateContext } from '../../../../core/client/index.js'
|
|
9
9
|
|
|
10
10
|
export const pmtilesLayers = {
|
|
11
11
|
methods: {
|
|
@@ -104,11 +104,11 @@ export const pmtilesLayers = {
|
|
|
104
104
|
},
|
|
105
105
|
created () {
|
|
106
106
|
this.registerLeafletConstructor(this.createLeafletPMTilesLayer)
|
|
107
|
-
|
|
107
|
+
Events.on('time-current-time-changed', this.onCurrentTimeChangedPMTilesLayers)
|
|
108
108
|
this.$engineEvents.on('selected-level-changed', this.onCurrentLevelChangedPMTilesLayers)
|
|
109
109
|
},
|
|
110
110
|
beforeUnmount () {
|
|
111
|
-
|
|
111
|
+
Events.off('time-current-time-changed', this.onCurrentTimeChangedPMTilesLayers)
|
|
112
112
|
this.$engineEvents.off('selected-level-changed', this.onCurrentLevelChangedPMTilesLayers)
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _ from 'lodash'
|
|
2
2
|
import { Time } from '../../../../core/client/time.js'
|
|
3
|
+
import { Events } from '../../../../core/client/events.js'
|
|
3
4
|
import { makeGridSource, extractGridSourceConfig } from '../../../common/grid.js'
|
|
4
5
|
import { TiledMeshLayer } from '../../leaflet/TiledMeshLayer.js'
|
|
5
6
|
|
|
@@ -106,7 +107,7 @@ export const tiledMeshLayers = {
|
|
|
106
107
|
this.$engineEvents.on('layer-hidden', this.onHideTiledMeshLayer)
|
|
107
108
|
this.$engineEvents.on('selected-level-changed', this.onSelectedLevelChangedTiledMeshLayer)
|
|
108
109
|
this.$engineEvents.on('forecast-model-changed', this.onForecastModelChangedTiledMeshLayer)
|
|
109
|
-
|
|
110
|
+
Events.on('time-current-time-changed', this.onCurrentTimeChangedTiledMeshLayer)
|
|
110
111
|
},
|
|
111
112
|
|
|
112
113
|
beforeUnmount () {
|
|
@@ -115,6 +116,6 @@ export const tiledMeshLayers = {
|
|
|
115
116
|
this.$engineEvents.off('layer-hidden', this.onHideTiledMeshLayer)
|
|
116
117
|
this.$engineEvents.off('selected-level-changed', this.onSelectedLevelChangedTiledMeshLayer)
|
|
117
118
|
this.$engineEvents.off('forecast-model-changed', this.onForecastModelChangedTiledMeshLayer)
|
|
118
|
-
|
|
119
|
+
Events.off('time-current-time-changed', this.onCurrentTimeChangedTiledMeshLayer)
|
|
119
120
|
}
|
|
120
121
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _ from 'lodash'
|
|
2
2
|
import 'leaflet-velocity'
|
|
3
3
|
import { Time } from '../../../../core/client/time.js'
|
|
4
|
+
import { Events } from '../../../../core/client/events.js'
|
|
4
5
|
import { makeGridSource, extractGridSourceConfig } from '../../../common/grid.js'
|
|
5
6
|
import { TiledWindLayer } from '../../leaflet/TiledWindLayer.js'
|
|
6
7
|
|
|
@@ -115,7 +116,7 @@ export const tiledWindLayers = {
|
|
|
115
116
|
this.$engineEvents.on('layer-hidden', this.onHideTiledWindLayer)
|
|
116
117
|
this.$engineEvents.on('selected-level-changed', this.onSelectedLevelChangedTiledWindLayer)
|
|
117
118
|
this.$engineEvents.on('forecast-model-changed', this.onForecastModelChangedTiledWindLayer)
|
|
118
|
-
|
|
119
|
+
Events.on('time-current-time-changed', this.onCurrentTimeChangedTiledWindLayer)
|
|
119
120
|
},
|
|
120
121
|
|
|
121
122
|
beforeUnmount () {
|
|
@@ -124,6 +125,6 @@ export const tiledWindLayers = {
|
|
|
124
125
|
this.$engineEvents.off('layer-hidden', this.onHideTiledWindLayer)
|
|
125
126
|
this.$engineEvents.off('selected-level-changed', this.onSelectedLevelChangedTiledWindLayer)
|
|
126
127
|
this.$engineEvents.off('forecast-model-changed', this.onForecastModelChangedTiledWindLayer)
|
|
127
|
-
|
|
128
|
+
Events.off('time-current-time-changed', this.onCurrentTimeChangedTiledWindLayer)
|
|
128
129
|
}
|
|
129
130
|
}
|