From 0d31538d37e9a988d6adae821d85e6efe4ef1df0 Mon Sep 17 00:00:00 2001 From: MarStr Date: Tue, 27 Aug 2024 12:59:24 +0200 Subject: [PATCH] Corrected an issue which would write actual latitude/longitude into the file name, which was not desired. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 9b6768e..6859b26 100644 --- a/index.php +++ b/index.php @@ -11,7 +11,7 @@ if (isset($_POST)) { // Convert the JSON in POST to an array $json = json_decode(file_get_contents('php://input'), true); - $filename = $root_folder . $json["tile_lat"] . "-" . $json["square_lat"] . "_" . $json["tile_lng"] . "-" . $json["square_lng"] . ".xml"; + $filename = $root_folder . intval($json["tile_lat"]) . "-" . $json["square_lat"] . "_" . intval($json["tile_lng"]) . "-" . $json["square_lng"] . ".xml"; $url = "http://www.overpass-api.de/api/xapi?*[bbox=".$json["bbox"]["lng"].",".$json["bbox"]["lat"].",".$json["bbox"]["lng_b"].",".$json["bbox"]["lat_b"]."]"; // Check if the file we are looking for already exists -- 2.30.2