Small changes and fix zooming

This commit is contained in:
Andras Schmelczer 2026-05-05 20:30:04 +01:00
parent c69bb0d614
commit 329685a4ee
16 changed files with 823 additions and 202 deletions

View file

@ -127,11 +127,7 @@ async fn fetch_share_bounds(state: &AppState, code: &str) -> Option<ShareBounds>
return None;
}
let json: Value = resp.json().await.ok()?;
let params = json["items"]
.as_array()?
.first()?
.get("params")?
.as_str()?;
let params = json["items"].as_array()?.first()?.get("params")?.as_str()?;
parse_view_from_params(params).map(|(lat, lon, zoom)| bounds_from_view(lat, lon, zoom))
}