mapbox / mapbox/mapbox-maps-ios
Real time line drawing, line shaking
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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