Show histogram
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
parent
f44b079cde
commit
e1fef2d7f3
@ -1,4 +1,4 @@
|
|||||||
<table class="container" *ngIf="layer">
|
<table class="container" *ngIf="showLegend()">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
|
@ -71,7 +71,9 @@ export class LegendComponent implements OnInit,AfterViewInit {
|
|||||||
return percent < 0.1 ? "" : percent.toFixed(1) + " %";
|
return percent < 0.1 ? "" : percent.toFixed(1) + " %";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showLegend(): boolean {
|
||||||
|
return this.layer && this.layer.renderer && this.layer.renderer.renderType != "MULTIBAND_COLOR";
|
||||||
|
}
|
||||||
|
|
||||||
showHistogram(): boolean {
|
showHistogram(): boolean {
|
||||||
return this.histogramenabled && this.layer.renderer.band.histogram.entries && this.layer.renderer.band.histogram.entries.length > 0 && this.layer.renderer.colorMap.colormapType == "minmax";
|
return this.histogramenabled && this.layer.renderer.band.histogram.entries && this.layer.renderer.band.histogram.entries.length > 0 && this.layer.renderer.colorMap.colormapType == "minmax";
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
<div class="spacer"></div>
|
<div class="spacer"></div>
|
||||||
<div *ngIf="item;let item">
|
<div *ngIf="item;let item">
|
||||||
<div class="card border-0">
|
<div class="card border-0">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div>
|
<div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div>
|
||||||
<h1>{{item.name}}</h1>
|
<div class="card menu-card">
|
||||||
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
<h1>{{item.name}}</h1>
|
||||||
<!--<div *ngIf="layers.length>1">
|
</div>
|
||||||
<select (change)="onLayerChanged($event.target.value)">
|
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
||||||
<option *ngFor="let l of layers;let layerIndex = index" [value]="layerIndex">{{l.name}}</option>
|
<div class="card menu-card">
|
||||||
</select>
|
<fm-map-layer-legend [layer]="layers[selectedLayer]" [histogramenabled]="true"></fm-map-layer-legend>
|
||||||
</div>-->
|
</div>
|
||||||
<fm-map-layer-legend [layer]="layers[selectedLayer]" [histogramenabled]="false" histogramunit="ha"></fm-map-layer-legend>
|
</div>
|
||||||
</div>
|
<div class="card menu-card">
|
||||||
<ul class="p-0 mt-2">
|
<ul class="p-0 mt-2">
|
||||||
<!--<li><a href="/api/v1/items/{{item.code}}/file" class="mt-1 mr-1" i18n><i class="fa fa-download" aria-hidden="true" title="Download"></i> Download</a></li>-->
|
<!--<li><a href="/api/v1/items/{{item.code}}/file" class="mt-1 mr-1" i18n><i class="fa fa-download" aria-hidden="true" title="Download"></i> Download</a></li>-->
|
||||||
<li><a href="#" class="mt-1 mr-1" (click)="handleOnEdit(item)" i18n><i class="fa fa-pencil" aria-hidden="true" title="Edit"></i> Edit</a></li>
|
<li><a href="#" class="mt-1 mr-1" (click)="handleOnEdit(item)" i18n><i class="fa fa-pencil" aria-hidden="true" title="Edit"></i> Edit</a></li>
|
||||||
<li *ngIf="itemTypeService.isLayer(item)"><a href="#" (click)="handleAddAsLayer(item)" class="mt-1 mr-1" i18n><i class="fa fa-eye" aria-hidden="true" title="Add as layer"></i> Add as overlay</a></li>
|
<li *ngIf="itemTypeService.isLayer(item)"><a href="#" (click)="handleAddAsLayer(item)" class="mt-1 mr-1" i18n><i class="fa fa-eye" aria-hidden="true" title="Add as layer"></i> Add as overlay</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
@ -1,33 +1,42 @@
|
|||||||
@import "../../_theme.scss";
|
@import "../../_theme.scss";
|
||||||
@import "~bootstrap/scss/bootstrap.scss";
|
@import "~bootstrap/scss/bootstrap.scss";
|
||||||
|
|
||||||
.big-icon {
|
.big-icon {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: white;
|
color: white;
|
||||||
font-size: 9rem;
|
font-size: 9rem;
|
||||||
padding: 3rem;
|
padding: 3rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
list-style:none;
|
list-style:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
margin-top:1rem;
|
margin-top:1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spacer {
|
.spacer {
|
||||||
display:none;
|
display:none;
|
||||||
height:4rem;
|
height:4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width:44rem) {
|
@media screen and (min-width:44rem) {
|
||||||
.spacer {
|
.spacer {
|
||||||
display:block;
|
display:block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.menu-card {
|
||||||
|
margin-left: -7px;
|
||||||
|
padding-left: 7px;
|
||||||
|
margin-right: -7px;
|
||||||
|
padding-right: 7px;
|
||||||
|
margin-bottom: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,8 @@ export interface IColor {
|
|||||||
|
|
||||||
export interface IColorEntry {
|
export interface IColorEntry {
|
||||||
value: number,
|
value: number,
|
||||||
color: IColor
|
color: IColor,
|
||||||
|
label: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IHistogramEntry {
|
export interface IHistogramEntry {
|
||||||
@ -43,7 +44,8 @@ export interface IBand {
|
|||||||
|
|
||||||
export interface IRenderer {
|
export interface IRenderer {
|
||||||
band:IBand,
|
band:IBand,
|
||||||
colorMap: IColorMap
|
colorMap: IColorMap,
|
||||||
|
renderType:string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IRenderoutput {
|
export interface IRenderoutput {
|
||||||
|
Loading…
Reference in New Issue
Block a user