Problems with SwiftUI Map View

The SwiftUI Map view is a great timesaver, but has some odd issues.

When two Map views are visible, (e.g. siblings in a vStack):

  • Both views will receive input applied to one, e.g. panning by sliding a finger across one of the views. Here, the views are in sync with each other.
  • Zoom by pinch gesture (in or out) does not work. In fact, coordinateRegion supplied to the Map() view has no effect either.

This extends to a scenario with a map on a presented view, where the parent view also displays a map.

Time to dig in and wrap MKMapView.

James Cowlishaw @Cowlibob
Mastodon