33 lines
648 B
Swift
33 lines
648 B
Swift
import SwiftUI
|
|
import CoreLocation
|
|
|
|
struct RouteView: View {
|
|
|
|
let locations: [CLLocation]
|
|
|
|
let height: CGFloat = 200
|
|
|
|
let vPadding: CGFloat = 16
|
|
|
|
let hPadding: CGFloat = 6
|
|
|
|
var body: some View {
|
|
GeometryReader { geo in
|
|
WorkoutMapView(locations: locations)
|
|
.frame(width: geo.size.width,
|
|
height: height)
|
|
.disabled(true)
|
|
}
|
|
.frame(height: height)
|
|
.listRowSeparator(.hidden)
|
|
}
|
|
}
|
|
|
|
struct RouteView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
RouteView(locations: [
|
|
.mock
|
|
])
|
|
}
|
|
}
|