Skip to content

Commit

Permalink
Show map also when changeset still open
Browse files Browse the repository at this point in the history
Resolve osmlab#240 using the one-timestamp variant of the Overpass `adiff` statement if the `closed_at` property of the changeset is not set. For example
```
[adiff:"2023-10-25T07:00:00Z"]
```

Also, simplify the overpass query using the new-ish [`nwr` syntax](https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#The_Query_Statement)
  • Loading branch information
zstadler authored Oct 25, 2023
1 parent 1b5cbaa commit 4c59c5c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/getChangeset.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ function getDataParam(c) {
return (
'[out:xml][adiff:%22' +
c.from.toString() +
',%22,%22' +
c.to.toString() +
'%22];(node(bbox)(changed);way(bbox)(changed);relation(bbox)(changed););out%20meta%20geom(bbox);'
(c.to ? '%22,%22' + c.to.toString() : '') +
'%22];nwr(bbox)(changed);out%20meta%20geom(bbox);'
);
}

Expand Down

0 comments on commit 4c59c5c

Please # to comment.