removed logging in weather service.
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

changed moment to peerdependency.
This commit is contained in:
2020-09-03 10:37:24 +02:00
parent 76bdad6eaf
commit 1030b1c41a
3 changed files with 4 additions and 8 deletions

View File

@@ -2,7 +2,7 @@ import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Observable} from 'rxjs';
import {GeoJSON} from 'ol/format';
import {map, switchMap, tap} from 'rxjs/operators';
import {map, switchMap} from 'rxjs/operators';
import {getCenter} from 'ol/extent';
import moment from 'moment';
import {AppConfig} from '../shared/app.config';
@@ -40,13 +40,11 @@ export class WeatherService {
startDate.setDate(startDate.getDate() - daysBefore);
startDate.setHours(0, 0, 0, 0);
const startDateString = moment(startDate).local().format('YYYY-MM-DD[T]HH:mm:ss');
console.log(startDateString);
const endDate = new Date();
endDate.setDate(endDate.getDate() + daysAfter);
endDate.setHours(23, 0, 0, 0);
const endDateString = moment(endDate).local().format('YYYY-MM-DD[T]HH:mm:ss');
console.log(endDateString);
return this.getWeatherRange(centroid, startDateString, endDateString);
}
@@ -70,7 +68,6 @@ export class WeatherService {
switchMap(h => {
return this.httpClient.get<any[]>(forecast)
.pipe(
tap(v => console.log(v)),
map(f => [...h, ...f.filter(fd => fd.time <= endDate)] ));
})
);