forked from MapComplete/MapComplete
Refactoring of GPS-location (uses featureSource too now), factoring out state, add ReplaceGeometryAction and conflation example
This commit is contained in:
parent
1db54f3c8e
commit
2484848cd6
37 changed files with 1035 additions and 467 deletions
|
|
@ -114,7 +114,16 @@ export class Changes {
|
|||
}
|
||||
|
||||
public async applyAction(action: OsmChangeAction): Promise<void> {
|
||||
const changes = await action.Perform(this)
|
||||
this.applyChanges(await action.Perform(this))
|
||||
}
|
||||
|
||||
public async applyActions(actions: OsmChangeAction[]) {
|
||||
for (const action of actions) {
|
||||
await this.applyAction(action)
|
||||
}
|
||||
}
|
||||
|
||||
public applyChanges(changes: ChangeDescription[]) {
|
||||
console.log("Received changes:", changes)
|
||||
this.pendingChanges.data.push(...changes);
|
||||
this.pendingChanges.ping();
|
||||
|
|
@ -126,6 +135,7 @@ export class Changes {
|
|||
CreateNewNodeAction.registerIdRewrites(mappings)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* UPload the selected changes to OSM.
|
||||
* Returns 'true' if successfull and if they can be removed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue