From 4c59c5cf38985555bffa8c30e912e978b753e091 Mon Sep 17 00:00:00 2001 From: zstadler Date: Wed, 25 Oct 2023 10:23:03 +0300 Subject: [PATCH] Show map also when changeset still open Resolve #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) --- lib/getChangeset.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/getChangeset.js b/lib/getChangeset.js index 8d60303..123b4eb 100644 --- a/lib/getChangeset.js +++ b/lib/getChangeset.js @@ -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);' ); }