geonetwork-ui 2.11.0-dev.e430b2fe8 → 2.11.0-dev.ec9587d24
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/fesm2022/geonetwork-ui.mjs +2034 -1177
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +384 -139
- package/index.d.ts.map +1 -1
- package/package.json +7 -5
- package/src/libs/api/metadata-converter/src/lib/dcat-ap/dcat-ap.converter.ts +2 -0
- package/src/libs/api/metadata-converter/src/lib/fixtures/mel.records.dataset+featurecatalog.ts +395 -0
- package/src/libs/api/metadata-converter/src/lib/gn4/gn4.field.mapper.ts +35 -8
- package/src/libs/api/metadata-converter/src/lib/gn4/types/metadata.model.ts +19 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/iso19115-3.converter.ts +17 -6
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/read-parts.ts +110 -0
- package/src/libs/api/metadata-converter/src/lib/iso19115-3/write-parts.ts +131 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/iso19139.converter.ts +9 -0
- package/src/libs/api/metadata-converter/src/lib/iso19139/read-parts.ts +2 -1
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +159 -54
- package/src/libs/api/repository/src/lib/gn4/gn4-repository.ts +79 -35
- package/src/libs/api/repository/src/lib/gn4/platform/gn4-platform.service.ts +11 -0
- package/src/libs/common/domain/src/lib/model/record/flags.model.ts +1 -0
- package/src/libs/common/domain/src/lib/model/record/index.ts +1 -0
- package/src/libs/common/domain/src/lib/model/record/metadata.model.ts +14 -18
- package/src/libs/common/domain/src/lib/model/search/aggregation.model.ts +2 -0
- package/src/libs/common/domain/src/lib/model/search/filter.model.ts +24 -2
- package/src/libs/common/domain/src/lib/platform.service.interface.ts +1 -0
- package/src/libs/common/domain/src/lib/repository/records-repository.interface.ts +20 -1
- package/src/libs/common/fixtures/src/lib/records.fixtures.ts +42 -62
- package/src/libs/feature/dataviz/src/lib/service/data.service.ts +32 -19
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-constraints/form-field-constraints.component.ts +3 -5
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-contacts/form-field-contacts.component.ts +2 -2
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-record-flags/form-field-record-flag-component.html +18 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field-record-flags/form-field-record-flag-component.ts +86 -0
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.html +100 -88
- package/src/libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.ts +11 -4
- package/src/libs/feature/editor/src/lib/components/record-form/record-form.component.ts +18 -4
- package/src/libs/feature/editor/src/lib/expressions.ts +67 -0
- package/src/libs/feature/editor/src/lib/fields.config.ts +13 -0
- package/src/libs/feature/editor/src/lib/models/editor-config.model.ts +10 -4
- package/src/libs/feature/map/src/index.ts +0 -2
- package/src/libs/feature/map/src/lib/add-layer-from-file/add-layer-from-file.component.html +1 -0
- package/src/libs/feature/map/src/lib/feature-map.module.ts +1 -8
- package/src/libs/feature/notifications/src/lib/notifications.service.ts +6 -4
- package/src/libs/feature/notify-reuse/src/lib/notify-reuse-form/notify-reuse-form.component.ts +8 -3
- package/src/libs/feature/record/src/lib/state/mdview.effects.ts +3 -1
- package/src/libs/feature/record/src/lib/state/mdview.facade.ts +1 -1
- package/src/libs/feature/router/src/lib/default/state/query-params.utils.ts +1 -1
- package/src/libs/feature/search/src/index.ts +2 -0
- package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.html +18 -4
- package/src/libs/feature/search/src/lib/filter-dropdown/filter-dropdown.component.ts +80 -19
- package/src/libs/feature/search/src/lib/geocoding/geocoding.service.ts +105 -0
- package/src/libs/feature/search/src/lib/location-search/location-search.component.html +18 -0
- package/src/libs/feature/search/src/lib/location-search/location-search.component.ts +114 -0
- package/src/libs/feature/search/src/lib/search-filters-summary-item/search-filters-summary-item.component.ts +19 -8
- package/src/libs/feature/search/src/lib/state/reducer.ts +1 -4
- package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +64 -4
- package/src/libs/feature/search/src/lib/utils/service/fields.ts +94 -10
- package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.html +3 -3
- package/src/libs/ui/elements/src/lib/record-feature-catalog/feature-catalog-list/feature-catalog-list.component.ts +2 -2
- package/src/libs/ui/elements/src/lib/service-capabilities/service-capabilities.component.ts +2 -1
- package/src/libs/ui/inputs/src/index.ts +2 -0
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.css +0 -4
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.html +12 -3
- package/src/libs/ui/inputs/src/lib/autocomplete/autocomplete.component.ts +11 -3
- package/src/libs/ui/inputs/src/lib/date-adapter.providers.ts +30 -0
- package/src/libs/ui/inputs/src/lib/date-picker/date-picker.component.ts +3 -24
- package/src/libs/ui/inputs/src/lib/date-range-dropdown/date-range-dropdown.component.css +37 -3
- package/src/libs/ui/inputs/src/lib/date-range-dropdown/date-range-dropdown.component.html +135 -16
- package/src/libs/ui/inputs/src/lib/date-range-dropdown/date-range-dropdown.component.ts +166 -29
- package/src/libs/ui/inputs/src/lib/date-range-picker/date-range-picker.component.ts +3 -7
- package/src/libs/ui/inputs/src/lib/drag-and-drop-file-input/drag-and-drop-file-input.component.css +1 -0
- package/src/libs/ui/inputs/src/lib/drag-and-drop-file-input/drag-and-drop-file-input.component.html +20 -7
- package/src/libs/ui/inputs/src/lib/drag-and-drop-file-input/drag-and-drop-file-input.component.ts +46 -5
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.html +7 -4
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.component.ts +12 -9
- package/src/libs/ui/inputs/src/lib/dropdown-multiselect/dropdown-multiselect.model.ts +2 -2
- package/src/libs/ui/inputs/src/lib/search-feature-catalog/search-feature-catalog.component.ts +2 -1
- package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.css +0 -0
- package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.html +117 -0
- package/src/libs/ui/inputs/src/lib/spatial-extent-dropdown/spatial-extent-dropdown.component.ts +244 -0
- package/src/libs/ui/layout/src/lib/block-list/block-list.component.css +1 -0
- package/src/libs/ui/map/src/lib/components/map-container/map-container.component.ts +2 -0
- package/src/libs/util/app-config/src/index.ts +1 -0
- package/src/libs/util/app-config/src/lib/app-config.ts +338 -247
- package/src/libs/util/app-config/src/lib/fixtures.ts +37 -1
- package/src/libs/util/app-config/src/lib/model.ts +42 -1
- package/src/libs/util/app-config/src/lib/parse-utils.ts +8 -4
- package/src/libs/util/shared/src/index.ts +1 -0
- package/src/libs/util/shared/src/lib/autofocus.directive.ts +26 -0
- package/src/libs/util/shared/src/lib/links/link-utils.ts +19 -10
- package/src/libs/util/shared/src/lib/services/date.service.ts +3 -3
- package/src/libs/util/shared/src/lib/utils/file.ts +15 -0
- package/src/libs/util/shared/src/lib/utils/geojson.ts +45 -10
- package/src/libs/util/shared/src/lib/utils/index.ts +1 -0
- package/tailwind.base.css +5 -0
- package/translations/de.json +28 -4
- package/translations/en.json +27 -3
- package/translations/es.json +26 -2
- package/translations/fr.json +32 -8
- package/translations/it.json +26 -2
- package/translations/nl.json +26 -2
- package/translations/pt.json +26 -2
- package/translations/sk.json +26 -2
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.html +0 -41
- package/src/libs/feature/map/src/lib/geocoding/geocoding.component.ts +0 -112
- package/src/libs/feature/map/src/lib/geocoding.service.ts +0 -57
- package/src/libs/feature/map/src/lib/style/index.ts +0 -2
- package/src/libs/feature/map/src/lib/style/map-style.fixtures.ts +0 -47
- package/src/libs/feature/map/src/lib/style/map-style.service.ts +0 -108
- /package/src/libs/feature/{map/src/lib/geocoding/geocoding.component.css → editor/src/lib/components/record-form/form-field/form-field-record-flags/form-field-record-flag-component.css} +0 -0
package/translations/fr.json
CHANGED
|
@@ -65,9 +65,10 @@
|
|
|
65
65
|
"dataset.error.restrictedAccess": "L’accès à cette ressource est restreint",
|
|
66
66
|
"dataset.error.unknown": "Les données ne peuvent être affichées: \"{ info }\"",
|
|
67
67
|
"dataset.error.unsupportedType": "Le type de contenu suivant n'est pas pris en charge: \"{ info }\"",
|
|
68
|
-
"daterange.filter.
|
|
68
|
+
"daterange.filter.datePlaceholder": "jj/mm/aaaa",
|
|
69
|
+
"daterange.filter.from": "À partir du",
|
|
69
70
|
"daterange.filter.period": "Choix de la période",
|
|
70
|
-
"daterange.filter.to": "
|
|
71
|
+
"daterange.filter.to": "Jusqu'au",
|
|
71
72
|
"domain.contact.role.author": "Auteur",
|
|
72
73
|
"domain.contact.role.collaborator": "Collaborateur",
|
|
73
74
|
"domain.contact.role.contributor": "Contributeur",
|
|
@@ -76,13 +77,13 @@
|
|
|
76
77
|
"domain.contact.role.editor": "Éditeur",
|
|
77
78
|
"domain.contact.role.funder": "Financeur",
|
|
78
79
|
"domain.contact.role.mediator": "Médiateur",
|
|
79
|
-
"domain.contact.role.originator": "
|
|
80
|
+
"domain.contact.role.originator": "Producteur",
|
|
80
81
|
"domain.contact.role.other": "Autre",
|
|
81
82
|
"domain.contact.role.owner": "Propriétaire",
|
|
82
83
|
"domain.contact.role.point_of_contact": "Point de contact",
|
|
83
|
-
"domain.contact.role.principal_investigator": "
|
|
84
|
-
"domain.contact.role.processor": "
|
|
85
|
-
"domain.contact.role.publisher": "
|
|
84
|
+
"domain.contact.role.principal_investigator": "Investigateur principal",
|
|
85
|
+
"domain.contact.role.processor": "Exécutant",
|
|
86
|
+
"domain.contact.role.publisher": "Editeur (publication)",
|
|
86
87
|
"domain.contact.role.resource_provider": "Fournisseur",
|
|
87
88
|
"domain.contact.role.rights_holder": "Détenteur des droits",
|
|
88
89
|
"domain.contact.role.sponsor": "Sponsor",
|
|
@@ -165,6 +166,8 @@
|
|
|
165
166
|
"editor.record.error.back": "Retour au catalogue",
|
|
166
167
|
"editor.record.error.explanation": "Vous n'avez peut être pas accès à cette fiche,<br>Ou ce lien n'est peut être pas valide.",
|
|
167
168
|
"editor.record.error.message": "Quelque chose ne s'est pas passé comme prévu",
|
|
169
|
+
"editor.record.flag.saveError.body": "{recordKind, select, dataset{Le jeu de données} service{Le service} reuse{La réutilisation} other{L'enregistrement}} n'a pas pu être modifié{recordKind, select, reuse{e} other{}} :",
|
|
170
|
+
"editor.record.flag.saveError.title": "Échec de la modification",
|
|
168
171
|
"editor.record.form.bottomButtons.comeBackLater": "Revenir plus tard",
|
|
169
172
|
"editor.record.form.bottomButtons.next": "Suivant",
|
|
170
173
|
"editor.record.form.bottomButtons.previous": "Précédent",
|
|
@@ -197,6 +200,8 @@
|
|
|
197
200
|
"editor.record.form.field.contacts.placeholder": "Choisissez un contact",
|
|
198
201
|
"editor.record.form.field.contactsForResource.noContact": "Veuillez renseigner au moins un point de contact responsable de la donnée.",
|
|
199
202
|
"editor.record.form.field.contactsForResource.placeholder": "Choisissez un contact",
|
|
203
|
+
"editor.record.form.field.flags.IS_REFERENCE_DATASET": "Donnée de référence",
|
|
204
|
+
"editor.record.form.field.hint.flags.IS_REFERENCE_DATASET": "Activer cette option fera de cette donnée une \"donnée de référence\". Elle sera mise en avant et présentée comme telle dans les résultats de recherche.",
|
|
200
205
|
"editor.record.form.field.keywords": "Mots-clés",
|
|
201
206
|
"editor.record.form.field.legalConstraints": "Contrainte légale",
|
|
202
207
|
"editor.record.form.field.license": "Licence",
|
|
@@ -371,7 +376,7 @@
|
|
|
371
376
|
"favorite.starToggle.add": "Ajouter aux favoris",
|
|
372
377
|
"favorite.starToggle.remove": "Retirer des favoris",
|
|
373
378
|
"feature.catalog.attribute.code": "Code",
|
|
374
|
-
"feature.catalog.attribute.
|
|
379
|
+
"feature.catalog.attribute.description": "Description",
|
|
375
380
|
"feature.catalog.attribute.name": "Nom",
|
|
376
381
|
"feature.catalog.attribute.type": "Type",
|
|
377
382
|
"feature.catalog.attribute.values": "Valeurs",
|
|
@@ -424,7 +429,6 @@
|
|
|
424
429
|
"map.add.layer.wms": "Depuis un service WMS",
|
|
425
430
|
"map.addFromFile.placeholder": "Cliquez ou déposez un fichier ici",
|
|
426
431
|
"map.dropdown.placeholder": "Aucune couche d'aperçu disponible",
|
|
427
|
-
"map.geocoding.placeholder": "Rechercher un lieu",
|
|
428
432
|
"map.help.addFromFile": "Cliquez ou glissez-déposez un fichier pour l'ajouter à la carte (supporte actuellement uniquement le format GeoJSON).",
|
|
429
433
|
"map.layer.add": "Ajouter",
|
|
430
434
|
"map.layers.available": "Couches disponibles",
|
|
@@ -658,6 +662,7 @@
|
|
|
658
662
|
"search.filters.changeDate": "Mise à jour",
|
|
659
663
|
"search.filters.clear": "Réinitialiser",
|
|
660
664
|
"search.filters.contact": "Contacts",
|
|
665
|
+
"search.filters.documentStandard": "Norme de document",
|
|
661
666
|
"search.filters.format": "Formats",
|
|
662
667
|
"search.filters.inspireKeyword": "Mot-clé INSPIRE",
|
|
663
668
|
"search.filters.isSpatial": "Données spatiales",
|
|
@@ -689,10 +694,29 @@
|
|
|
689
694
|
"search.filters.recordKind.reuse": "Réutilisations",
|
|
690
695
|
"search.filters.recordKind.service": "Services",
|
|
691
696
|
"search.filters.representationType": "Type de représentation",
|
|
697
|
+
"search.filters.resourceCreationRevisionDate": "Date de la ressource",
|
|
692
698
|
"search.filters.resourceType": "Type de ressource",
|
|
699
|
+
"search.filters.spatialExtent": "Étendue spatiale",
|
|
700
|
+
"search.filters.spatialExtent.bboxFromFile": "Étendue de {fileName}",
|
|
701
|
+
"search.filters.spatialExtent.bboxFromFileDelete": "Supprimer {fileName}",
|
|
702
|
+
"search.filters.spatialExtent.bboxFromLocation": "Étendue de {locationName}",
|
|
703
|
+
"search.filters.spatialExtent.bboxFromLocationDelete": "Supprimer {locationName}",
|
|
704
|
+
"search.filters.spatialExtent.bboxInitial": "Étendue présélectionnée",
|
|
705
|
+
"search.filters.spatialExtent.bboxInitialDelete": "Supprimer la sélection",
|
|
706
|
+
"search.filters.spatialExtent.error.fileTooLarge": "Le fichier dépasse la taille maximale autorisée ({maxSize} Mo)",
|
|
707
|
+
"search.filters.spatialExtent.error.invalidFormat": "Le fichier n'a pas pu être lu comme un GeoJSON valide",
|
|
708
|
+
"search.filters.spatialExtent.error.noGeometry": "Aucune géométrie n'a pu être trouvée dans le fichier",
|
|
709
|
+
"search.filters.spatialExtent.error.outOfBounds": "La géométrie du fichier GeoJSON n'est pas conforme ; soit certaines coordonnées sont hors limites ([-180, 180] pour la longitude et [-90, 90] pour la latitude), soit le fichier utilise des coordonnées projetées au lieu de la longitude et de la latitude.",
|
|
710
|
+
"search.filters.spatialExtent.error.title": "Erreur d'importation GeoJSON",
|
|
711
|
+
"search.filters.spatialExtent.helpText": "L'étendue de la géométrie sélectionnée sera utilisée",
|
|
712
|
+
"search.filters.spatialExtent.import": "Importer un GeoJSON",
|
|
713
|
+
"search.filters.spatialExtent.searchLocation": "Rechercher dans la liste",
|
|
693
714
|
"search.filters.standard": "Standard",
|
|
694
715
|
"search.filters.summaryLabel.changeDate": "Mise à jour : ",
|
|
716
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "Date de la ressource : ",
|
|
717
|
+
"search.filters.summaryLabel.temporalExtent": "Étendue temporelle : ",
|
|
695
718
|
"search.filters.summaryLabel.user": "Éditeur : ",
|
|
719
|
+
"search.filters.temporalExtent": "Étendue temporelle",
|
|
696
720
|
"search.filters.title": "Affiner votre recherche",
|
|
697
721
|
"search.filters.topic": "Thèmes",
|
|
698
722
|
"search.filters.useSpatialFilter": "Mettre en avant les ressources sur la zone d'intérêt",
|
package/translations/it.json
CHANGED
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"dataset.error.restrictedAccess": "L'accesso a questa risorsa è limitato",
|
|
66
66
|
"dataset.error.unknown": "Impossibile visualizzare i dati: \"{info}\"",
|
|
67
67
|
"dataset.error.unsupportedType": "Il seguente tipo di contenuto non è supportato: \"{info}\"",
|
|
68
|
+
"daterange.filter.datePlaceholder": "gg/mm/aaaa",
|
|
68
69
|
"daterange.filter.from": "",
|
|
69
70
|
"daterange.filter.period": "",
|
|
70
71
|
"daterange.filter.to": "",
|
|
@@ -165,6 +166,8 @@
|
|
|
165
166
|
"editor.record.error.back": "Ritorna al catalogo",
|
|
166
167
|
"editor.record.error.explanation": "Forse non ha accesso a questa pagina oppure questo collegamento potrebbe non essere valido.",
|
|
167
168
|
"editor.record.error.message": "Qualcosa è andato storto",
|
|
169
|
+
"editor.record.flag.saveError.body": "",
|
|
170
|
+
"editor.record.flag.saveError.title": "",
|
|
168
171
|
"editor.record.form.bottomButtons.comeBackLater": "Ritorna più tardi",
|
|
169
172
|
"editor.record.form.bottomButtons.next": "Avanti",
|
|
170
173
|
"editor.record.form.bottomButtons.previous": "Precedente",
|
|
@@ -197,6 +200,8 @@
|
|
|
197
200
|
"editor.record.form.field.contacts.placeholder": "Scegli un contatto",
|
|
198
201
|
"editor.record.form.field.contactsForResource.noContact": "Inserisci almeno un punto di contatto responsabile dei dati.",
|
|
199
202
|
"editor.record.form.field.contactsForResource.placeholder": "Scegli un contatto",
|
|
203
|
+
"editor.record.form.field.flags.IS_REFERENCE_DATASET": "",
|
|
204
|
+
"editor.record.form.field.hint.flags.IS_REFERENCE_DATASET": "",
|
|
200
205
|
"editor.record.form.field.keywords": "Parole chiave",
|
|
201
206
|
"editor.record.form.field.legalConstraints": "Vincolo legale",
|
|
202
207
|
"editor.record.form.field.license": "Licenza",
|
|
@@ -371,7 +376,7 @@
|
|
|
371
376
|
"favorite.starToggle.add": "Aggiungi ai preferiti",
|
|
372
377
|
"favorite.starToggle.remove": "Rimuovi dai preferiti",
|
|
373
378
|
"feature.catalog.attribute.code": "Codice",
|
|
374
|
-
"feature.catalog.attribute.
|
|
379
|
+
"feature.catalog.attribute.description": "Descrizione",
|
|
375
380
|
"feature.catalog.attribute.name": "Nome",
|
|
376
381
|
"feature.catalog.attribute.type": "Tipo",
|
|
377
382
|
"feature.catalog.attribute.values": "Valori",
|
|
@@ -424,7 +429,6 @@
|
|
|
424
429
|
"map.add.layer.wms": "Da un WMS",
|
|
425
430
|
"map.addFromFile.placeholder": "Clicca o trascina un file qui",
|
|
426
431
|
"map.dropdown.placeholder": "Nessun livello di anteprima disponibile",
|
|
427
|
-
"map.geocoding.placeholder": "Cerca un luogo",
|
|
428
432
|
"map.help.addFromFile": "Clicca o trascina un file per aggiungerlo alla mappa (attualmente supporta solo il formato GeoJSON)",
|
|
429
433
|
"map.layer.add": "Aggiungi",
|
|
430
434
|
"map.layers.available": "Layer disponibili",
|
|
@@ -658,6 +662,7 @@
|
|
|
658
662
|
"search.filters.changeDate": "Aggiornato",
|
|
659
663
|
"search.filters.clear": "Ripristina",
|
|
660
664
|
"search.filters.contact": "Contatti",
|
|
665
|
+
"search.filters.documentStandard": "",
|
|
661
666
|
"search.filters.format": "Formati",
|
|
662
667
|
"search.filters.inspireKeyword": "Parola chiave INSPIRE",
|
|
663
668
|
"search.filters.isSpatial": "Dati spaziali",
|
|
@@ -689,10 +694,29 @@
|
|
|
689
694
|
"search.filters.recordKind.reuse": "Riutilizzi",
|
|
690
695
|
"search.filters.recordKind.service": "Servizi",
|
|
691
696
|
"search.filters.representationType": "Tipo di rappresentazione",
|
|
697
|
+
"search.filters.resourceCreationRevisionDate": "Data della risorsa",
|
|
692
698
|
"search.filters.resourceType": "Tipo di risorsa",
|
|
699
|
+
"search.filters.spatialExtent": "",
|
|
700
|
+
"search.filters.spatialExtent.bboxFromFile": "",
|
|
701
|
+
"search.filters.spatialExtent.bboxFromFileDelete": "",
|
|
702
|
+
"search.filters.spatialExtent.bboxFromLocation": "",
|
|
703
|
+
"search.filters.spatialExtent.bboxFromLocationDelete": "",
|
|
704
|
+
"search.filters.spatialExtent.bboxInitial": "",
|
|
705
|
+
"search.filters.spatialExtent.bboxInitialDelete": "",
|
|
706
|
+
"search.filters.spatialExtent.error.fileTooLarge": "",
|
|
707
|
+
"search.filters.spatialExtent.error.invalidFormat": "",
|
|
708
|
+
"search.filters.spatialExtent.error.noGeometry": "",
|
|
709
|
+
"search.filters.spatialExtent.error.outOfBounds": "",
|
|
710
|
+
"search.filters.spatialExtent.error.title": "",
|
|
711
|
+
"search.filters.spatialExtent.helpText": "",
|
|
712
|
+
"search.filters.spatialExtent.import": "",
|
|
713
|
+
"search.filters.spatialExtent.searchLocation": "",
|
|
693
714
|
"search.filters.standard": "Standard",
|
|
694
715
|
"search.filters.summaryLabel.changeDate": "Aggiornato: ",
|
|
716
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "Data della risorsa: ",
|
|
717
|
+
"search.filters.summaryLabel.temporalExtent": "Estensione temporale: ",
|
|
695
718
|
"search.filters.summaryLabel.user": "Editor: ",
|
|
719
|
+
"search.filters.temporalExtent": "Estensione temporale",
|
|
696
720
|
"search.filters.title": "Affina la sua ricerca",
|
|
697
721
|
"search.filters.topic": "Argomenti",
|
|
698
722
|
"search.filters.useSpatialFilter": "Evidenzia le risorse nell'area di interesse",
|
package/translations/nl.json
CHANGED
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"dataset.error.restrictedAccess": "",
|
|
66
66
|
"dataset.error.unknown": "",
|
|
67
67
|
"dataset.error.unsupportedType": "",
|
|
68
|
+
"daterange.filter.datePlaceholder": "dd-mm-jjjj",
|
|
68
69
|
"daterange.filter.from": "",
|
|
69
70
|
"daterange.filter.period": "",
|
|
70
71
|
"daterange.filter.to": "",
|
|
@@ -165,6 +166,8 @@
|
|
|
165
166
|
"editor.record.error.back": "",
|
|
166
167
|
"editor.record.error.explanation": "",
|
|
167
168
|
"editor.record.error.message": "",
|
|
169
|
+
"editor.record.flag.saveError.body": "",
|
|
170
|
+
"editor.record.flag.saveError.title": "",
|
|
168
171
|
"editor.record.form.bottomButtons.comeBackLater": "",
|
|
169
172
|
"editor.record.form.bottomButtons.next": "",
|
|
170
173
|
"editor.record.form.bottomButtons.previous": "",
|
|
@@ -197,6 +200,8 @@
|
|
|
197
200
|
"editor.record.form.field.contacts.placeholder": "",
|
|
198
201
|
"editor.record.form.field.contactsForResource.noContact": "",
|
|
199
202
|
"editor.record.form.field.contactsForResource.placeholder": "",
|
|
203
|
+
"editor.record.form.field.flags.IS_REFERENCE_DATASET": "",
|
|
204
|
+
"editor.record.form.field.hint.flags.IS_REFERENCE_DATASET": "",
|
|
200
205
|
"editor.record.form.field.keywords": "",
|
|
201
206
|
"editor.record.form.field.legalConstraints": "",
|
|
202
207
|
"editor.record.form.field.license": "",
|
|
@@ -371,7 +376,7 @@
|
|
|
371
376
|
"favorite.starToggle.add": "Toevoegen aan favorieten",
|
|
372
377
|
"favorite.starToggle.remove": "Verwijderen uit favorieten",
|
|
373
378
|
"feature.catalog.attribute.code": "Code",
|
|
374
|
-
"feature.catalog.attribute.
|
|
379
|
+
"feature.catalog.attribute.description": "Beschrijving",
|
|
375
380
|
"feature.catalog.attribute.name": "Naam",
|
|
376
381
|
"feature.catalog.attribute.type": "Type",
|
|
377
382
|
"feature.catalog.attribute.values": "Waarden",
|
|
@@ -424,7 +429,6 @@
|
|
|
424
429
|
"map.add.layer.wms": "",
|
|
425
430
|
"map.addFromFile.placeholder": "",
|
|
426
431
|
"map.dropdown.placeholder": "",
|
|
427
|
-
"map.geocoding.placeholder": "",
|
|
428
432
|
"map.help.addFromFile": "",
|
|
429
433
|
"map.layer.add": "",
|
|
430
434
|
"map.layers.available": "",
|
|
@@ -658,6 +662,7 @@
|
|
|
658
662
|
"search.filters.changeDate": "",
|
|
659
663
|
"search.filters.clear": "",
|
|
660
664
|
"search.filters.contact": "",
|
|
665
|
+
"search.filters.documentStandard": "",
|
|
661
666
|
"search.filters.format": "",
|
|
662
667
|
"search.filters.inspireKeyword": "",
|
|
663
668
|
"search.filters.isSpatial": "",
|
|
@@ -689,10 +694,29 @@
|
|
|
689
694
|
"search.filters.recordKind.reuse": "",
|
|
690
695
|
"search.filters.recordKind.service": "",
|
|
691
696
|
"search.filters.representationType": "",
|
|
697
|
+
"search.filters.resourceCreationRevisionDate": "",
|
|
692
698
|
"search.filters.resourceType": "",
|
|
699
|
+
"search.filters.spatialExtent": "",
|
|
700
|
+
"search.filters.spatialExtent.bboxFromFile": "",
|
|
701
|
+
"search.filters.spatialExtent.bboxFromFileDelete": "",
|
|
702
|
+
"search.filters.spatialExtent.bboxFromLocation": "",
|
|
703
|
+
"search.filters.spatialExtent.bboxFromLocationDelete": "",
|
|
704
|
+
"search.filters.spatialExtent.bboxInitial": "",
|
|
705
|
+
"search.filters.spatialExtent.bboxInitialDelete": "",
|
|
706
|
+
"search.filters.spatialExtent.error.fileTooLarge": "",
|
|
707
|
+
"search.filters.spatialExtent.error.invalidFormat": "",
|
|
708
|
+
"search.filters.spatialExtent.error.noGeometry": "",
|
|
709
|
+
"search.filters.spatialExtent.error.outOfBounds": "",
|
|
710
|
+
"search.filters.spatialExtent.error.title": "",
|
|
711
|
+
"search.filters.spatialExtent.helpText": "",
|
|
712
|
+
"search.filters.spatialExtent.import": "",
|
|
713
|
+
"search.filters.spatialExtent.searchLocation": "",
|
|
693
714
|
"search.filters.standard": "",
|
|
694
715
|
"search.filters.summaryLabel.changeDate": "",
|
|
716
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "",
|
|
717
|
+
"search.filters.summaryLabel.temporalExtent": "",
|
|
695
718
|
"search.filters.summaryLabel.user": "",
|
|
719
|
+
"search.filters.temporalExtent": "",
|
|
696
720
|
"search.filters.title": "",
|
|
697
721
|
"search.filters.topic": "",
|
|
698
722
|
"search.filters.useSpatialFilter": "",
|
package/translations/pt.json
CHANGED
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"dataset.error.restrictedAccess": "",
|
|
66
66
|
"dataset.error.unknown": "",
|
|
67
67
|
"dataset.error.unsupportedType": "",
|
|
68
|
+
"daterange.filter.datePlaceholder": "dd/mm/aaaa",
|
|
68
69
|
"daterange.filter.from": "",
|
|
69
70
|
"daterange.filter.period": "",
|
|
70
71
|
"daterange.filter.to": "",
|
|
@@ -165,6 +166,8 @@
|
|
|
165
166
|
"editor.record.error.back": "",
|
|
166
167
|
"editor.record.error.explanation": "",
|
|
167
168
|
"editor.record.error.message": "",
|
|
169
|
+
"editor.record.flag.saveError.body": "",
|
|
170
|
+
"editor.record.flag.saveError.title": "",
|
|
168
171
|
"editor.record.form.bottomButtons.comeBackLater": "",
|
|
169
172
|
"editor.record.form.bottomButtons.next": "",
|
|
170
173
|
"editor.record.form.bottomButtons.previous": "",
|
|
@@ -197,6 +200,8 @@
|
|
|
197
200
|
"editor.record.form.field.contacts.placeholder": "",
|
|
198
201
|
"editor.record.form.field.contactsForResource.noContact": "",
|
|
199
202
|
"editor.record.form.field.contactsForResource.placeholder": "",
|
|
203
|
+
"editor.record.form.field.flags.IS_REFERENCE_DATASET": "",
|
|
204
|
+
"editor.record.form.field.hint.flags.IS_REFERENCE_DATASET": "",
|
|
200
205
|
"editor.record.form.field.keywords": "",
|
|
201
206
|
"editor.record.form.field.legalConstraints": "",
|
|
202
207
|
"editor.record.form.field.license": "",
|
|
@@ -371,7 +376,7 @@
|
|
|
371
376
|
"favorite.starToggle.add": "Adicionar aos favoritos",
|
|
372
377
|
"favorite.starToggle.remove": "Remover dos favoritos",
|
|
373
378
|
"feature.catalog.attribute.code": "Código",
|
|
374
|
-
"feature.catalog.attribute.
|
|
379
|
+
"feature.catalog.attribute.description": "Descrição",
|
|
375
380
|
"feature.catalog.attribute.name": "Nome",
|
|
376
381
|
"feature.catalog.attribute.type": "Tipo",
|
|
377
382
|
"feature.catalog.attribute.values": "Valores",
|
|
@@ -424,7 +429,6 @@
|
|
|
424
429
|
"map.add.layer.wms": "",
|
|
425
430
|
"map.addFromFile.placeholder": "",
|
|
426
431
|
"map.dropdown.placeholder": "",
|
|
427
|
-
"map.geocoding.placeholder": "",
|
|
428
432
|
"map.help.addFromFile": "",
|
|
429
433
|
"map.layer.add": "",
|
|
430
434
|
"map.layers.available": "",
|
|
@@ -658,6 +662,7 @@
|
|
|
658
662
|
"search.filters.changeDate": "",
|
|
659
663
|
"search.filters.clear": "",
|
|
660
664
|
"search.filters.contact": "",
|
|
665
|
+
"search.filters.documentStandard": "",
|
|
661
666
|
"search.filters.format": "",
|
|
662
667
|
"search.filters.inspireKeyword": "",
|
|
663
668
|
"search.filters.isSpatial": "",
|
|
@@ -689,10 +694,29 @@
|
|
|
689
694
|
"search.filters.recordKind.reuse": "",
|
|
690
695
|
"search.filters.recordKind.service": "",
|
|
691
696
|
"search.filters.representationType": "",
|
|
697
|
+
"search.filters.resourceCreationRevisionDate": "",
|
|
692
698
|
"search.filters.resourceType": "",
|
|
699
|
+
"search.filters.spatialExtent": "",
|
|
700
|
+
"search.filters.spatialExtent.bboxFromFile": "",
|
|
701
|
+
"search.filters.spatialExtent.bboxFromFileDelete": "",
|
|
702
|
+
"search.filters.spatialExtent.bboxFromLocation": "",
|
|
703
|
+
"search.filters.spatialExtent.bboxFromLocationDelete": "",
|
|
704
|
+
"search.filters.spatialExtent.bboxInitial": "",
|
|
705
|
+
"search.filters.spatialExtent.bboxInitialDelete": "",
|
|
706
|
+
"search.filters.spatialExtent.error.fileTooLarge": "",
|
|
707
|
+
"search.filters.spatialExtent.error.invalidFormat": "",
|
|
708
|
+
"search.filters.spatialExtent.error.noGeometry": "",
|
|
709
|
+
"search.filters.spatialExtent.error.outOfBounds": "",
|
|
710
|
+
"search.filters.spatialExtent.error.title": "",
|
|
711
|
+
"search.filters.spatialExtent.helpText": "",
|
|
712
|
+
"search.filters.spatialExtent.import": "",
|
|
713
|
+
"search.filters.spatialExtent.searchLocation": "",
|
|
693
714
|
"search.filters.standard": "",
|
|
694
715
|
"search.filters.summaryLabel.changeDate": "",
|
|
716
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "",
|
|
717
|
+
"search.filters.summaryLabel.temporalExtent": "",
|
|
695
718
|
"search.filters.summaryLabel.user": "",
|
|
719
|
+
"search.filters.temporalExtent": "",
|
|
696
720
|
"search.filters.title": "",
|
|
697
721
|
"search.filters.topic": "",
|
|
698
722
|
"search.filters.useSpatialFilter": "",
|
package/translations/sk.json
CHANGED
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"dataset.error.restrictedAccess": "",
|
|
66
66
|
"dataset.error.unknown": "Dáta nie je možné zobraziť: \"{ info }\"",
|
|
67
67
|
"dataset.error.unsupportedType": "Nepodporovaný typ obsahu: \"{ info }\"",
|
|
68
|
+
"daterange.filter.datePlaceholder": "d. m. rrrr",
|
|
68
69
|
"daterange.filter.from": "",
|
|
69
70
|
"daterange.filter.period": "",
|
|
70
71
|
"daterange.filter.to": "",
|
|
@@ -165,6 +166,8 @@
|
|
|
165
166
|
"editor.record.error.back": "",
|
|
166
167
|
"editor.record.error.explanation": "",
|
|
167
168
|
"editor.record.error.message": "",
|
|
169
|
+
"editor.record.flag.saveError.body": "",
|
|
170
|
+
"editor.record.flag.saveError.title": "",
|
|
168
171
|
"editor.record.form.bottomButtons.comeBackLater": "",
|
|
169
172
|
"editor.record.form.bottomButtons.next": "",
|
|
170
173
|
"editor.record.form.bottomButtons.previous": "",
|
|
@@ -197,6 +200,8 @@
|
|
|
197
200
|
"editor.record.form.field.contacts.placeholder": "",
|
|
198
201
|
"editor.record.form.field.contactsForResource.noContact": "",
|
|
199
202
|
"editor.record.form.field.contactsForResource.placeholder": "",
|
|
203
|
+
"editor.record.form.field.flags.IS_REFERENCE_DATASET": "",
|
|
204
|
+
"editor.record.form.field.hint.flags.IS_REFERENCE_DATASET": "",
|
|
200
205
|
"editor.record.form.field.keywords": "",
|
|
201
206
|
"editor.record.form.field.legalConstraints": "",
|
|
202
207
|
"editor.record.form.field.license": "Licencia",
|
|
@@ -371,7 +376,7 @@
|
|
|
371
376
|
"favorite.starToggle.add": "Pridať k obľúbeným",
|
|
372
377
|
"favorite.starToggle.remove": "Odstrániť z obľúbených",
|
|
373
378
|
"feature.catalog.attribute.code": "Kód",
|
|
374
|
-
"feature.catalog.attribute.
|
|
379
|
+
"feature.catalog.attribute.description": "Popis",
|
|
375
380
|
"feature.catalog.attribute.name": "Názov",
|
|
376
381
|
"feature.catalog.attribute.type": "Typ",
|
|
377
382
|
"feature.catalog.attribute.values": "Hodnoty",
|
|
@@ -424,7 +429,6 @@
|
|
|
424
429
|
"map.add.layer.wms": "Z WMS",
|
|
425
430
|
"map.addFromFile.placeholder": "Kliknite na tlačidlo alebo sem vložte súbor",
|
|
426
431
|
"map.dropdown.placeholder": "",
|
|
427
|
-
"map.geocoding.placeholder": "Nájsť miesto",
|
|
428
432
|
"map.help.addFromFile": "Kliknite na tlačidlo alebo sem vložte súbor, ktorý chcete pridať do mapy (v súčasnosti podporuje iba formát GeoJSON).",
|
|
429
433
|
"map.layer.add": "Pridať",
|
|
430
434
|
"map.layers.available": "Dostupné vrsty",
|
|
@@ -658,6 +662,7 @@
|
|
|
658
662
|
"search.filters.changeDate": "",
|
|
659
663
|
"search.filters.clear": "Obnoviť",
|
|
660
664
|
"search.filters.contact": "Kontakty",
|
|
665
|
+
"search.filters.documentStandard": "",
|
|
661
666
|
"search.filters.format": "Formáty",
|
|
662
667
|
"search.filters.inspireKeyword": "Kľúčové slová INSPIRE",
|
|
663
668
|
"search.filters.isSpatial": "Je priestorový údaj",
|
|
@@ -689,10 +694,29 @@
|
|
|
689
694
|
"search.filters.recordKind.reuse": "",
|
|
690
695
|
"search.filters.recordKind.service": "",
|
|
691
696
|
"search.filters.representationType": "Typ reprezentácie",
|
|
697
|
+
"search.filters.resourceCreationRevisionDate": "",
|
|
692
698
|
"search.filters.resourceType": "Typ zdroja",
|
|
699
|
+
"search.filters.spatialExtent": "",
|
|
700
|
+
"search.filters.spatialExtent.bboxFromFile": "",
|
|
701
|
+
"search.filters.spatialExtent.bboxFromFileDelete": "",
|
|
702
|
+
"search.filters.spatialExtent.bboxFromLocation": "",
|
|
703
|
+
"search.filters.spatialExtent.bboxFromLocationDelete": "",
|
|
704
|
+
"search.filters.spatialExtent.bboxInitial": "",
|
|
705
|
+
"search.filters.spatialExtent.bboxInitialDelete": "",
|
|
706
|
+
"search.filters.spatialExtent.error.fileTooLarge": "",
|
|
707
|
+
"search.filters.spatialExtent.error.invalidFormat": "",
|
|
708
|
+
"search.filters.spatialExtent.error.noGeometry": "",
|
|
709
|
+
"search.filters.spatialExtent.error.outOfBounds": "",
|
|
710
|
+
"search.filters.spatialExtent.error.title": "",
|
|
711
|
+
"search.filters.spatialExtent.helpText": "",
|
|
712
|
+
"search.filters.spatialExtent.import": "",
|
|
713
|
+
"search.filters.spatialExtent.searchLocation": "",
|
|
693
714
|
"search.filters.standard": "Štandard",
|
|
694
715
|
"search.filters.summaryLabel.changeDate": "",
|
|
716
|
+
"search.filters.summaryLabel.resourceCreationRevisionDate": "",
|
|
717
|
+
"search.filters.summaryLabel.temporalExtent": "",
|
|
695
718
|
"search.filters.summaryLabel.user": "",
|
|
719
|
+
"search.filters.temporalExtent": "",
|
|
696
720
|
"search.filters.title": "Filtrovanie výsledkov",
|
|
697
721
|
"search.filters.topic": "Témy",
|
|
698
722
|
"search.filters.useSpatialFilter": "Najskôr zobraziť záznamy v oblasti záujmu",
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<gn-ui-search-input
|
|
2
|
-
[(value)]="searchText"
|
|
3
|
-
(valueChange)="onSearchChange($event)"
|
|
4
|
-
(keyup.enter)="onEnterPress()"
|
|
5
|
-
[placeholder]="'map.geocoding.placeholder' | translate"
|
|
6
|
-
>
|
|
7
|
-
</gn-ui-search-input>
|
|
8
|
-
@if (results && results.length) {
|
|
9
|
-
<ul
|
|
10
|
-
class="bg-gray-50 border border-gray-200 w-full mt-2 shadow-sm rounded-lg"
|
|
11
|
-
>
|
|
12
|
-
@for (result of results; track result) {
|
|
13
|
-
<li
|
|
14
|
-
(click)="zoomToLocation(result)"
|
|
15
|
-
class="flex items-center pl-8 pr-4 py-2 border-b border-gray-200 relative cursor-pointer hover:bg-blue-100 hover:text-gray-800 transition duration-300 ease-in-out"
|
|
16
|
-
>
|
|
17
|
-
<svg
|
|
18
|
-
class="stroke-current text-blue-500 absolute w-5 h-5 left-3 top-3"
|
|
19
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
20
|
-
fill="none"
|
|
21
|
-
viewBox="0 0 24 24"
|
|
22
|
-
stroke="currentColor"
|
|
23
|
-
>
|
|
24
|
-
<path
|
|
25
|
-
stroke-linecap="round"
|
|
26
|
-
stroke-linejoin="round"
|
|
27
|
-
stroke-width="2"
|
|
28
|
-
d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
|
|
29
|
-
/>
|
|
30
|
-
<path
|
|
31
|
-
stroke-linecap="round"
|
|
32
|
-
stroke-linejoin="round"
|
|
33
|
-
stroke-width="2"
|
|
34
|
-
d="M15 11a3 3 0 11-6 0 3 3 0 016 0z"
|
|
35
|
-
/>
|
|
36
|
-
</svg>
|
|
37
|
-
<span class="font-sans font-semibold ml-4">{{ result.label }}</span>
|
|
38
|
-
</li>
|
|
39
|
-
}
|
|
40
|
-
</ul>
|
|
41
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { Component, OnDestroy, inject } from '@angular/core'
|
|
2
|
-
import { catchError, firstValueFrom, from, Subject, takeUntil } from 'rxjs'
|
|
3
|
-
import { debounceTime, switchMap } from 'rxjs/operators'
|
|
4
|
-
import { GeocodingService } from '../geocoding.service'
|
|
5
|
-
import { MapFacade } from '../+state/map.facade'
|
|
6
|
-
|
|
7
|
-
import { SearchInputComponent } from '../../../../../../libs/ui/inputs/src'
|
|
8
|
-
import { TranslatePipe } from '@ngx-translate/core'
|
|
9
|
-
import { MapContextView } from '@geospatial-sdk/core'
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'gn-ui-geocoding',
|
|
13
|
-
templateUrl: './geocoding.component.html',
|
|
14
|
-
styleUrls: ['./geocoding.component.css'],
|
|
15
|
-
standalone: true,
|
|
16
|
-
imports: [SearchInputComponent, TranslatePipe],
|
|
17
|
-
})
|
|
18
|
-
export class GeocodingComponent implements OnDestroy {
|
|
19
|
-
private mapFacade = inject(MapFacade)
|
|
20
|
-
private geocodingService = inject(GeocodingService)
|
|
21
|
-
|
|
22
|
-
searchText = ''
|
|
23
|
-
results: any[] = []
|
|
24
|
-
searchTextChanged = new Subject<string>()
|
|
25
|
-
destroy$ = new Subject<void>()
|
|
26
|
-
errorMessage: string | null = null
|
|
27
|
-
|
|
28
|
-
constructor() {
|
|
29
|
-
this.searchTextChanged
|
|
30
|
-
.pipe(
|
|
31
|
-
debounceTime(300),
|
|
32
|
-
switchMap((searchText) => {
|
|
33
|
-
return from(this.geocodingService.query(searchText)).pipe(
|
|
34
|
-
catchError((error) => {
|
|
35
|
-
this.errorMessage =
|
|
36
|
-
'An error occurred while searching. Please try again.'
|
|
37
|
-
console.error(error)
|
|
38
|
-
return []
|
|
39
|
-
})
|
|
40
|
-
)
|
|
41
|
-
}),
|
|
42
|
-
takeUntil(this.destroy$)
|
|
43
|
-
)
|
|
44
|
-
.subscribe((results) => {
|
|
45
|
-
this.results = results
|
|
46
|
-
})
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
ngOnDestroy() {
|
|
50
|
-
this.destroy$.next()
|
|
51
|
-
this.destroy$.complete()
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
onSearchChange(searchText: string) {
|
|
55
|
-
if (!searchText) {
|
|
56
|
-
this.clearSearch()
|
|
57
|
-
return
|
|
58
|
-
} else {
|
|
59
|
-
this.searchTextChanged.next(searchText)
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
clearSearch() {
|
|
64
|
-
this.searchText = ''
|
|
65
|
-
this.results = []
|
|
66
|
-
this.errorMessage = null
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
async zoomToLocation(result: any) {
|
|
70
|
-
const geometry = result.geom
|
|
71
|
-
|
|
72
|
-
if (geometry.type === 'Point') {
|
|
73
|
-
await this.zoomToPoint(geometry.coordinates)
|
|
74
|
-
} else if (geometry.type === 'Polygon') {
|
|
75
|
-
await this.zoomToPolygon(geometry.coordinates)
|
|
76
|
-
} else {
|
|
77
|
-
console.error(`Unsupported geometry type: ${geometry.type}`)
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async zoomToPoint(pointCoords: [number, number]) {
|
|
82
|
-
const context = await firstValueFrom(this.mapFacade.context$)
|
|
83
|
-
const view: MapContextView = {
|
|
84
|
-
center: pointCoords,
|
|
85
|
-
zoom: 10,
|
|
86
|
-
}
|
|
87
|
-
this.mapFacade.applyContext({
|
|
88
|
-
...context,
|
|
89
|
-
view,
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
async zoomToPolygon(polygonCoords: [[number, number][]]) {
|
|
94
|
-
const context = await firstValueFrom(this.mapFacade.context$)
|
|
95
|
-
const view: MapContextView = {
|
|
96
|
-
geometry: {
|
|
97
|
-
type: 'Polygon',
|
|
98
|
-
coordinates: polygonCoords,
|
|
99
|
-
},
|
|
100
|
-
}
|
|
101
|
-
this.mapFacade.applyContext({
|
|
102
|
-
...context,
|
|
103
|
-
view,
|
|
104
|
-
})
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
onEnterPress() {
|
|
108
|
-
if (this.results && this.results.length > 0) {
|
|
109
|
-
this.zoomToLocation(this.results[0])
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Injectable, InjectionToken, inject } from '@angular/core'
|
|
2
|
-
import {
|
|
3
|
-
queryGeoadmin,
|
|
4
|
-
GeoadminOptions,
|
|
5
|
-
GeocodingResult,
|
|
6
|
-
queryGeonames,
|
|
7
|
-
GeonamesOptions,
|
|
8
|
-
DataGouvFrOptions,
|
|
9
|
-
queryDataGouvFr,
|
|
10
|
-
} from '@geospatial-sdk/geocoding'
|
|
11
|
-
import { from, Observable, throwError } from 'rxjs'
|
|
12
|
-
import { catchError } from 'rxjs/operators'
|
|
13
|
-
|
|
14
|
-
type GeoadminGeocodingProvider = ['geoadmin', GeoadminOptions]
|
|
15
|
-
type GeonamesGeocodingProvider = ['geonames', GeonamesOptions]
|
|
16
|
-
type DataGouvFrGeocodingProvider = ['data-gouv-fr', DataGouvFrOptions]
|
|
17
|
-
export type GeocodingProvider =
|
|
18
|
-
| GeoadminGeocodingProvider
|
|
19
|
-
| GeonamesGeocodingProvider
|
|
20
|
-
| DataGouvFrGeocodingProvider
|
|
21
|
-
|
|
22
|
-
export const GEOCODING_PROVIDER = new InjectionToken<GeocodingProvider>(
|
|
23
|
-
'geocoding-provider'
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
@Injectable({
|
|
27
|
-
providedIn: 'root',
|
|
28
|
-
})
|
|
29
|
-
export class GeocodingService {
|
|
30
|
-
private provider = inject<GeocodingProvider>(GEOCODING_PROVIDER)
|
|
31
|
-
|
|
32
|
-
query(text: string): Observable<GeocodingResult[]> {
|
|
33
|
-
let queryObservable: Observable<GeocodingResult[]>
|
|
34
|
-
switch (this.provider[0]) {
|
|
35
|
-
case 'geoadmin':
|
|
36
|
-
queryObservable = from(
|
|
37
|
-
queryGeoadmin(text, this.provider[1] as GeoadminOptions)
|
|
38
|
-
)
|
|
39
|
-
break
|
|
40
|
-
case 'geonames':
|
|
41
|
-
queryObservable = from(
|
|
42
|
-
queryGeonames(text, this.provider[1] as GeonamesOptions)
|
|
43
|
-
)
|
|
44
|
-
break
|
|
45
|
-
case 'data-gouv-fr':
|
|
46
|
-
queryObservable = from(
|
|
47
|
-
queryDataGouvFr(text, this.provider[1] as DataGouvFrOptions)
|
|
48
|
-
)
|
|
49
|
-
break
|
|
50
|
-
default:
|
|
51
|
-
return throwError(
|
|
52
|
-
() => new Error(`Unsupported geocoding provider: ${this.provider[0]}`)
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
return queryObservable.pipe(catchError((error) => throwError(error)))
|
|
56
|
-
}
|
|
57
|
-
}
|