Add names to feature sources, fix that old, cached geometries get changed when a newer version is loaded
This commit is contained in:
parent
6234d26bac
commit
141d4db028
14 changed files with 60 additions and 43 deletions
|
@ -5,10 +5,13 @@ import FeatureSource from "./FeatureSource";
|
|||
import {UIEventSource} from "../UIEventSource";
|
||||
|
||||
export default class RememberingSource implements FeatureSource {
|
||||
features: UIEventSource<{ feature: any, freshness: Date }[]>;
|
||||
public readonly features: UIEventSource<{ feature: any, freshness: Date }[]>;
|
||||
|
||||
public readonly name;
|
||||
|
||||
constructor(source: FeatureSource) {
|
||||
const self = this;
|
||||
this.name = "RememberingSource of "+source.name;
|
||||
const empty = [];
|
||||
this.features = source.features.map(features => {
|
||||
const oldFeatures = self.features?.data ?? empty;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue