add optional output of extratags to geocodejson

This commit is contained in:
Sarah Hoffmann
2025-02-16 10:16:40 +01:00
parent ee8915f2b6
commit 6730c8bac8

View File

@@ -249,6 +249,9 @@ def format_base_geocodejson(results: Union[ReverseResults, SearchResults],
out.keyval(f"level{line.admin_level}", line.local_name)
out.end_object().next()
if options.get('extratags', False):
out.keyval('extra', result.extratags)
out.end_object().next().end_object().next()
out.key('geometry').raw(result.geometry.get('geojson')