X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/eb79e655e638a4345a130ceef6b0d31a1ab5b1f9..e841422b1f9fe85bcce03d5406a42a855d432d10:/website/details.php 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";