From 75f8684678ea4e7d9401c586cabe155fe718210e Mon Sep 17 00:00:00 2001 From: Axi <49078493+Axiangel@users.noreply.github.com> Date: Fri, 12 Sep 2025 15:43:14 +0200 Subject: [PATCH] Update set_location.php for Nominatim 5.1 Update set_location.php for Nominatim 5.1 adding /search? Also using URL encode when building the string --- actions/set_location.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/actions/set_location.php b/actions/set_location.php index 9b8cd47a..ff071ca4 100644 --- a/actions/set_location.php +++ b/actions/set_location.php @@ -27,11 +27,10 @@ $lon = $_GET['lon']; } else { - - $street = str_replace(" ", "%20", $_POST['street']); - $city = str_replace(" ", "%20", $_POST['city']); - - $filepath=$_SESSION['providerURL']."/?addressdetails=1&q=".$street."%20".$city."&format=json&limit=1"; + + $address = urlencode($_POST['street'] . ' ' . $_POST['city']); + $filepath=$_SESSION['providerURL']."/search?addressdetails=1&q=$address&format=json&limit=1"; + if ( strlen($_SESSION['staticKey']) == 32 ) { $filepath.="&key=".$_SESSION['staticKey']; }