From c4f284031c9bf3be14c57728dc386de36cde1e9b Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Thu, 8 Jul 2021 14:35:32 +0200 Subject: [PATCH] Improve search API output --- web_view.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web_view.py b/web_view.py index 9b7799d..e66a1bb 100755 --- a/web_view.py +++ b/web_view.py @@ -364,6 +364,8 @@ def api_search(): if "geotext" in hit: del hit["geotext"] hit["name"] = nominatim.get_hit_name(hit) + hit["label"] = nominatim.get_hit_label(hit) + hit["address"] = list(hit["address"].items()) hit["identifier"] = f"{hit['osm_type']}/{hit['osm_id']}" return cors_jsonify(success=True, hits=hits)