- Abfragebeispiele ogc service

- legend-entry-component: jum to first or last value of a dataset
- npm updates
This commit is contained in:
Arno Kaimbacher 2021-10-22 15:43:32 +02:00
parent cd4119b986
commit 9579a23e8e
10 changed files with 2082 additions and 1691 deletions

View file

@ -6,7 +6,8 @@ import { TimeInterval } from '../../../shared/models/timespan';
import { DatasetApiService } from '../../services/dataset-api.service';
import { InternalIdHandler, InternalDatasetId } from '../../../common/components/services/internal-id-handler.service';
import { DatasetOptions } from '../../../shared/models/options';
import { faEye, faEyeSlash } from '@fortawesome/free-solid-svg-icons';
import { faEye, faEyeSlash, faChevronRight } from '@fortawesome/free-solid-svg-icons';
import { FirstLastValue } from '../../../shared/models/dataset';
@Component({
selector: 'geomon-legend-entry',
@ -21,10 +22,11 @@ export class LegendEntryComponent {
public onSelectDate: EventEmitter<Date> = new EventEmitter();
faEye = faEye;
faEyeSlash= faEyeSlash;
faEyeSlash = faEyeSlash;
faChevronRight = faChevronRight;
// public firstValue: FirstLastValue;
// public lastValue: FirstLastValue;
public firstValue: FirstLastValue;
public lastValue: FirstLastValue;
public hasData = true;
public informationVisible = false;
@ -84,6 +86,13 @@ export class LegendEntryComponent {
}
public jumpToFirstTimeStamp() {
this.onSelectDate.emit(new Date(this.dataset.firstValue.timestamp));
}
public jumpToLastTimeStamp() {
this.onSelectDate.emit(new Date(this.dataset.lastValue.timestamp));
}
protected loadDataset(locale?: string): void {
const params: DatasetFilter = {};
@ -110,7 +119,7 @@ export class LegendEntryComponent {
public removeDataset() {
this.onDeleteDataset.emit(true);
}
protected setDataset(timeseries: GeomonTimeseries) {
this.dataset = timeseries;
this.setParameters();
@ -123,23 +132,38 @@ export class LegendEntryComponent {
this.procedureLabel = this.dataset.parameters.procedure.label;
this.categoryLabel = this.dataset.parameters.category.label;
this.uom = this.dataset.uom;
}
public toggleSelection() {
this.firstValue = this.dataset.firstValue;
this.lastValue = this.dataset.lastValue;
// this.checkDataInTimespan();
}
// private checkDataInTimespan() {
// if (this.timeInterval && this.dataset && this.dataset.firstValue && this.dataset.lastValue) {
// this.hasData = this.timeSrvc.overlaps(
// this.timeInterval,
// this.dataset.firstValue.timestamp,
// this.dataset.lastValue.timestamp
// );
// }
// }
public toggleSelection() {
this.selected = !this.selected;
this.onSelectDataset.emit(this.selected);
}
public toggleVisibility() {
public toggleVisibility() {
this.datasetOption.visible = !this.datasetOption.visible;
this.onUpdateOptions.emit(this.datasetOption);
}
public editDatasetOptions() {
}
public editDatasetOptions() {
// this.onEditOptions.emit(this.datasetOptions);
}
public showGeometry() {
}
public showGeometry() {
this.onShowGeometry.emit(this.dataset.platform.geometry);
}