From 3feefd128d40f19a30d15bde6375814529a854d9 Mon Sep 17 00:00:00 2001 From: Shautvast Date: Sat, 4 Apr 2026 15:41:12 +0200 Subject: [PATCH] combine martin endpoints#3 --- backend/src/services/martin.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/src/services/martin.rs b/backend/src/services/martin.rs index 678fe30..067a37c 100644 --- a/backend/src/services/martin.rs +++ b/backend/src/services/martin.rs @@ -29,7 +29,13 @@ impl MartinService { x: u32, y: u32, ) -> Result<(Bytes, Option), AppError> { - let url = format!("{}/{layer}/{z}/{x}/{y}", self.base_url); + // Martin serves composite tiles via comma-separated source names in the URL. + let martin_layer = if layer == "osm_all" { + "planet_osm_polygon,planet_osm_line,planet_osm_point,planet_osm_roads" + } else { + layer + }; + let url = format!("{}/{martin_layer}/{z}/{x}/{y}", self.base_url); let resp = self.client.get(&url).send().await.map_err(|e| { tracing::error!(error = %e, "Martin connection error"); AppError::ServiceUnavailable("Martin tile server is unreachable".into())