I am getting following error in compiler -
(position: CLLocationCoordinate2D) -> GMSMarker
is not convertible to (position: CLLocationCoordinate2D) -> GMSMarker!
.
Please help me to resolve it.
The code that gives this error is -
let location = CLLocationCoordinate2D(latitude: Double(latitudeVal!)!, longitude: Double(longitudeVal!)!)
let locationMarker = GMSMarker(position: location)
Where latitudeVal
& longitudeVal
are string values from server.
Thanks in advance.