mapbox-maps-ios icon indicating copy to clipboard operation
mapbox-maps-ios copied to clipboard

Incorrect point to coordinate conversion atop 3D terrain

Open davenquinn opened this issue 1 year ago • 1 comments

Environment

  • Xcode version: 15.0
  • iOS version: 17.1.2
  • Devices affected: iPad Pro, Simulator
  • Maps SDK Version: v11 (11.0.0-beta.2 and 11.2.0)

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

  • Artifacts appear smaller/less frequent when the map is oriented "north up"
  • Artifacts are only present when the map is in 3D terrain mode (see video past 15 seconds for correctly captured line at nadir view)
  • This has been tested with Mapbox satellite style, Mapbox terrain v1, and Mercator CRS

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 avatar Mar 06 '24 16:03 davenquinn

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

davenquinn avatar May 04 '24 17:05 davenquinn