Just FYI, in the following case on macOS, you need to embed the navigation view in a geometry reader to get the safe area insets and subtract the top part from the tap y coordinate:
struct ContentView: View {
var body: some View {
NavigationView {
MyLeftSideView()
MyMapView()
}
}
}
And in the following case, coors are correctly calculated without caring about the safe area inset:
struct ContentView: View {
var body: some View {
MyMapView()
}
}