mapbox / mapbox/mapbox-maps-ios

Incorrectly drawn line on globe

Open
#2,118 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Environment

  • Xcode version: 15.1
  • iOS version: 17
  • Devices affected: all
  • Maps SDK Version: 11.1

Observed behavior and steps to reproduce

I have given Mapbox a line to draw:

LineString([
    CLLocationCoordinate2DMake(36.1943265363222, -115.19056694158435),
    CLLocationCoordinate2DMake(62.02064170269384, -49.674793172420024)
]))

Unfortunately the line drawn is not correct on globe projection.
image

Expected behavior

This is how it should be (image from google earth)
image

With mercator projection is looks as it should:
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 by reproducing the LineString example with the supplied coordinates in the Mapbox Maps SDK on iOS, comparing globe and Mercator projections with the attached expected images. The issue names no source files or tests, so locate the globe line-rendering path first; done means the globe projection draws the route as expected without regressing Mercator behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
computer-graphics, mobile-dev
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.