diff --git a/Logic/FeatureSource/Sources/NewGeometryFromChangesFeatureSource.ts b/Logic/FeatureSource/Sources/NewGeometryFromChangesFeatureSource.ts index ca5cf703d..214b13962 100644 --- a/Logic/FeatureSource/Sources/NewGeometryFromChangesFeatureSource.ts +++ b/Logic/FeatureSource/Sources/NewGeometryFromChangesFeatureSource.ts @@ -104,7 +104,7 @@ export class NewGeometryFromChangesFeatureSource implements FeatureSource { const w = new OsmWay(change.id) w.tags = tags w.nodes = change.changes["nodes"] - w.coordinates = change.changes["coordinates"].map(coor => [coor[1], coor[0]]) + w.coordinates = change.changes["coordinates"].map(([lon, lat]) => [lat, lon]) add(w.asGeoJson()) break; case "relation": diff --git a/Logic/Osm/OsmObject.ts b/Logic/Osm/OsmObject.ts index 4e5ccc2e3..c73cf4e72 100644 --- a/Logic/Osm/OsmObject.ts +++ b/Logic/Osm/OsmObject.ts @@ -402,7 +402,7 @@ export class OsmWay extends OsmObject { } public asGeoJson() { - let coordinates: ([number, number][] | [number, number][][]) = this.coordinates.map(c => [c[1], c[0]]); + let coordinates: ([number, number][] | [number, number][][]) = this.coordinates.map(([lat, lon]) => [lon, lat]); if (this.isPolygon()) { coordinates = [coordinates] }