Skip to content

Commit 4f97e52

Browse files
authored
Merge pull request #229 from osmlab/comments-api
Fetch OSM api with include_discussion=true
2 parents 8fda8a6 + 6c10e65 commit 4f97e52

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
Log of changes since the 1.1.0 version
44

5+
#### 1.9.3
6+
7+
- Fetch OSM api with include_discussion=true and pass data to render function (#229)
8+
9+
#### 1.9.2
10+
11+
- Fallback to overpass if the elements field of real-changesets is empty (#228)
12+
513
#### 1.9.1
614

715
- Fetch OSM API with json format (#226)

lib/query.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import moment from 'moment';
22
import { config } from './config';
33

44
export function query(changesetID) {
5-
var url = `${config.osmBase}changeset/${changesetID}.json`;
5+
var url = `${config.osmBase}changeset/${changesetID}.json?include_discussion=true`;
66
var options = {
77
method: 'GET',
88
headers: { 'Content-Type': 'application/json' }
@@ -19,6 +19,7 @@ export function query(changesetID) {
1919
.subtract(1, 'seconds')
2020
.format('YYYY-MM-DDTHH:mm:ss\\Z'),
2121
to: cs.closed_at || null,
22+
comments: r.elements[0].discussion || [],
2223
bbox: {
2324
left: cs.minlon || -180,
2425
bottom: cs.minlat || -90,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "changeset-map",
3-
"version": "1.9.2",
3+
"version": "1.9.3",
44
"description": "Provide visualization of changesets to OSMCha & to the OSM community",
55
"main": "dist/bundle.js",
66
"scripts": {

0 commit comments

Comments
 (0)