maplibre-rs
maplibre-rs copied to clipboard
Increase coords consistency and clamp zoom level to numerically feasible range
- Clamp the integer
ZoomLevel
to0..31
when converted from floating pointZoom
- Restrict traversal of
WorldTileCoords
to supported zoom level range - Construct QuadKey with the
morton_encoding
crate. This change is here because the previous QuadKey depended on the ZoomLevel type.
Fixes crash from #161 by making the "backend" more robust.
Does not implemented the desired zoom limit. This is done in #180
💻 Examples
You can arbitrarily zoom in/out in the demo without panic.
🚨 Test instructions
Launch demo and start zooming :)
✔️ PR Todo
I am not satisfied with these points yet and lack the domain knowledge to proceed:
- [ ] Check
get_children
usage in renderer - [ ] Properly handle signedness of
WorldTileCoords
- [ ] Check if saturation in
ViewRegion::iter
is the correct way to go