mapbox / mapbox/mapbox-maps-ios
[OFFLINE DOWNLOADS BROKEN] Layers disappearing instead of being overzoomed if offline tile region/style pack downloaded
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- Xcode version: 14.2
- iOS version: 16.2
- Devices affected: all
- Maps SDK Version: 10.12.0
## Observed behavior and steps to reproduce
When downloading an offline tile region and style pack for a style that has sources with different max zooms, the layers from the sources with the smaller max zooms completely disappear when zooming in instead of overzooming as they regularly do.
Example: a layer for streets from a tileset that goes from z0 to z16, and a layer for land that goes from z0 to z12. If a pack and region are downloaded for this style, once you zoom in past z12 the land disappears and only the streets are visible, despite the style normally overzooming the land.
https://user-images.githubusercontent.com/12274098/227966302-7957c869-f07d-4c35-88ce-04f1af9e8b75.mov
I have also made a gist modifying the OfflineManagerExample.swift and adding a style that combines mapbox streets with a custom tileset with z12 max zoom that reproduces this:
https://gist.github.com/msfstef/09f9b5b0e2a5ad0090c487510a7f2466
## Expected behavior
Should behave exactly the same as if there wasn't a style pack and tile region downloaded and the user is online, which is to overzoom layers from sources with a smaller max zoom. It should look like it does when online or in the style editor.
## Notes / preliminary analysis
From testing a few things it seems to me that sources with different max zooms are at fault, as when I tried downloading a region from a style that only contained the same data from a source with max zoom 12, it overzoomed correctly with the offline tile region. It only showed issues when it was within a style with sources with a higher max zoom.
## Additional links and references
The same exact issue is on the Android SDK, and I believe some issues that have been closed without being addressed refer to the same issue, see https://github.com/mapbox/mapbox-maps-android/issues/1428
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the modified OfflineManagerExample.swift and the linked reproduction gist, using a style that combines sources with different maximum zooms. Compare downloaded offline behavior with online behavior while zooming past the lower source limit; done means lower-zoom layers remain visible through overzooming as they do online.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100