Hello everyone i would like to get data from 3 arrays for creating map annotations. But i could not load data from those 3 arrays to a class. Here is my code:
My class file:
import MapKit
class Jobdata: NSObject, MKAnnotation {
let title: String?
let coordinate: CLLocationCoordinate2D
init(title: String, coordinate: CLLocationCoordinate2D) {
self.title = title
self.coordinate = coordinate
super.init()
}
}
These are my arrays:
var jobNameST = [String]()
var jobLongitudeST = [Double]()
var jobLatitudeST = [Double]()
And this is my locations array:
let jobLocations = [Jobdata(title: "test", coordinate: CLLocationCoordinate2D(latitude: 30.4692991035765, longitude: -97.7660876))]
I would like to add those 3 arrays to my locations array.