Skip to content

Commit

Permalink
fix(RequeteComponent): filter map features on tab update
Browse files Browse the repository at this point in the history
  • Loading branch information
cboucheIGN committed Dec 18, 2024
1 parent eb55bf0 commit c9f5a46
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h1>

<div class="fr-grid-row fr-grid-row--gutters">

<div class="fr-col-12 fr-col-lg-6" [class.fr-col-lg-12]="step === 0">
<div class="fr-col-12" [class.fr-col-lg-12]="step === 0" [class.fr-col-lg-6]="step !== 0">
@if (step === 0) {
<p class="fr-label">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)</p>
<p class="fr-hint-text">Changer de fond de carte (PLAN IGN / ORTHOPHOTOS) avec l'outil de sélection de couche</p>
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared-map/services/map-context.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@if (thematics && thematics.length > 0) {
<dsfr-tabs [selectedTabIndex]="selectedTabIndex">
<dsfr-tabs [selectedTabIndex]="selectedTabIndex" (tabSelect)="updateMap($event)">

@for (thematic of thematics; track $index; let first = $first) {
@if (thematic.active) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit c9f5a46

Please sign in to comment.