forked from MapComplete/MapComplete
Small tweaks
This commit is contained in:
parent
1d2d098167
commit
0ab0d159cc
6 changed files with 52 additions and 21 deletions
|
@ -27,7 +27,9 @@ export class Changes {
|
|||
private readonly previouslyCreated : OsmObject[] = []
|
||||
|
||||
constructor() {
|
||||
|
||||
this.isUploading.addCallbackAndRun(uploading => {
|
||||
console.trace("Is uploading changed:", uploading)
|
||||
})
|
||||
}
|
||||
|
||||
private static createChangesetFor(csId: string,
|
||||
|
@ -255,6 +257,9 @@ export class Changes {
|
|||
console.log("Needed ids", neededIds)
|
||||
OsmObject.DownloadAll(neededIds, true).addCallbackAndRunD(osmObjects => {
|
||||
console.log("Got the fresh objects!", osmObjects, "pending: ", pending)
|
||||
try{
|
||||
|
||||
|
||||
const changes: {
|
||||
newObjects: OsmObject[],
|
||||
modifiedObjects: OsmObject[]
|
||||
|
@ -283,6 +288,11 @@ export class Changes {
|
|||
return self.isUploading.setData(false);
|
||||
} // Failed - mark to try again
|
||||
)
|
||||
}catch(e){
|
||||
console.error("Could not handle changes - probably an old, pending changeset in localstorage with an invalid format; erasing those", e)
|
||||
self.pendingChanges.setData([])
|
||||
self.isUploading.setData(false)
|
||||
}
|
||||
return true;
|
||||
|
||||
});
|
||||
|
|
|
@ -437,6 +437,9 @@ export class OsmWay extends OsmObject {
|
|||
|
||||
for (const nodeId of element.nodes) {
|
||||
const node = nodeDict.get(nodeId)
|
||||
if(node === undefined){
|
||||
console.error("Error: node ", nodeId, "not found in ", nodeDict)
|
||||
}
|
||||
const cp = node.centerpoint();
|
||||
this.coordinates.push(cp);
|
||||
latSum = cp[0]
|
||||
|
|
|
@ -305,7 +305,7 @@ export default class SimpleMetaTagger {
|
|||
} else if (_otherParkingMode.matchesProperties(properties)) {
|
||||
parallelParkingCount = 0;
|
||||
} else {
|
||||
console.log("No parking data for ", properties.name, properties.id, properties)
|
||||
console.log("No parking data for ", properties.name, properties.id)
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue