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>
|
||||
<td colspan="2">
|
||||
<div class="title">
|
||||
|
@ -71,7 +71,9 @@ export class LegendComponent implements OnInit,AfterViewInit {
|
||||
return percent < 0.1 ? "" : percent.toFixed(1) + " %";
|
||||
}
|
||||
|
||||
|
||||
showLegend(): boolean {
|
||||
return this.layer && this.layer.renderer && this.layer.renderer.renderType != "MULTIBAND_COLOR";
|
||||
}
|
||||
|
||||
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";
|
||||
|
@ -3,15 +3,15 @@
|
||||
<div class="card border-0">
|
||||
<div class="card-body">
|
||||
<div class="mb-2"><a href="#" (click)="handleBackToList($event)" i18n>Back</a></div>
|
||||
<div class="card menu-card">
|
||||
<h1>{{item.name}}</h1>
|
||||
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
||||
<!--<div *ngIf="layers.length>1">
|
||||
<select (change)="onLayerChanged($event.target.value)">
|
||||
<option *ngFor="let l of layers;let layerIndex = index" [value]="layerIndex">{{l.name}}</option>
|
||||
</select>
|
||||
</div>-->
|
||||
<fm-map-layer-legend [layer]="layers[selectedLayer]" [histogramenabled]="false" histogramunit="ha"></fm-map-layer-legend>
|
||||
</div>
|
||||
<div class="legend-container" *ngIf="item?.data.layers;let layers">
|
||||
<div class="card menu-card">
|
||||
<fm-map-layer-legend [layer]="layers[selectedLayer]" [histogramenabled]="true"></fm-map-layer-legend>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card menu-card">
|
||||
<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="#" class="mt-1 mr-1" (click)="handleOnEdit(item)" i18n><i class="fa fa-pencil" aria-hidden="true" title="Edit"></i> Edit</a></li>
|
||||
@ -20,3 +20,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -31,3 +31,12 @@ li {
|
||||
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 {
|
||||
value: number,
|
||||
color: IColor
|
||||
color: IColor,
|
||||
label: string
|
||||
}
|
||||
|
||||
export interface IHistogramEntry {
|
||||
@ -43,7 +44,8 @@ export interface IBand {
|
||||
|
||||
export interface IRenderer {
|
||||
band:IBand,
|
||||
colorMap: IColorMap
|
||||
colorMap: IColorMap,
|
||||
renderType:string
|
||||
}
|
||||
|
||||
export interface IRenderoutput {
|
||||
|
Loading…
Reference in New Issue
Block a user