martin zoom levels

This commit is contained in:
Shautvast 2026-04-03 21:40:59 +02:00
parent 6457c9d20e
commit 77f6e859ff

View file

@ -62,29 +62,6 @@ impl MartinService {
Ok((body, etag))
}
/// Fetch the style.json from Martin.
pub async fn get_style(&self) -> Result<serde_json::Value, AppError> {
let url = format!("{}/style.json", 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())
})?;
if !resp.status().is_success() {
return Err(AppError::UpstreamError(format!(
"Martin returned status {}",
resp.status()
)));
}
let json: serde_json::Value = resp.json().await.map_err(|e| {
tracing::error!(error = %e, "Failed to parse Martin style.json");
AppError::UpstreamError("Failed to parse style.json".into())
})?;
Ok(json)
}
/// Health probe — simple connectivity check.
pub async fn health_check(&self) -> Result<u64, ()> {
let start = std::time::Instant::now();