mapbox / mapbox/mapbox-maps-android

Camera fails to display MultiPoint when longitude span is too large in transitionTo overviewViewportState

Open
#2,668 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :beetle:
Dominant language
Kotlin
Stars
578
Forks
161
PR merge metrics
No merged PRs in 30d

Description

## Environment

- Android OS version:15
- Devices affected:pixel 8a
- Maps SDK Version:11.13.4

When using transitionTo with a MultiPoint to create an overviewViewportState, an excessively large longitude span causes incorrect camera movement, resulting in the MultiPoint locations not being displayed.

`mapboxMap.setCamera(
CameraOptions.Builder()
.center(Point.fromLngLat(-98.0, 39.5))
.pitch(0.0)
.zoom(2.0)
.bearing(0.0)
.build()
)`

`val overviewViewportState = viewport.makeOverviewViewportState(
OverviewViewportStateOptions.Builder()
.geometry(
MultiPoint.fromLngLats(
listOf(
Point.fromLngLat(-96.6939018, 33.0646573),
Point.fromLngLat(114.4083741, 30.5065038)
)
)
)
.padding(EdgeInsets(100.0, 100.0, 100.0, 100.0))
.build()
)
viewport.transitionTo(overviewViewportState)`

Image

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 with viewport.makeOverviewViewportState and transitionTo using the provided MultiPoint, padding, and CameraOptions values on Android 15 with Maps SDK 11.13.4. Reproduce the camera movement with the large longitude span and inspect the viewport behavior. Done means both MultiPoint locations are displayed in the resulting overview viewport.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.