Rephrase to increase clarity
This commit is contained in:
parent
9c47111696
commit
508ef8a970
2 changed files with 2 additions and 2 deletions
|
@ -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":
|
||||
|
|
|
@ -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]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue