mapbox / mapbox/mapbox-maps-ios

Support zooming while setting viewport to follow puck

Open
#2,361 0 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged feature :green_apple:
Dominant language
Swift
Stars
601
Forks
196
PR merge metrics
No merged PRs in 30d

Description

## New Feature

<- Description of the feature being requested and any outcomes desired, an example use case, and any suggestions for solution ->

It would be great to have a way to set viewport = .followPuck and still be able to zoom in and out without panning (i.e., without changing the viewport).

Currently, whenever the zoom is adjusted, the viewport zoom resets on the next location update.

The current workaround is to:

1. Pan the map, which changes the viewport to .camera.

2. Adjust the zoom.

3. Recenter to reset viewport = .followPuck.

## Why
<- 1-2 sentence description of why you're requesting this feature. What problem does it solve? Why is it valuable? -> It's helpful and a nice experience for the user to be able to smoothly use the camera zoom when in `.followPuck` mode without having it reset every second

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how viewport = .followPuck handles location updates and how zoom changes are applied. Reproduce the zoom reset while following the puck, then verify that changing zoom preserves the selected zoom across subsequent location updates without requiring panning or recentering.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.