mapbox / mapbox/mapbox-maps-ios
Append sku and access_token url parameters to any tile requests that require them (raster-dem)
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
I've found that when I'm trying to use a custom map style.json that uses the mapbox://mapbox.mapbox-terrain-dem-v1 tiles this requires an sku url parameter along with an access_token to be correctly accessed, else a response of 403 is thrown. This limits the use of these tiles for normal and offline use via a custom style.
I've had to use mapbox://mapbox.terrain-rgb instead so Mapbox is missing out on the user session identifier with this approach.
These parameters are correctly added when using a style directly from the Mapbox API.
Solutions could be either
1. Pass along these url parameters to the custom style for use by the developer
2. Append parameters with in the SDK to any tile source requests if they need it or not
3. Append parameters with in the SDK to any tile source requests for only Mapbox tile sources such as mapbox://mapbox.mapbox-terrain-dem-v1 if they are a source from the Mapbox style or a custom style
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 403 with a custom style.json using mapbox://mapbox.mapbox-terrain-dem-v1, comparing it with a style fetched through the Mapbox API. Trace the SDK entry point that constructs tile-source requests and determine how normal and offline requests should receive sku and access_token parameters. Done means the required requests work for custom styles without breaking offline use, with regression coverage for the reported case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100