mapbox / mapbox/mapbox-maps-ios

Real time line drawing, line shaking

Open
#1,982 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

## Environment

- Xcode version: Version 14.3.1 (14E300c)
- iOS version: ios 16
- Devices affected:
- Maps SDK Version:

When using SDK to draw the route of a small car for real-time display, there is often shaking of the line.

```
let idStr: String = xunBianIdentifer + "_" + num
let sourceIder = geoJSONDataSourceXunBianLineIdentifier + num

let feature: Feature = Feature(geometry: LineString(coorLists))
let featureCollection = FeatureCollection(features: [feature])
var geoJSONSource = GeoJSONSource()
geoJSONSource.data = .featureCollection(featureCollection)
geoJSONSource.lineMetrics = true

var lineLayer = LineLayer(id: idStr)
lineLayer.source = sourceIder

lineLayer.lineColor = .constant(StyleColor(routeXunbianLine_color))
lineLayer.lineWidth = .constant(1)
lineLayer.lineCap = .constant(.round)
lineLayer.lineJoin = .constant(.round)
```

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 the reported real-time route drawing setup, especially the GeoJSONSource and LineLayer configuration shown in the issue, and reproduce the shaking on Xcode 14.3.1 with iOS 16. Investigate the line updates and rendering behavior; done means identifying the cause and producing a stable real-time line, with the affected device and Maps SDK version documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.