mapbox / mapbox/mapbox-maps-ios
Disabling Location Service for map view not working
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
## Environment
- Xcode version: 16.3
- iOS version: 18.0
- Maps SDK Version: 11.12.2
## Observed behavior and steps to reproduce
When moving app to background, we want to stop location updates to save energy.
on previous versions this worked:
locationProvider.removeLocationObserver(for: self)
mapView.location.options.puckType = .none
Now this has no effect, the app is still requesting location updates.
Is there a workaround?
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
Reproduce on Xcode 16.3, iOS 18.0, and Maps SDK 11.12.2 while tracing locationProvider.removeLocationObserver(for:) and mapView.location.options.puckType. Compare the behavior when the app enters the background with the previous SDK behavior; done means location requests stop as intended and the regression is verified.
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