forked from MapComplete/MapComplete
Refactoring: move download functionality for OsmObjects into a new object
This commit is contained in:
parent
8eb2c68f79
commit
1f9aacfb29
23 changed files with 633 additions and 901 deletions
|
@ -1,6 +1,7 @@
|
|||
import ScriptUtils from "./ScriptUtils"
|
||||
import { appendFileSync, readFileSync, writeFileSync } from "fs"
|
||||
import { OsmObject } from "../Logic/Osm/OsmObject"
|
||||
import OsmObjectDownloader from "../Logic/Osm/OsmObjectDownloader";
|
||||
|
||||
ScriptUtils.fixUtils()
|
||||
|
||||
|
@ -17,7 +18,7 @@ const ids = JSON.parse(readFileSync("export.geojson", "utf-8")).features.map(
|
|||
)
|
||||
console.log(ids)
|
||||
ids.map((id) =>
|
||||
OsmObject.DownloadReferencingRelations(id).then((relations) => {
|
||||
new OsmObjectDownloader().DownloadReferencingRelations(id).then((relations) => {
|
||||
console.log(relations)
|
||||
const changeparts = relations
|
||||
.filter(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue