Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created July 14, 2020 17:54
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 BetterProgramming/745ea6800a52168ff03c87004d86c920 to your computer and use it in GitHub Desktop.
Save BetterProgramming/745ea6800a52168ff03c87004d86c920 to your computer and use it in GitHub Desktop.
struct Location {
let id = UUID()
let title: String
let coordinate: CLLocationCoordinate2D
}
extension Location: Identifiable { }
extension Location {
static func getLocation() -> [Location] {
return [
Location(title: "KLCC Park", coordinate: CLLocationCoordinate2D(latitude: 3.155699, longitude: 101.713934)),
Location(title: "Twin Tower", coordinate: CLLocationCoordinate2D(latitude: 3.157804, longitude: 101.711869))
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment