martin zoom levels
This commit is contained in:
parent
6457c9d20e
commit
77f6e859ff
1 changed files with 0 additions and 23 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue