mapbox / mapbox/mapbox-maps-ios
Offline Load Tile Region in version above 11.3 not work with custom style.
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- Xcode version: 15.4
- iOS version: 17.5
- Devices affected: Iphone 15 Pro Max
- Maps SDK Version: 11.5.1
Observed behavior and steps to reproduce
I have issue from loadTileRegion. My app use custom styleURL and mapview was load style successfully. I write a function for create a TileRegionLoadOptions
let offlineManager = OfflineManager()
let bounds = mapView.mapboxMap.coordinateBounds(for: mapView.bounds)
let coordinates = [bounds.southwest, bounds.northeast, bounds.northwest, bounds.southeast]
if let styleURI = mapView.mapboxMap.styleURI {
let options = TilesetDescriptorOptions(styleURI: styleURI, zoomRange: 7...16, tilesets: nil)
let tilesetDescriptor = offlineManager.createTilesetDescriptor(for: options)
let tileRegionLoadOptions = TileRegionLoadOptions(
geometry: .polygon(.init([coordinates])),
descriptors: [tilesetDescriptor], metadata: nil,
acceptExpired: false, networkRestriction: .none)
}
and use it with
TileStore.default.loadTileRegion(
forId: name,
loadOptions: options)
For version 11.2, it will working normally ( have download progress )
But in version above 11.3, It will instant return TileRegion with zero data ( requiredResourceCount , completedResourceCount, completedResourceSize ).
Expected behavior
I want it working normally in version above 11.3.
Notes / preliminary analysis
Because of rejected from Apple about Privacyinfo.xcprivacy in version below 11.3, I cannot use them. So I'm trying to upgrade to newer version but facing this issue.
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 by reproducing the issue with the provided TileRegionLoadOptions and TileStore.default.loadTileRegion code using a custom styleURL on SDK 11.5.1, then compare it with 11.2. Trace the offline loading path around OfflineManager, TilesetDescriptorOptions, and TileRegionLoadOptions. Done means the region reports nonzero resource counts and download progress for the newer SDK.
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
- 38/100