Corrected an issue which would write actual latitude/longitude into the file name, which was not desired.

This commit is contained in:
MarStr 2024-08-27 12:59:24 +02:00
parent 4526e7b5fb
commit 0d31538d37

View File

@ -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