@kalisio/kdk 2.5.3 → 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 +3 -3
- 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/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 +6 -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 +6 -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/KPosition.vue +5 -0
- package/map/client/components/styles/KLayerStyleAction.vue +59 -12
- package/map/client/components/styles/KStyleEditor.vue +71 -8
- package/map/client/components/styles/KStyleEditorSection.vue +82 -33
- package/map/client/components/styles/KStyleManager.vue +119 -59
- 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/globe.js +2 -0
- package/map/client/i18n/map_en.json +29 -7
- package/map/client/i18n/map_fr.json +29 -7
- 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 +179 -31
- 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 +197 -51
- 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 -24
- 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/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 -958
- 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 -967
- 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 -520
- 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 -532
- 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 -202
- 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 -310
- 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 -476
- 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 -958
- 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 -967
- 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 -520
- 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 -532
- 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 -202
- 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 -310
- 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 -476
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +0 -553
- 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 -1294
- 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 -169
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +0 -196
- package/coverage/lcov-report/map/api/models/index.html +0 -176
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +0 -109
- package/coverage/lcov-report/map/api/models/styles.model.mongodb.js.html +0 -112
- 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 -328
- 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 -1054
- 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/api/services/styles/index.html +0 -116
- package/coverage/lcov-report/map/api/services/styles/styles.hooks.js.html +0 -196
- 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 -130
- 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 -11520
- package/coverage/map/api/hooks/hooks.catalog.js.html +0 -553
- package/coverage/map/api/hooks/hooks.features.js.html +0 -397
- package/coverage/map/api/hooks/hooks.query.js.html +0 -1294
- 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 -169
- package/coverage/map/api/models/features.model.mongodb.js.html +0 -196
- package/coverage/map/api/models/index.html +0 -176
- package/coverage/map/api/models/projects.model.mongodb.js.html +0 -109
- package/coverage/map/api/models/styles.model.mongodb.js.html +0 -112
- 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 -328
- 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 -1054
- 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/api/services/styles/index.html +0 -116
- package/coverage/map/api/services/styles/styles.hooks.js.html +0 -196
- 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 -130
- 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-151198-1753351220086-0.json +0 -1
- package/coverage/tmp/coverage-151210-1753351220070-0.json +0 -1
- package/coverage/tmp/coverage-151221-1753351129816-0.json +0 -1
- package/coverage/tmp/coverage-151233-1753351129803-0.json +0 -1
- package/coverage/tmp/coverage-151240-1753351129770-0.json +0 -1
- package/coverage/tmp/coverage-151307-1753351220058-0.json +0 -1
- package/coverage/tmp/coverage-151319-1753351220044-0.json +0 -1
- package/coverage/tmp/coverage-151326-1753351220010-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-02-05.log +0 -23
- package/test/api/core/test-log-2025-05-21.log +0 -15
- package/test/api/core/test-log-2025-06-25.log +0 -9
- package/test/api/core/test-log-2025-07-24.log +0 -44
- package/test/api/map/test-log-2025-05-27.log +0 -13
- package/test/api/map/test-log-2025-06-23.log +0 -7
- package/test/api/map/test-log-2025-07-24.log +0 -11
- 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
|
@@ -11,8 +11,10 @@ import logger from 'loglevel'
|
|
|
11
11
|
import centroid from '@turf/centroid'
|
|
12
12
|
import Papa from 'papaparse'
|
|
13
13
|
import { downloadAsBlob } from '../../../../core/client/utils'
|
|
14
|
+
import { Store } from '../../../../core/client/store'
|
|
14
15
|
import { Units } from '../../../../core/client/units'
|
|
15
16
|
import { Time } from '../../../../core/client/time'
|
|
17
|
+
import { Events } from '../../../../core/client/events'
|
|
16
18
|
import { KChart } from '../../../../core/client/components'
|
|
17
19
|
import { useCurrentActivity, useWeather, useMeasure, useHighlight } from '../../composables'
|
|
18
20
|
import 'chartjs-adapter-moment'
|
|
@@ -471,26 +473,26 @@ export default {
|
|
|
471
473
|
},
|
|
472
474
|
async mounted () {
|
|
473
475
|
// Initialize the time range
|
|
474
|
-
const span =
|
|
476
|
+
const span = Store.get('timeseries.span')
|
|
475
477
|
const start = moment(Time.getCurrentTime()).subtract(span, 'm')
|
|
476
478
|
const end = moment(Time.getCurrentTime()).add(span, 'm')
|
|
477
479
|
Time.patchRange({ start, end })
|
|
478
480
|
// Force a first refresh
|
|
479
481
|
await this.refresh()
|
|
480
482
|
// Then setup listeners
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
483
|
+
Events.on('time-current-time-changed', this.refresh)
|
|
484
|
+
Events.on('time-range-changed', this.refresh)
|
|
485
|
+
Events.on('time-format-changed', this.refresh)
|
|
486
|
+
Events.on('timeseries-span-changed', this.refresh)
|
|
485
487
|
this.kActivity.$engineEvents.on('forecast-model-changed', this.refresh)
|
|
486
488
|
this.kActivity.$engineEvents.on('selected-level-changed', this.refresh)
|
|
487
489
|
},
|
|
488
490
|
beforeUnmount () {
|
|
489
491
|
// Release listeners
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
492
|
+
Events.off('time-current-time-changed', this.refresh)
|
|
493
|
+
Events.off('time-range-changed', this.refresh)
|
|
494
|
+
Events.off('time-format-changed', this.refresh)
|
|
495
|
+
Events.off('timeseries-span-changed', this.refresh)
|
|
494
496
|
this.kActivity.$engineEvents.off('forecast-model-changed', this.refresh)
|
|
495
497
|
this.kActivity.$engineEvents.off('selected-level-changed', this.refresh)
|
|
496
498
|
},
|
package/map/client/globe.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as composables from './composables/index.js'
|
|
1
2
|
import * as commonMixins from './mixins/index.js'
|
|
2
3
|
import * as globeMixins from './mixins/globe/index.js'
|
|
3
4
|
import * as hooks from './hooks/index.js'
|
|
@@ -11,6 +12,7 @@ export * from './planets.js'
|
|
|
11
12
|
export * from './navigator.js'
|
|
12
13
|
export { hooks }
|
|
13
14
|
export { utils }
|
|
15
|
+
export { composables }
|
|
14
16
|
export { mixins }
|
|
15
17
|
export * from '../common/index.js'
|
|
16
18
|
export * from './init.js'
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"LEGEND": "Legend",
|
|
13
13
|
"SELECTION_MANAGER": "Selection manager",
|
|
14
14
|
"STYLES_MANAGER": "Styles manager",
|
|
15
|
+
"TAGS_MANAGER": "Tags manager",
|
|
15
16
|
"TIME_SERIES": "Time series",
|
|
16
17
|
"POSITION": "Geographical coordinates",
|
|
17
18
|
"NORTH_ARROW": "North arrow",
|
|
@@ -33,14 +34,26 @@
|
|
|
33
34
|
"INVALID_GEOJSON_FILE": "{file} is not a valid GeoJSON file",
|
|
34
35
|
"INVALID_GEOJSON_CRS": "{file} has an unsupported Coordinates Reference System (CRS)",
|
|
35
36
|
"INVALID_GPX_FILE": "{file} is not a valid GPX file",
|
|
36
|
-
"INVALID_KML_FILE": "{file} is not a valid KML file"
|
|
37
|
+
"INVALID_KML_FILE": "{file} is not a valid KML file",
|
|
38
|
+
"GEOMETRY_ERROR": "<b>{total}</b> topology validation errors",
|
|
39
|
+
"GEOMETRY_REPEATED_POINT": "<b>{total}</b> errors of <b>repeated points</b>",
|
|
40
|
+
"GEOMETRY_HOLE_OUTSIDE_SHELL": "<b>{total}</b> errors of <b>holes outside shell</b>",
|
|
41
|
+
"GEOMETRY_NESTED_HOLES": "<b>{total}</b> errors of <b>nested holes</b>",
|
|
42
|
+
"GEOMETRY_DISCONNECTED_INTERIOR": "<b>{total}</b> errors of <b>disconnected interiors</b>",
|
|
43
|
+
"GEOMETRY_SELF_INTERSECTION": "<b>{total}</b> errors of <b>self-intersection</b>",
|
|
44
|
+
"GEOMETRY_RING_SELF_INTERSECTION": "<b>{total}</b> errors of <b>ring self-intersection</b>",
|
|
45
|
+
"GEOMETRY_NESTED_SHELLS": "<b>{total}</b> errors of <b>nested shells</b>",
|
|
46
|
+
"GEOMETRY_DUPLICATE_RINGS": "<b>{total}</b> errors of <b>duplicate rings</b>",
|
|
47
|
+
"GEOMETRY_TOO_FEW_POINTS": "<b>{total}</b> errors of <b>too few distinct points in geometry component</b>",
|
|
48
|
+
"GEOMETRY_INVALID_COORDINATES": "<b>{total}</b> errors of <b>invalid coordinates</b>",
|
|
49
|
+
"GEOMETRY_RING_NOT_CLOSED": "<b>{total}</b> errors of <b>ring not closed</b>"
|
|
37
50
|
},
|
|
38
51
|
"utils": {
|
|
39
52
|
"layers": {
|
|
40
53
|
"INVALID_FEATURES_DIALOG_TITLE": "Invalid elements",
|
|
41
|
-
"INVALID_FEATURES_DIALOG_MESSAGE": "Your layer contains {total} elements with invalid geometry
|
|
42
|
-
"
|
|
43
|
-
"
|
|
54
|
+
"INVALID_FEATURES_DIALOG_MESSAGE": "Your layer contains {total} elements with invalid geometry. As a consequence they will be removed prior to saving.",
|
|
55
|
+
"INVALID_FEATURES_LIST_ERRORS": "<div class='text-subtitle2 q-mt-xs'>Liste des erreurs : </div><ul class='q-ma-none q-pl-lg'>{errors}</ul>",
|
|
56
|
+
"INVALID_FEATURES_LIST_FEATURES": " sur les éléments: ",
|
|
44
57
|
"SAVING_LABEL": "Please wait while saving layer data,</br>processed {processed} over {total} features",
|
|
45
58
|
"SAVE_DIALOG_TITLE": "Tiling layer {layer}",
|
|
46
59
|
"SAVE_DIALOG_MESSAGE": "Your layer contains too much elements and has been optimized to be smoothly displayed.</br>As a consequence, it will only be visible at a local scale from a given zoom level.",
|
|
@@ -79,6 +92,8 @@
|
|
|
79
92
|
"ZOOM_TO_LABEL": "Zoom to",
|
|
80
93
|
"ZOOM_IN": "Zoom in",
|
|
81
94
|
"ZOOM_OUT": "Zoom out",
|
|
95
|
+
"BRING_TO_FRONT_LABEL": "Display on top",
|
|
96
|
+
"BRING_TO_BACK_LABEL": "Display at bottom",
|
|
82
97
|
"TOGGLE_CATALOG": "Catalog",
|
|
83
98
|
"TOGGLE_MAP": "View in 2D",
|
|
84
99
|
"TOGGLE_GLOBE": "View in 3D",
|
|
@@ -272,6 +287,7 @@
|
|
|
272
287
|
"GEOLOCATE_LABEL": "Recenter the map on your location and display it using this button.",
|
|
273
288
|
"SEARCH_LOCATION_LABEL": "Seek for an address using this button.",
|
|
274
289
|
"LOCATION_SEARCHING_LABEL": "Type part of your address and select among the proposed locations to center the map on.",
|
|
290
|
+
"LOCATION_BACK_LABEL": "Close the coordinates widget by clicking this button.",
|
|
275
291
|
"SEARCH_BACK_LABEL": "Then stop searching by going back to the actions.",
|
|
276
292
|
"TOOLS_LABEL": "Select among available tools using this button.",
|
|
277
293
|
"TRACK_LOCATION_LABEL": "Display the coordinates of a location using this button.",
|
|
@@ -294,7 +310,8 @@
|
|
|
294
310
|
"MEASURE_BACK_LABEL": "Then stop measuring by going back to the actions.",
|
|
295
311
|
"TOGGLE_VR_LABEL": "Switch to Virtual Reality (VR) mode with this button.",
|
|
296
312
|
"TOGGLE_FULLSCREEN_LABEL": "Switch to fullscreen mode with this button.",
|
|
297
|
-
"TOGGLE_CATALOG_LABEL": "Open the catalog with this button."
|
|
313
|
+
"TOGGLE_CATALOG_LABEL": "Open the catalog with this button.",
|
|
314
|
+
"NORTH_ARROW_LABEL": "Display or hide the north arrow using this button."
|
|
298
315
|
},
|
|
299
316
|
"catalog-panel": {
|
|
300
317
|
"CATALOG_LABEL": "The <b>catalog</b> allows to manage data displayed on your map.<br/>The catalogd is divided into 3 different tabs.",
|
|
@@ -581,10 +598,13 @@
|
|
|
581
598
|
"INFOBOX": "Information box",
|
|
582
599
|
"ADD_INFOBOX": "Select target properties to use as information box"
|
|
583
600
|
},
|
|
584
|
-
"
|
|
601
|
+
"KLayersList": {
|
|
585
602
|
"NO_LAYER_AVAILABLE": "No layer available",
|
|
586
603
|
"LAYER_DISABLED": "Zoom in to visualise this layer"
|
|
587
604
|
},
|
|
605
|
+
"KLayersSelector": {
|
|
606
|
+
"SELECT_LAYERS": "Select layers"
|
|
607
|
+
},
|
|
588
608
|
"KWeatherLayersSelector": {
|
|
589
609
|
"FORECASTS_LABEL": "Forecasts",
|
|
590
610
|
"ARCHIVES_LABEL": "Archives",
|
|
@@ -637,7 +657,8 @@
|
|
|
637
657
|
"DESCRIPTION_FIELD_LABEL": "@:KAddLayer.DESCRIPTION_FIELD_LABEL",
|
|
638
658
|
"FEATURE_ID_FIELD_LABEL": "@:KAddLayer.FEATURE_ID_FIELD_LABEL",
|
|
639
659
|
"CATEGORY_FIELD_LABEL": "@:KAddLayer.CATEGORY_FIELD_LABEL",
|
|
640
|
-
"IMPORT_BUTTON": "Import"
|
|
660
|
+
"IMPORT_BUTTON": "Import",
|
|
661
|
+
"LAYER_ALREADY_EXISTS": "Layer {layer} already exists !"
|
|
641
662
|
},
|
|
642
663
|
"KConnectLayer": {
|
|
643
664
|
"SERVICE_FIELD_LABEL": "Select or enter a query to get the capabilities of the remote service",
|
|
@@ -750,6 +771,7 @@
|
|
|
750
771
|
"POINT_SECTION": "Point",
|
|
751
772
|
"LINE_SECTION": "Line",
|
|
752
773
|
"POLYGON_SECTION": "Polygon",
|
|
774
|
+
"ALL_SECTIONS_DISABLED": "Unable to apply this style because all types of features are disabled.",
|
|
753
775
|
"STROKE_GROUP": "Stroke",
|
|
754
776
|
"ICON_GROUP": "Icon",
|
|
755
777
|
"COLOR": "Color",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"LEGEND": "Légende",
|
|
13
13
|
"SELECTION_MANAGER": "Gestionnaire de sélection",
|
|
14
14
|
"STYLES_MANAGER": "Gestionnaires de styles",
|
|
15
|
+
"TAGS_MANAGER": "Gestionnaire d'étiquettes",
|
|
15
16
|
"TIME_SERIES": "Series temporelles",
|
|
16
17
|
"POSITION": "Coordonnées géographiques",
|
|
17
18
|
"NORTH_ARROW": "Flèche nord",
|
|
@@ -33,14 +34,26 @@
|
|
|
33
34
|
"INVALID_GEOJSON_FILE": "{file} n'est pas un fichier GeoJSON valide",
|
|
34
35
|
"INVALID_GEOJSON_CRS": "{file} a un système de coordonnées (CRS) non supporté",
|
|
35
36
|
"INVALID_GPX_FILE": "{file} n'est pas un fichier GPX valide",
|
|
36
|
-
"INVALID_KML_FILE": "{file} n'est pas un fichier KML valide"
|
|
37
|
+
"INVALID_KML_FILE": "{file} n'est pas un fichier KML valide",
|
|
38
|
+
"GEOMETRY_ERROR": "<b>{total}</b> erreurs de validation de la topologie",
|
|
39
|
+
"GEOMETRY_REPEATED_POINT": "<b>{total}</b> erreurs de <b>points répétés</b>",
|
|
40
|
+
"GEOMETRY_HOLE_OUTSIDE_SHELL": "<b>{total}</b> erreurs de <b>trous à l'extérieur de la coquille</b>",
|
|
41
|
+
"GEOMETRY_NESTED_HOLES": "<b>{total}</b> erreurs de <b>trous imbriqués</b>",
|
|
42
|
+
"GEOMETRY_DISCONNECTED_INTERIOR": "<b>{total}</b> erreurs d'<b>intérieurs déconnectés</b>",
|
|
43
|
+
"GEOMETRY_SELF_INTERSECTION": "<b>{total}</b> erreurs d'<b>auto-intersection</b>",
|
|
44
|
+
"GEOMETRY_RING_SELF_INTERSECTION": "<b>{total}</b> erreurs d'<b>auto-intersection de l'anneau</b>",
|
|
45
|
+
"GEOMETRY_NESTED_SHELLS": "<b>{total}</b> erreurs de <b>coquilles imbriquées</b>",
|
|
46
|
+
"GEOMETRY_DUPLICATE_RINGS": "<b>{total}</b> erreurs d'<b>anneaux dupliqués</b>",
|
|
47
|
+
"GEOMETRY_TOO_FEW_POINTS": "<b>{total}</b> erreurs de <b>manque de points distincts</b>",
|
|
48
|
+
"GEOMETRY_INVALID_COORDINATES": "<b>{total}</b> erreurs de <b>coordonnées invalides</b>",
|
|
49
|
+
"GEOMETRY_RING_NOT_CLOSED": "<b>{total}</b> erreurs d'<b>anneaux non fermés</b>"
|
|
37
50
|
},
|
|
38
51
|
"utils": {
|
|
39
52
|
"layers": {
|
|
40
53
|
"INVALID_FEATURES_DIALOG_TITLE": "Elements invalides",
|
|
41
|
-
"INVALID_FEATURES_DIALOG_MESSAGE": "Votre couche comporte {total} éléments dont la géométrie est invalide
|
|
42
|
-
"
|
|
43
|
-
"
|
|
54
|
+
"INVALID_FEATURES_DIALOG_MESSAGE": "Votre couche comporte {total} éléments dont la géométrie est invalide. En conséquence ces éléments seront supprimés avant la sauvegarde.",
|
|
55
|
+
"INVALID_FEATURES_LIST_ERRORS": "<div class='text-subtitle2 q-mt-xs'>Liste des erreurs : </div><ul class='q-ma-none q-pl-lg'>{errors}</ul>",
|
|
56
|
+
"INVALID_FEATURES_LIST_FEATURES": " sur les éléments: ",
|
|
44
57
|
"SAVING_LABEL": "Veuillez patienter pendant l'enregistrement des données,</br>{processed} éléments traités sur {total}",
|
|
45
58
|
"SAVE_DIALOG_TITLE": "Tuilage de la couche {layer}",
|
|
46
59
|
"SAVE_DIALOG_MESSAGE": "Votre couche comportant de trop nombreux éléments a été optimisée pour un affichage fluide.</br>En conséquence elle ne sera visible qu'à une échelle locale à partir d'un certain niveau de zoom.",
|
|
@@ -79,6 +92,8 @@
|
|
|
79
92
|
"ZOOM_TO_LABEL": "Zoomer sur",
|
|
80
93
|
"ZOOM_IN": "Zoomer",
|
|
81
94
|
"ZOOM_OUT": "Dézoomer",
|
|
95
|
+
"BRING_TO_FRONT_LABEL": "Afficher à l'avant",
|
|
96
|
+
"BRING_TO_BACK_LABEL": "Afficher à l'arrière",
|
|
82
97
|
"TOGGLE_CATALOG": "Catalogue",
|
|
83
98
|
"TOGGLE_MAP": "Visualiser en 2D",
|
|
84
99
|
"TOGGLE_GLOBE": "Visualiser en 3D",
|
|
@@ -272,6 +287,7 @@
|
|
|
272
287
|
"GEOLOCATE_LABEL": "Recentrez la carte sur <b>votre position</b> et affichez là avec ce bouton.",
|
|
273
288
|
"SEARCH_LOCATION_LABEL": "Recherchez une <b>adresse</b> via ce bouton.",
|
|
274
289
|
"LOCATION_SEARCHING_LABEL": "Tapez tout ou partie de votre adresse puis sélectionnez parmi les propositions pour recentrer la carte.",
|
|
290
|
+
"LOCATION_BACK_LABEL": "Fermez l'affichage des coordonnées via ce bouton.",
|
|
275
291
|
"SEARCH_BACK_LABEL": "Arrêtez la recherche en retournant aux actions.",
|
|
276
292
|
"TOOLS_LABEL": "Sélectionnez un outil parmi ceux disponibles via ce bouton.",
|
|
277
293
|
"TRACK_LOCATION_LABEL": "Affichez les coordonnées d'une position via ce bouton.",
|
|
@@ -294,7 +310,8 @@
|
|
|
294
310
|
"MEASURE_BACK_LABEL": "Arrêtez de mesurer en retournant aux actions.",
|
|
295
311
|
"TOGGLE_VR_LABEL": "Basculez en mode <b>Réalité Virtuelle</b> (VR) avec ce bouton.",
|
|
296
312
|
"TOGGLE_FULLSCREEN_LABEL": "Basculez en mode plein écran avec ce bouton.",
|
|
297
|
-
"TOGGLE_CATALOG_LABEL": "Ouvrez le <b>catalogue</b> avec ce bouton."
|
|
313
|
+
"TOGGLE_CATALOG_LABEL": "Ouvrez le <b>catalogue</b> avec ce bouton.",
|
|
314
|
+
"NORTH_ARROW_LABEL": "Affichez ou cachez la flèche nord avec ce bouton."
|
|
298
315
|
},
|
|
299
316
|
"catalog-panel": {
|
|
300
317
|
"CATALOG_LABEL": "Le <b>catalogue</b> permet de gérer les données affichées sur votre carte.<br/>Le catalogue se décompose en 3 onglets.",
|
|
@@ -581,10 +598,13 @@
|
|
|
581
598
|
"INFOBOX": "Boîte d'information",
|
|
582
599
|
"ADD_INFOBOX": "Sélectionnez des propriétés à afficher dans la boîte"
|
|
583
600
|
},
|
|
584
|
-
"
|
|
601
|
+
"KLayersList": {
|
|
585
602
|
"NO_LAYER_AVAILABLE": "Aucune couche disponible",
|
|
586
603
|
"LAYER_DISABLED": "Zoomez davantage pour voir cette couche"
|
|
587
604
|
},
|
|
605
|
+
"KLayersSelector": {
|
|
606
|
+
"SELECT_LAYERS": "Sélectionnez des couches"
|
|
607
|
+
},
|
|
588
608
|
"KWeatherLayersSelector": {
|
|
589
609
|
"FORECASTS_LABEL": "Prévisions",
|
|
590
610
|
"ARCHIVES_LABEL": "Archives",
|
|
@@ -637,7 +657,8 @@
|
|
|
637
657
|
"DESCRIPTION_FIELD_LABEL": "@:KAddLayer.DESCRIPTION_FIELD_LABEL",
|
|
638
658
|
"FEATURE_ID_FIELD_LABEL": "@:KAddLayer.FEATURE_ID_FIELD_LABEL",
|
|
639
659
|
"CATEGORY_FIELD_LABEL": "@:KAddLayer.CATEGORY_FIELD_LABEL",
|
|
640
|
-
"IMPORT_BUTTON": "Importer"
|
|
660
|
+
"IMPORT_BUTTON": "Importer",
|
|
661
|
+
"LAYER_ALREADY_EXISTS": "La couche {layer} existe déjà !"
|
|
641
662
|
},
|
|
642
663
|
"KConnectLayer": {
|
|
643
664
|
"SERVICE_FIELD_LABEL": "Saisissez la requête pour récupérer les capacités du service distant",
|
|
@@ -750,6 +771,7 @@
|
|
|
750
771
|
"POINT_SECTION": "Point",
|
|
751
772
|
"LINE_SECTION": "Ligne",
|
|
752
773
|
"POLYGON_SECTION": "Polygone",
|
|
774
|
+
"ALL_SECTIONS_DISABLED": "Impossible d'appliquer ce style car tous les types de géométries sont désactivées.",
|
|
753
775
|
"STROKE_GROUP": "Contour",
|
|
754
776
|
"ICON_GROUP": "Icône",
|
|
755
777
|
"COLOR": "Couleur",
|
|
@@ -10,7 +10,7 @@ import 'leaflet-pixi-overlay'
|
|
|
10
10
|
// The svg points (inside the svg element) will be populated with coordinates in spherical mercator scaled between [0,1] on both x and y
|
|
11
11
|
// We do this to prevent numerical issues affecting rendering due to spherical mercator coordinates being huge numbers.
|
|
12
12
|
// The svg overlay will be placed in the map covering the bbox of the geojson
|
|
13
|
-
function
|
|
13
|
+
function buildSVGFromGradientPath (geojson)
|
|
14
14
|
{
|
|
15
15
|
const defs = [] // We'll push every linearGradient we need here
|
|
16
16
|
const lines = [] // and every line segment we need here
|
|
@@ -18,8 +18,12 @@ function buildSVGOverlayFromGradientPath (geojson, style)
|
|
|
18
18
|
const bbox = turfbbox(geojson)
|
|
19
19
|
// Grow the bbox a bit because we use it to position the svgOverlay. If it matches exaclty
|
|
20
20
|
// it'll crop the svg lines when using a big stroke-width, they'll exceed the geojson bbox ...
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
// TODO: we should use stroke width * extent it represent at zoom level 2 or 3 ...
|
|
22
|
+
let width = bbox[2] - bbox[0]
|
|
23
|
+
let height = bbox[3] - bbox[1]
|
|
24
|
+
// This is to handle single points
|
|
25
|
+
if (width === 0) width = 0.1
|
|
26
|
+
if (height === 0) height = 0.1
|
|
23
27
|
bbox[0] -= width * 0.1
|
|
24
28
|
bbox[1] -= height * 0.1
|
|
25
29
|
bbox[2] += width * 0.1
|
|
@@ -56,34 +60,62 @@ function buildSVGOverlayFromGradientPath (geojson, style)
|
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
// Create svg HTML element
|
|
59
|
-
var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg")
|
|
60
|
-
svgElement.setAttribute('xmlns', "http://www.w3.org/2000/svg")
|
|
63
|
+
var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg")
|
|
64
|
+
svgElement.setAttribute('xmlns', "http://www.w3.org/2000/svg")
|
|
61
65
|
// Viewbox is used to define which part of the svg must be displayed in it's html element, and is in svg coordinates.
|
|
62
66
|
// For us it's 0 0 scale.x scale.y since we rescaled everything
|
|
63
67
|
svgElement.setAttribute('viewBox', `0 0 ${scale.x} ${scale.y}`)
|
|
64
68
|
// svg html content, round linecap + stroke-width
|
|
65
69
|
svgElement.innerHTML = `<g stroke-linecap="round" stroke-width="${geojson.properties.weight}"><defs>${defs.join('')}</defs>${lines.join('')}</g>`
|
|
66
|
-
var svgElementBounds = [ [ bbox[1], bbox[0] ], [ bbox[3], bbox[2] ] ];
|
|
67
70
|
|
|
68
|
-
|
|
69
|
-
// We don't simply use the options.interactive constructor option since it also add 'leaflet-interactive' class
|
|
70
|
-
// on the svg html element and this requests 'pointer' cursor on the whole svg, even if there's nothing drawn.
|
|
71
|
-
// Instead we just declare the layer interactive for leaflet, without adding the 'leaflet-interactive' class.
|
|
72
|
-
// 'leaflet-interactive' is set in 'path' elements, which are actually rendered.
|
|
73
|
-
const SVGOverlayOverload = L.SVGOverlay.extend({
|
|
74
|
-
onAdd() {
|
|
75
|
-
L.SVGOverlay.prototype.onAdd.call(this)
|
|
76
|
-
this.addInteractiveTarget(this._image)
|
|
77
|
-
}
|
|
78
|
-
})
|
|
79
|
-
const layer = new SVGOverlayOverload(svgElement, svgElementBounds, { interactive: false })
|
|
80
|
-
const opacity = _.get(geojson.properties, 'opacity')
|
|
81
|
-
if (opacity !== undefined)
|
|
82
|
-
layer.setOpacity(opacity)
|
|
83
|
-
layer.getCenter = () => L.latLng((bbox[1]+bbox[3])/2,(bbox[0]+bbox[2])/2)
|
|
84
|
-
return layer
|
|
71
|
+
return { svg: svgElement, bounds: L.latLngBounds(L.latLng(bbox[1], bbox[0]), L.latLng(bbox[3], bbox[2])) }
|
|
85
72
|
}
|
|
86
73
|
|
|
74
|
+
const SVGGradientPath = L.SVGOverlay.extend({
|
|
75
|
+
initialize (geojson, options) {
|
|
76
|
+
const path = buildSVGFromGradientPath(geojson)
|
|
77
|
+
|
|
78
|
+
// We don't simply use the options.interactive constructor option since it also add 'leaflet-interactive' class
|
|
79
|
+
// on the svg html element and this requests 'pointer' cursor on the whole svg, even if there's nothing drawn.
|
|
80
|
+
// Instead we just declare the layer interactive for leaflet (see onAdd()), without adding the 'leaflet-interactive' class.
|
|
81
|
+
// 'leaflet-interactive' is set in 'path' elements of the svg element, which are actually rendered.
|
|
82
|
+
L.SVGOverlay.prototype.initialize.call(this, path.svg, path.bounds, Object.assign({ interactive: false }, options))
|
|
83
|
+
|
|
84
|
+
const opacity = _.get(geojson.properties, 'opacity')
|
|
85
|
+
if (opacity !== undefined)
|
|
86
|
+
this.setOpacity(opacity)
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
getCenter () {
|
|
90
|
+
return this._bounds.getCenter()
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
// This method is called when source data changes
|
|
94
|
+
setData (geojson) {
|
|
95
|
+
// Remove old svg
|
|
96
|
+
this.onRemove()
|
|
97
|
+
|
|
98
|
+
// Build new one
|
|
99
|
+
const path = buildSVGFromGradientPath(geojson)
|
|
100
|
+
// Mess with ImageOverlay and SVGOverlay internals to update element
|
|
101
|
+
this._url = path.svg
|
|
102
|
+
this._initImage()
|
|
103
|
+
this.setBounds(path.bounds)
|
|
104
|
+
const opacity = _.get(geojson.properties, 'opacity')
|
|
105
|
+
if (opacity !== undefined)
|
|
106
|
+
this.setOpacity(opacity)
|
|
107
|
+
|
|
108
|
+
// Add new svg
|
|
109
|
+
this.onAdd()
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
onAdd () {
|
|
113
|
+
L.SVGOverlay.prototype.onAdd.call(this)
|
|
114
|
+
// See constructor explanation
|
|
115
|
+
this.addInteractiveTarget(this._image)
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
|
|
87
119
|
const GradientPath = L.PixiOverlay.extend({
|
|
88
120
|
|
|
89
121
|
initialize (geoJson, options) {
|
|
@@ -254,7 +286,12 @@ const GradientPath = L.PixiOverlay.extend({
|
|
|
254
286
|
})
|
|
255
287
|
|
|
256
288
|
L.GradientPath = GradientPath
|
|
289
|
+
L.SVGGradientPath = SVGGradientPath
|
|
257
290
|
L.gradientPath = function (options) {
|
|
258
291
|
return new L.GradientPath(options)
|
|
259
292
|
}
|
|
260
|
-
|
|
293
|
+
L.svgGradientPath = function (options) {
|
|
294
|
+
return new L.SVGGradientPath(options)
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export { GradientPath, SVGGradientPath }
|
|
@@ -4,13 +4,12 @@ import L from 'leaflet'
|
|
|
4
4
|
import { utils as coreUtils } from '../../../core/client/index.js'
|
|
5
5
|
|
|
6
6
|
export const ShapeMarker = L.Marker.extend({
|
|
7
|
-
|
|
8
7
|
// Constructor
|
|
9
8
|
initialize (latlng, options) {
|
|
10
9
|
// Forward extra options for different purposes, i.e. clustering, panes, ...
|
|
11
10
|
const markerOptions = _.get(options, 'options', {})
|
|
12
|
-
// We allow to specify panes directly at root level
|
|
13
|
-
Object.assign(markerOptions, _.pick(options, ['
|
|
11
|
+
// We allow to specify some like panes directly at root level, eg when options are coming from a layer definition.
|
|
12
|
+
Object.assign(markerOptions, _.pick(options, ['interactive', 'draggable', 'pane', 'shadowPane']))
|
|
14
13
|
if (options.icon instanceof L.Icon) { // We allow to directly provide the icon
|
|
15
14
|
L.Marker.prototype.initialize.call(this, latlng, {
|
|
16
15
|
icon: options.icon,
|
|
@@ -33,9 +32,7 @@ export const ShapeMarker = L.Marker.extend({
|
|
|
33
32
|
logger.warn(`[KDK] unable to create the shape with the options: ${options}` )
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
|
-
|
|
37
35
|
},
|
|
38
|
-
|
|
39
36
|
getAnchor (position, size) {
|
|
40
37
|
if (position === 'top-left') return [0, 0]
|
|
41
38
|
if (position === 'top-center') return [size.width / 2, 0]
|
|
@@ -47,5 +44,15 @@ export const ShapeMarker = L.Marker.extend({
|
|
|
47
44
|
if (position === 'bottom-center') return [size.width / 2, size.height]
|
|
48
45
|
if (position === 'bottom-right') return [size.width, size.height]
|
|
49
46
|
return [size.width / 2, size.height / 2]
|
|
47
|
+
},
|
|
48
|
+
// Additional missing features
|
|
49
|
+
bringToFront() {
|
|
50
|
+
if (this._icon) L.DomUtil.toFront(this._icon)
|
|
51
|
+
if (this._shadow) L.DomUtil.toFront(this._shadow)
|
|
52
|
+
},
|
|
53
|
+
bringToBack() {
|
|
54
|
+
// See comment in bringToFront().
|
|
55
|
+
if (this._icon) L.DomUtil.toBack(this._icon)
|
|
56
|
+
if (this._shadow) L.DomUtil.toBack(this._shadow)
|
|
50
57
|
}
|
|
51
58
|
})
|
|
@@ -191,7 +191,7 @@ const TiledMeshLayer = L.GridLayer.extend({
|
|
|
191
191
|
if (!mesh) return
|
|
192
192
|
|
|
193
193
|
mesh.zoomLevel = event.coords.z
|
|
194
|
-
mesh.visible =
|
|
194
|
+
mesh.visible = mesh.zoomLevel === Math.round(this._map.getZoom())
|
|
195
195
|
this.pixiRoot.addChild(mesh)
|
|
196
196
|
|
|
197
197
|
if (this.conf.render.showWireframe) {
|
|
@@ -237,7 +237,7 @@ const TiledMeshLayer = L.GridLayer.extend({
|
|
|
237
237
|
// zoom level 'n' tiles are still visible
|
|
238
238
|
// and zoom level 'n+1' are being loaded on top of them
|
|
239
239
|
// when alpha blending is used, this is annoying
|
|
240
|
-
const zoomLevel = this._map.getZoom()
|
|
240
|
+
const zoomLevel = Math.round(this._map.getZoom())
|
|
241
241
|
for (const child of this.pixiRoot.children) {
|
|
242
242
|
if (child.zoomLevel === zoomLevel) child.visible = false
|
|
243
243
|
}
|
|
@@ -249,7 +249,7 @@ const TiledMeshLayer = L.GridLayer.extend({
|
|
|
249
249
|
// on zoomstart event
|
|
250
250
|
// this is important when quickly zoomin in and out
|
|
251
251
|
// because some meshes may not have been evicted yet
|
|
252
|
-
const zoomLevel = this._map.getZoom()
|
|
252
|
+
const zoomLevel = Math.round(this._map.getZoom())
|
|
253
253
|
for (const child of this.pixiRoot.children) {
|
|
254
254
|
if (child.zoomLevel === zoomLevel) child.visible = true
|
|
255
255
|
}
|
|
@@ -1,23 +1,83 @@
|
|
|
1
1
|
import L from 'leaflet'
|
|
2
2
|
import _ from 'lodash'
|
|
3
3
|
import 'leaflet-realtime'
|
|
4
|
+
import 'leaflet.markercluster/dist/MarkerCluster.css'
|
|
5
|
+
import 'leaflet.markercluster/dist/MarkerCluster.Default.css'
|
|
6
|
+
import 'leaflet.markercluster'
|
|
4
7
|
import { lineOffset } from '@turf/turf'
|
|
5
|
-
import { GradientPath,
|
|
8
|
+
import { GradientPath, SVGGradientPath } from '../GradientPath.js'
|
|
9
|
+
import { MaskLayer } from '../MaskLayer.js'
|
|
10
|
+
|
|
11
|
+
// FIXME: Not sure why but using lodash _.values() function in Leaflet Realtime layer object does not work,
|
|
12
|
+
// possibly due to some internal complex objects ?
|
|
13
|
+
function getObjectValues(object) {
|
|
14
|
+
const values = []
|
|
15
|
+
const keys = Object.keys(object)
|
|
16
|
+
keys.forEach(key => values.push(object[key]))
|
|
17
|
+
return values
|
|
18
|
+
}
|
|
6
19
|
|
|
7
|
-
// Override default remove handler for leaflet-realtime due to
|
|
8
|
-
// https://github.com/perliedman/leaflet-realtime/issues/177
|
|
9
20
|
const Realtime = L.Realtime.extend({
|
|
10
|
-
remove
|
|
21
|
+
// Override default remove handler for leaflet-realtime due to
|
|
22
|
+
// https://github.com/perliedman/leaflet-realtime/issues/177
|
|
23
|
+
remove(geojson) {
|
|
11
24
|
if (typeof geojson === 'undefined') {
|
|
12
25
|
return L.Layer.prototype.remove.call(this)
|
|
13
26
|
} else {
|
|
14
27
|
return L.Realtime.prototype.remove.call(this, geojson)
|
|
15
28
|
}
|
|
29
|
+
},
|
|
30
|
+
// Add FeatureGroup interface so that layer edition works as well
|
|
31
|
+
toGeoJSON() {
|
|
32
|
+
return { type: 'FeatureCollection', features: getObjectValues(this._features) }
|
|
33
|
+
},
|
|
34
|
+
clearLayers() {
|
|
35
|
+
this._onNewData(true, { type: 'FeatureCollection', features: [] })
|
|
36
|
+
},
|
|
37
|
+
getLayers() {
|
|
38
|
+
return getObjectValues(this._featureLayers)
|
|
39
|
+
},
|
|
40
|
+
addLayer(geoJsonLayer) {
|
|
41
|
+
this._onNewData(false, geoJsonLayer.toGeoJSON())
|
|
42
|
+
},
|
|
43
|
+
removeLayer(geoJsonLayer) {
|
|
44
|
+
this.remove(geoJsonLayer.toGeoJSON())
|
|
45
|
+
},
|
|
46
|
+
// Additional missing features
|
|
47
|
+
bringToFront() {
|
|
48
|
+
// If we get a custom pane we need to push it front to make it on top of others with the same z-index.
|
|
49
|
+
// Otherwise pushing container to front only in the parent pane will not have any effect on layers in others panes like the global default one.
|
|
50
|
+
if (this.options.pane !== 'overlayPane') {
|
|
51
|
+
L.DomUtil.toFront(this.getPane(this.options.pane))
|
|
52
|
+
} else if (this._container) { // Pushing container to front in the parent pane when its the global default one will be sufficient
|
|
53
|
+
this._container.bringToFront()
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
bringToBack() {
|
|
57
|
+
// See comments in bringToFront().
|
|
58
|
+
if (this.options.pane !== 'overlayPane') {
|
|
59
|
+
L.DomUtil.toBack(this.getPane(this.options.pane))
|
|
60
|
+
} else if (this._container) {
|
|
61
|
+
this._container.bringToBack()
|
|
62
|
+
}
|
|
16
63
|
}
|
|
17
64
|
})
|
|
18
65
|
L.realtime = function (src, options) {
|
|
19
66
|
return new Realtime(src, options)
|
|
20
67
|
}
|
|
68
|
+
const MarkerClusterGroup = L.MarkerClusterGroup.extend({
|
|
69
|
+
// Override invoke as used by eg bringToFront/bringToBack
|
|
70
|
+
invoke(methodName, ...args) {
|
|
71
|
+
L.MarkerClusterGroup.prototype.invoke.call(this, methodName, args)
|
|
72
|
+
this._featureGroup.invoke(methodName, args)
|
|
73
|
+
this._nonPointGroup.invoke(methodName, args)
|
|
74
|
+
return this
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
L.markerClusterGroup = function (options) {
|
|
78
|
+
return new MarkerClusterGroup(options)
|
|
79
|
+
}
|
|
80
|
+
|
|
21
81
|
// Override default Polyline simplify function to manage offset
|
|
22
82
|
const simplifyPoints = L.Polyline.prototype._simplifyPoints
|
|
23
83
|
L.Polyline.include({
|
|
@@ -63,10 +123,8 @@ L.GeoJSON.geometryToLayer = function (geojson, options) {
|
|
|
63
123
|
}
|
|
64
124
|
}
|
|
65
125
|
if (geometry && properties && properties.gradient) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return properties.svg ? buildSVGOverlayFromGradientPath(geojson, style) : new GradientPath(geojson, style)
|
|
69
|
-
}
|
|
126
|
+
const style = options.style(geojson)
|
|
127
|
+
return properties.svg ? new SVGGradientPath(geojson, style) : new GradientPath(geojson, style)
|
|
70
128
|
}
|
|
71
129
|
if (geometry && properties && properties.mask) {
|
|
72
130
|
if (geometry.type === 'Polygon' || geometry.type === 'MultiPolygon') {
|
|
@@ -126,7 +126,9 @@ export function createMarkerFromPointStyle (latlng, style) {
|
|
|
126
126
|
logger.warn(`[KDK] 'latlng' should be defined`)
|
|
127
127
|
return
|
|
128
128
|
}
|
|
129
|
-
|
|
129
|
+
const shape = _.get(style, 'shape', 'circle')
|
|
130
|
+
if (shape === 'none' || _.has(kdkCoreUtils.Shapes, shape)) return L.shapeMarker(latlng, style)
|
|
131
|
+
return L[shape](latlng, style)
|
|
130
132
|
}
|
|
131
133
|
|
|
132
134
|
export function convertLineStyleToLeafletPath (style) {
|
|
@@ -147,12 +149,12 @@ export function convertPolygonStyleToLeafletPath (style) {
|
|
|
147
149
|
return leafletStyle
|
|
148
150
|
}
|
|
149
151
|
|
|
150
|
-
function processStyle (style, feature, options, mappings) {
|
|
152
|
+
function processStyle (style, feature, options, mappings, zoom) {
|
|
151
153
|
if (!options) return
|
|
152
154
|
const leafletOptions = options.leaflet || options
|
|
153
155
|
// We allow to template style properties according to feature,
|
|
154
156
|
// because it can be slow you have to specify a subset of properties
|
|
155
|
-
const context = Object.assign({ properties: feature.properties, feature, chroma, moment, Units, Time }, TemplateContext.get())
|
|
157
|
+
const context = Object.assign({ properties: feature.properties, feature, zoom, chroma, moment, Units, Time }, TemplateContext.get())
|
|
156
158
|
if (leafletOptions.template) {
|
|
157
159
|
// Create the map of variables
|
|
158
160
|
if (options.variables) context.variables = _.reduce(options.variables,
|
|
@@ -180,29 +182,26 @@ function processStyle (style, feature, options, mappings) {
|
|
|
180
182
|
return style
|
|
181
183
|
}
|
|
182
184
|
|
|
183
|
-
export function getDefaultPointStyle (feature, options,
|
|
184
|
-
const engineStyle = _.get(engine, engineStylePath, {})
|
|
185
|
+
export function getDefaultPointStyle (feature, options, engineStyle = {}, zoom) {
|
|
185
186
|
const layerStyle = options ? _.get(options.leaflet || options, 'layerPointStyle') : {}
|
|
186
|
-
const templateStyle = processStyle({ style: { point: _.merge({}, engineStyle, layerStyle) } }, feature, options, PointStyleTemplateMappings)
|
|
187
|
-
const featureStyle = feature.style ? _.get(feature, 'style', {}) : convertSimpleStyleToPointStyle(feature.properties)
|
|
187
|
+
const templateStyle = processStyle({ style: { point: _.merge({}, engineStyle, layerStyle) } }, feature, options, PointStyleTemplateMappings, zoom)
|
|
188
|
+
const featureStyle = _.get(options, 'ignoreFeatureStyle') ? {} : feature.style ? _.get(feature, 'style', {}) : convertSimpleStyleToPointStyle(feature.properties)
|
|
188
189
|
const style = _.merge({}, engineStyle, layerStyle, templateStyle ? templateStyle.style.point : {}, featureStyle)
|
|
189
190
|
return style
|
|
190
191
|
}
|
|
191
192
|
|
|
192
|
-
export function getDefaultLineStyle (feature, options,
|
|
193
|
-
const engineStyle = _.get(engine, engineStylePath, {})
|
|
193
|
+
export function getDefaultLineStyle (feature, options, engineStyle = {}, zoom) {
|
|
194
194
|
const layerStyle = options ? _.get(options.leaflet || options, 'layerLineStyle') : {}
|
|
195
|
-
const templateStyle = processStyle({ style: { line: _.merge({}, engineStyle, layerStyle) } }, feature, options, LineStyleTemplateMappings)
|
|
196
|
-
const featureStyle = feature.style ? _.get(feature, 'style', {}) : convertSimpleStyleToLineStyle(feature.properties)
|
|
195
|
+
const templateStyle = processStyle({ style: { line: _.merge({}, engineStyle, layerStyle) } }, feature, options, LineStyleTemplateMappings, zoom)
|
|
196
|
+
const featureStyle = _.get(options, 'ignoreFeatureStyle') ? {} : feature.style ? _.get(feature, 'style', {}) : convertSimpleStyleToLineStyle(feature.properties)
|
|
197
197
|
const style = _.merge({}, engineStyle, layerStyle, templateStyle ? templateStyle.style.line : {}, featureStyle)
|
|
198
198
|
return convertLineStyleToLeafletPath(style)
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
export function getDefaultPolygonStyle (feature, options,
|
|
202
|
-
const engineStyle = _.get(engine, engineStylePath, {})
|
|
201
|
+
export function getDefaultPolygonStyle (feature, options, engineStyle = {}, zoom) {
|
|
203
202
|
const layerStyle = options ? _.get(options.leaflet || options, 'layerPolygonStyle') : {}
|
|
204
|
-
const templateStyle = processStyle({ style: { polygon: _.merge({}, engineStyle, layerStyle) } }, feature, options, PolygonStyleTemplateMappings)
|
|
205
|
-
const featureStyle = feature.style ? _.get(feature, 'style', {}) : convertSimpleStyleToPolygonStyle(feature.properties)
|
|
203
|
+
const templateStyle = processStyle({ style: { polygon: _.merge({}, engineStyle, layerStyle) } }, feature, options, PolygonStyleTemplateMappings, zoom)
|
|
204
|
+
const featureStyle = _.get(options, 'ignoreFeatureStyle') ? {} : feature.style ? _.get(feature, 'style', {}) : convertSimpleStyleToPolygonStyle(feature.properties)
|
|
206
205
|
const style = _.merge({}, engineStyle, layerStyle, templateStyle ? templateStyle.style.polygon : {}, featureStyle)
|
|
207
206
|
return convertPolygonStyleToLeafletPath(style)
|
|
208
207
|
}
|