diff --git a/projects/common-map/src/fm-map/components/legend/legend.component.html b/projects/common-map/src/fm-map/components/legend/legend.component.html
index b9f79fa..a4abe42 100644
--- a/projects/common-map/src/fm-map/components/legend/legend.component.html
+++ b/projects/common-map/src/fm-map/components/legend/legend.component.html
@@ -15,7 +15,7 @@
|
- {{entry.value | number:'1.0-2'}} {{legendunit}}{{entry.label}} |
+ {{getValue(entry.value,layer.scale) | number:'1.0-2'}} {{legendunit}}{{entry.label}} |
diff --git a/projects/common-map/src/fm-map/components/legend/legend.component.ts b/projects/common-map/src/fm-map/components/legend/legend.component.ts
index 27b8af8..305ecb7 100644
--- a/projects/common-map/src/fm-map/components/legend/legend.component.ts
+++ b/projects/common-map/src/fm-map/components/legend/legend.component.ts
@@ -65,6 +65,14 @@ export class LegendComponent implements OnInit,AfterViewInit {
return part;
}
+ public getValue(value:number,scale:number):number {
+ let v = value;
+ if(scale && scale != 0) {
+ v=scale*value;
+ }
+ return v;
+ }
+
public getLabel(renderer: IRenderer, index: number): string {
let scale = 100 / renderer.band.histogram.entries.reduce((sum, entry) => sum + entry.freqency, 0);
let percent = renderer.band.histogram.entries[index].freqency * scale;
diff --git a/projects/common-map/src/fm-map/models/color.map.ts b/projects/common-map/src/fm-map/models/color.map.ts
index 6cd8ddd..caa9642 100644
--- a/projects/common-map/src/fm-map/models/color.map.ts
+++ b/projects/common-map/src/fm-map/models/color.map.ts
@@ -67,6 +67,7 @@ export interface ILayer {
name: string,
unit: string,
index: number,
+ scale: number,
renderer: IRenderer,
rendering: IRenderoutput
}
|