I have tried the below code : but it shows error cannot convert value of type float to expected argument type CLLocation degrees(aka Double)
let lat = self.mallData.valueForKey("lat") as! Float
let lon = self.mallData.valueForKey("lon")
let mapLocation : CLLocationCoordinate2D = CLLocationCoordinate2DMake(lat, lon)
The CLLocationCoordinate2DMake
supports Double
values. But you are converting lat
and lon
to Float
.
Try converting Lat
and Lon
to Double
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With