mapbox / mapbox-maps-ios

Interactive, thoroughly customizable maps for iOS powered by vector tiles and Metal
https://www.mapbox.com/mapbox-mobile-sdk
Other
487 stars 157 forks source link

Incorrect point to coordinate conversion atop 3D terrain #2141

Open davenquinn opened 9 months ago

davenquinn commented 9 months ago

Environment

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).

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.

davenquinn commented 7 months ago

@persidskiy or other maintainers, any insights or further information needed here? I'm eager to upgrade to v11 but this is a blocker for me unfortunately.