Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func shareLocation(with coordinates: CLLocationCoordinate2D, address: Address?) {
- let googleString = "https://maps.google.com/?q=\(coordinates.latitude),\(coordinates.longitude)"
- var finalString = googleString
- if let address = address {
- if address.completeAddress.isEmpty {
- finalString = "\(address.placeName)\n\(googleString)"
- } else {
- finalString = "\(address.placeName)\n\(address.completeAddress)\n\(googleString)"
- }
- }
- DispatchQueue.main.async {
- self.viewModel.sendTextMessage(text: finalString, isVideoCall: false)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement