X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/cfb0f3f94ced30b8b44390367e07bc9b0cec787d..f4a86ff4c4be439571bf385af9df2912fa76cd3f:/website/details.php?ds=sidebyside diff --git a/website/details.php b/website/details.php index 0dc3397a..0025a8ba 100755 --- a/website/details.php +++ b/website/details.php @@ -99,10 +99,10 @@ $sSQL .= " CASE "; $sSQL .= " WHEN importance = 0 OR importance IS NULL THEN 0.75-(rank_search::float/40) "; $sSQL .= " ELSE importance "; $sSQL .= " END as calculated_importance, "; -$sSQL .= " ST_AsText(CASE "; +$sSQL .= " ST_AsGeoJSON(CASE "; $sSQL .= " WHEN ST_NPoints(geometry) > 5000 THEN ST_SimplifyPreserveTopology(geometry, 0.0001) "; $sSQL .= " ELSE geometry "; -$sSQL .= " END) as outlinestring"; +$sSQL .= " END) as asgeojson"; $sSQL .= " FROM placex "; $sSQL .= " WHERE place_id = $iPlaceID";