mapbox / mapbox/mapbox-maps-ios

Pin Placement not accurate while in Exaggeration 3D

Open
#2,263 0 comments 0 reactions 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: Version 15.4 (15F31d)
  • iOS version: We support >= iOS 14.0 and Tested on >= iOS 16.7.10
  • Devices affected: iPhones
  • Maps SDK Version: MapBox Maps and CoreMaps -> 11.6.1, MapBox Common -> 24.6.1, MapBox Geocoder -> 0.15.0

This is also happening on Android Devices:

  • Android Studio LadyBug 2024.2.1
  • Android Gradle Plugin: 8.5.0, Kotlin Version: 1.9.25, Gradle Version: 8.7
  • Compile SDK: 34, MinSDKVersion: 24
  • Maps SDK Version: MapBox Version -> 11.6.1, MapBox Turf Version -> 6.15.0

Observed behavior and steps to reproduce

Moving to a mountainous terrain like “47.675029, -120.971942” or even "37.392843, -118.789926"
Turning on 3D mode
Turning up the exaggeration
Getting the Coordinates from the top of the mountain gives coordinates behind the mountain

Expected behavior

The coordinates should be related to the mountain itself and not a position behind the mountain.

Notes / preliminary analysis

When the mountain is not focused by MapBox, the coordinates will retrieve values "behind" the mountain. It seems if mountain is focused, the coordinates will have the proper value relatively to the mountain. It seems to be difficult to get the proper coordinates because approaching and moving to the mountain leads the mountain to stay "unfocused".
If we use 2D we have the proper coordinates.

We are using the following to get the coordinates:
MapView.mapboxMap.coordinate(for: self.view.center)

Additional links and references

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 MapView.mapboxMap.coordinate(for: self.view.center) and reproduce the issue at 47.675029, -120.971942 or 37.392843, -118.789926 with 3D terrain and increased exaggeration. Compare the returned coordinate when the mountain is focused or viewed in 2D; done means the center coordinate corresponds to the mountain rather than a position behind it.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
computer-graphics, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.