From c9f5a46bafb595758584f65238a98acdea27c8e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Bouch=C3=A9?= Date: Wed, 18 Dec 2024 15:09:28 +0000 Subject: [PATCH] fix(RequeteComponent): filter map features on tab update --- src/app/requete/pages/requete-new/requete-new.component.html | 2 +- src/app/shared-map/services/map-context.service.ts | 2 +- .../components/thematic-tabs/thematic-tabs.component.html | 2 +- .../components/thematic-tabs/thematic-tabs.component.ts | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/requete/pages/requete-new/requete-new.component.html b/src/app/requete/pages/requete-new/requete-new.component.html index dbac36d..7d910fe 100644 --- a/src/app/requete/pages/requete-new/requete-new.component.html +++ b/src/app/requete/pages/requete-new/requete-new.component.html @@ -24,7 +24,7 @@

-
+
@if (step === 0) {

Dessiner, sur la carte ci-dessous, le périmètre de la forêt ou des parcelles à l'aide de l'outil de dessin (polygon)

Changer de fond de carte (PLAN IGN / ORTHOPHOTOS) avec l'outil de sélection de couche

diff --git a/src/app/shared-map/services/map-context.service.ts b/src/app/shared-map/services/map-context.service.ts index 47d1d47..92bf5fd 100644 --- a/src/app/shared-map/services/map-context.service.ts +++ b/src/app/shared-map/services/map-context.service.ts @@ -337,7 +337,7 @@ export class MapContextService { // Centrer la carte et ajuster le zoom pour voir toutes les entités map?.getView().fit(globalExtent, { size: this.map?.getSize(), // Taille de la carte - padding: [50, 50, 50, 50], // Espacement autour des entités (en pixels) + padding: [200, 200, 200, 200], // Espacement autour des entités (en pixels) duration: 500, // Durée de l'animation (en ms) maxZoom: 20, // Facultatif : limite maximale du zoom }); diff --git a/src/app/shared-thematic/components/thematic-tabs/thematic-tabs.component.html b/src/app/shared-thematic/components/thematic-tabs/thematic-tabs.component.html index e09285b..2e76b12 100644 --- a/src/app/shared-thematic/components/thematic-tabs/thematic-tabs.component.html +++ b/src/app/shared-thematic/components/thematic-tabs/thematic-tabs.component.html @@ -1,5 +1,5 @@ @if (thematics && thematics.length > 0) { - + @for (thematic of thematics; track $index; let first = $first) { @if (thematic.active) { diff --git a/src/app/shared-thematic/components/thematic-tabs/thematic-tabs.component.ts b/src/app/shared-thematic/components/thematic-tabs/thematic-tabs.component.ts index fd2147e..a21c957 100644 --- a/src/app/shared-thematic/components/thematic-tabs/thematic-tabs.component.ts +++ b/src/app/shared-thematic/components/thematic-tabs/thematic-tabs.component.ts @@ -35,8 +35,8 @@ export class ThematicTabsComponent implements OnInit { } - selectTab(event: any) { - this.selectedTabIndex = event; + updateMap(event: any) { + console.log('selectTab', event); this.mapContextService.updateLayersVisibility(event); }