mapbox / mapbox/mapbox-maps-ios

Incorrect point to coordinate conversion atop 3D terrain

Open
#2,141 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

## Environment

- Xcode version: 15.0
- iOS version: 17.1.2
- Devices affected: iPad Pro, Simulator
- Maps SDK Version: v11 (11.0.0-beta.2 and 11.2.0)

## Observed behavior and steps to reproduce

https://github.com/mapbox/mapbox-maps-ios/assets/1537910/1f3fa45e-b794-42ea-9eda-ac781a5d96b9

In version 11 of the SDK, there is an issue with capturing coordinates for map view points. A stream of points is provided to the map to convert to geographic space:

```
func mapPosition(_ pixels: [CGPoint]) -> [CLLocationCoordinate2D] {
return self.mapView.mapboxMap.coordinates(for: pixels)
}
```

In SDK v10, this produces smooth linework at all orientations. In v11, large artifacts appear where some coordinates are incorrectly captured. This leads to erratic jumps in captured lines (see video, 0-11 seconds).

- Artifacts appear smaller/less frequent when the map is oriented "north up"
- Artifacts are only present when the map is in 3D terrain mode (see video past 15 seconds for correctly captured line at nadir view)
- This has been tested with Mapbox satellite style, Mapbox terrain v1, and Mercator CRS

## Expected behavior

Lines are drawn smoothly, without zig-zag artifacts, as was the case in v10

## Notes

This appears to be a regression in the v11 series.

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 at mapView.mapboxMap.coordinates(for:) and reproduce the conversion with the reported iOS and SDK versions, especially over 3D terrain and different orientations. Compare the v10 and v11 behavior using the provided video and reproduction details; done means point streams produce smooth lines without zig-zag artifacts in the affected terrain views.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.