-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a button to remove all raster layers added to the map
- Loading branch information
Mohamed Hamou
authored and
Mohamed Hamou
committed
Oct 17, 2024
1 parent
5dd8e9c
commit 4e489eb
Showing
13 changed files
with
150 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/app/components/map/raster-layers-manager/rasters-manager.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<div class="wrapper" (click)="removeLayers()"> | ||
<mat-icon [matTooltip]="'Remove all rasters' | translate" class="icon">visibility_off</mat-icon> | ||
</div> |
23 changes: 23 additions & 0 deletions
23
src/app/components/map/raster-layers-manager/rasters-manager.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@import "../../../../styles/variables.scss"; | ||
@import "../../../../styles/app/sizes.scss"; | ||
@import "../../../../styles/app/mixin.scss"; | ||
|
||
.wrapper { | ||
cursor: pointer; | ||
width: $map-actions-width; | ||
height: $map-actions-width; | ||
margin-bottom: $sm-spacing; | ||
@include box-border(); | ||
box-shadow: none; | ||
padding: 0; | ||
background-color: white; | ||
|
||
.icon { | ||
height: $map-actions-width; | ||
width: $map-actions-width; | ||
padding: 0; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
src/app/components/map/raster-layers-manager/rasters-manager.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Licensed to Gisaïa under one or more contributor | ||
* license agreements. See the NOTICE.txt file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Gisaïa licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'; | ||
import { VisualizeService } from '../../../services/visualize.service'; | ||
import { AoiEdition } from 'arlas-web-components'; | ||
|
||
@Component({ | ||
selector: 'arlas-rasters-manager', | ||
templateUrl: './rasters-manager.component.html', | ||
styleUrls: ['./rasters-manager.component.scss'] | ||
}) | ||
export class RastersManagerComponent { | ||
|
||
public constructor(private visualisationService: VisualizeService) { | ||
|
||
} | ||
|
||
/** Removes all raster layers from the map. */ | ||
public removeLayers() { | ||
this.visualisationService.removeRasters(); | ||
} | ||
|
||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters