From 1117fb7d5a8b9696cb6d15d591f46a35ac482f97 Mon Sep 17 00:00:00 2001 From: BenediktSeidlSWM Date: Mon, 14 Oct 2024 12:41:24 +0200 Subject: [PATCH 1/2] Update README.md Include support for multiple columns in info_sql config option --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 871083f..ab5c842 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,8 @@ Examples: }, { "db_url": "postgresql:///?service=qwc_geodb", - "info_sql": "SELECT type FROM qwc_geodb.ne_10m_admin_0_countries WHERE ST_contains(wkb_geometry, ST_SetSRID(ST_Point(:x, :y), :srid)) LIMIT 1", - "info_title": "Type" + "info_sql": "SELECT type, abbrev FROM qwc_geodb.ne_10m_admin_0_countries WHERE ST_contains(wkb_geometry, ST_SetSRID(ST_Point(:x, :y), :srid)) LIMIT 1", + "info_title": ["Type", "Abbreviation"] } ] } From 505b49644531fa7553bee0cd563cc601e7222439 Mon Sep 17 00:00:00 2001 From: BenediktSeidlSWM Date: Mon, 14 Oct 2024 16:49:17 +0200 Subject: [PATCH 2/2] Add multiple titles as a separate example --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ab5c842..ffe8a5c 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,13 @@ Examples: }, { "db_url": "postgresql:///?service=qwc_geodb", - "info_sql": "SELECT type, abbrev FROM qwc_geodb.ne_10m_admin_0_countries WHERE ST_contains(wkb_geometry, ST_SetSRID(ST_Point(:x, :y), :srid)) LIMIT 1", - "info_title": ["Type", "Abbreviation"] + "info_sql": "SELECT type FROM qwc_geodb.ne_10m_admin_0_countries WHERE ST_contains(wkb_geometry, ST_SetSRID(ST_Point(:x, :y), :srid)) LIMIT 1", + "info_title": "Type" + }, + { + "db_url": "postgresql:///?service=qwc_geodb", + "info_sql": "SELECT abbrev, postal, subregion FROM qwc_geodb.ne_10m_admin_0_countries WHERE ST_contains(wkb_geometry, ST_SetSRID(ST_Point(:x, :y), :srid)) LIMIT 1", + "info_title": ["Abbreviation", "Postal Code", "Subregion"] } ] }