From e61410bca9ecbb3e806f57a2edc12314380bd3ba Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Fri, 7 May 2021 14:37:11 +0200 Subject: [PATCH] Remove unneeded file --- Logic/Actors/UpdateTagsFromOsmAPI.ts | 42 ---------------------------- 1 file changed, 42 deletions(-) delete mode 100644 Logic/Actors/UpdateTagsFromOsmAPI.ts diff --git a/Logic/Actors/UpdateTagsFromOsmAPI.ts b/Logic/Actors/UpdateTagsFromOsmAPI.ts deleted file mode 100644 index 660b22940..000000000 --- a/Logic/Actors/UpdateTagsFromOsmAPI.ts +++ /dev/null @@ -1,42 +0,0 @@ -import {UIEventSource} from "../UIEventSource"; -import {ElementStorage} from "../ElementStorage"; -import {OsmObject, OsmObjectMeta} from "../Osm/OsmObject"; - -export default class UpdateTagsFromOsmAPI { - - - /*** - * This actor downloads the element from the OSM-API and updates the corresponding tags in the UI-updater. - */ - constructor(idToDownload: UIEventSource, allElements: ElementStorage, callback? : (element: OsmObject) => void) { - - idToDownload.addCallbackAndRun(id => { - if (id === undefined) { - return; - } - - OsmObject.DownloadObject(id, (element: OsmObject, meta: OsmObjectMeta) => { - console.debug("Updating tags from the OSM-API: ", element) - - - const tags = element.tags; - tags["_last_edit:contributor"] = meta["_last_edit:contributor"] - tags["_last_edit:contributor:uid"] = meta["_last_edit:contributor:uid"] - tags["_last_edit:changeset"] = meta["_last_edit:changeset"] - tags["_last_edit:timestamp"] = meta["_last_edit:timestamp"].toLocaleString() - tags["_version_number"] = meta._version_number - if (!allElements.has(id)) { - console.warn("Adding element by id") - allElements.addElementById(id, new UIEventSource(tags)) - } else { - // We merge - console.warn("merging by OSM API UPDATE") - allElements.addOrGetById(id, tags) - } - }) - }) - - } - - -} \ No newline at end of file