...
|
...
|
@@ -141,7 +141,7 @@ export class TripAnimationComponent implements OnInit, AfterViewInit, OnDestroy |
141
|
141
|
|
142
|
142
|
timeUpdated(time: number) {
|
143
|
143
|
this.currentTime = time;
|
144
|
|
- let currentPosition = this.interpolatedTimeData
|
|
144
|
+ const currentPosition = this.interpolatedTimeData
|
145
|
145
|
.map(dataSource => dataSource[time])
|
146
|
146
|
for(let j = 0; j < this.interpolatedTimeData.length; j++) {
|
147
|
147
|
if (isUndefined(currentPosition[j])) {
|
...
|
...
|
@@ -175,7 +175,7 @@ export class TripAnimationComponent implements OnInit, AfterViewInit, OnDestroy |
175
|
175
|
this.mapWidget.map.updatePolygons(this.interpolatedTimeData);
|
176
|
176
|
}
|
177
|
177
|
if (this.settings.showPoints) {
|
178
|
|
- this.mapWidget.map.updatePoints(formattedInterpolatedTimeData, this.calcTooltip);
|
|
178
|
+ this.mapWidget.map.updatePoints(formattedInterpolatedTimeData.map(ds => _.union(ds)), this.calcTooltip);
|
179
|
179
|
}
|
180
|
180
|
this.mapWidget.map.updateMarkers(currentPosition, true, (trip) => {
|
181
|
181
|
this.activeTrip = trip;
|
...
|
...
|
@@ -235,20 +235,19 @@ export class TripAnimationComponent implements OnInit, AfterViewInit, OnDestroy |
235
|
235
|
this.mainTooltips.push(this.sanitizer.sanitize(SecurityContext.HTML, tooltipText));
|
236
|
236
|
}
|
237
|
237
|
this.cd.detectChanges();
|
238
|
|
- this.activeTrip = point;
|
239
|
238
|
}
|
240
|
239
|
return tooltipText;
|
241
|
240
|
}
|
242
|
241
|
|
243
|
242
|
calcLabel(formattedDataArr: FormattedData[]) {
|
244
|
|
- this.label = '';
|
|
243
|
+ let labelToSet = '';
|
245
|
244
|
for (let formattedData of formattedDataArr) {
|
246
|
|
- const data = formattedData;
|
247
|
245
|
const labelText: string = this.settings.useLabelFunction ?
|
248
|
|
- safeExecute(this.settings.labelFunction, [data, this.historicalData, data.dsIndex]) : this.settings.label;
|
249
|
|
- const label = (parseWithTranslation.parseTemplate(labelText, data, true));
|
250
|
|
- this.label = this.label.length ? this.label + ',' + label : label;
|
|
246
|
+ safeExecute(this.settings.labelFunction, [formattedData, this.historicalData, formattedData.dsIndex]) : this.settings.label;
|
|
247
|
+ const label = (parseWithTranslation.parseTemplate(labelText, formattedData, true));
|
|
248
|
+ labelToSet = labelToSet.length ? labelToSet + ',' + label : label;
|
251
|
249
|
}
|
|
250
|
+ this.label = labelToSet;
|
252
|
251
|
}
|
253
|
252
|
|
254
|
253
|
interpolateArray(originData: FormattedData[]) {
|
...
|
...
|
|