comparison GeoQuiz/Helpers/CityMap.swift @ 6:1946bbfde4af

reformat data structures
author Dennis C. M. <dennis@denniscm.com>
date Thu, 29 Sep 2022 12:00:17 +0200
parents
children d945e52b0704
comparison
equal deleted inserted replaced
5:f31a61462e7a 6:1946bbfde4af
1 //
2 // CityMap.swift
3 // GeoQuiz
4 //
5 // Created by Dennis Concepción Martín on 24/9/22.
6 //
7
8 import SwiftUI
9 import MapKit
10
11 struct CityMap: View {
12 @State var region: MKCoordinateRegion
13
14 var body: some View {
15 Map(coordinateRegion: $region, interactionModes: MapInteractionModes())
16 .clipShape(RoundedRectangle(cornerRadius: 20))
17 .shadow(radius: 10)
18 }
19 }
20
21 struct CityMap_Previews: PreviewProvider {
22 static var region = MKCoordinateRegion(
23 center: CLLocationCoordinate2D(latitude: 51.507222, longitude: -0.1275),
24 span: MKCoordinateSpan(latitudeDelta: 0.5, longitudeDelta: 0.5)
25 )
26
27 static var previews: some View {
28 CityMap(region: region)
29 .frame(width: 300, height: 300)
30 }
31 }