Skip to content

Instantly share code, notes, and snippets.

@stevencurtis
Created June 23, 2020 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevencurtis/7a3b7cfd1075c5228b24fdfeb5f19223 to your computer and use it in GitHub Desktop.
Save stevencurtis/7a3b7cfd1075c5228b24fdfeb5f19223 to your computer and use it in GitHub Desktop.
mapcode
struct MapExampleView: View {
@State private var region = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: 51.507351, longitude: -0.127758), span: MKCoordinateSpan(latitudeDelta: 1, longitudeDelta: 1))
var body: some View {
Map(coordinateRegion: $region)
}
}
struct MapExampleView_Previews: PreviewProvider {
static var previews: some View {
MapExampleView()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment