Small changes and fix zooming
This commit is contained in:
parent
c69bb0d614
commit
329685a4ee
16 changed files with 823 additions and 202 deletions
|
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue