]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/api/v1/format.py
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / nominatim / api / v1 / format.py
index 7c8ba80897ff3cec093d355a71881638291de8bb..3f26f903c5675f28502cef19641aa86f34f88dbc 100644 (file)
@@ -96,7 +96,7 @@ def _add_parent_rows_grouped(writer: JsonWriter, rows: napi.AddressLines,
 def _format_search_json(result: napi.SearchResult, options: Mapping[str, Any]) -> str:
     locales = options.get('locales', napi.Locales())
     geom = result.geometry.get('geojson')
-    centroid = result.centroid_as_geojson()
+    centroid = result.centroid.to_geojson()
 
     out = JsonWriter()
     out.start_object()\