mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Send pin-drop location (#1179)
* add location sharing action in room, and open location sharing screen * add pin location sharing * fix asset, add tests for location viewModel, add send location request * fix map zoom level, fix assets for location * add feature flag for location sharing * hide attribution button
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import CoreLocation
|
||||
import Foundation
|
||||
|
||||
/// A structure that parses a geo URI (i.e. geo:53.99803101552848,-8.25347900390625;u=10) and constructs their constituent parts.
|
||||
@@ -71,3 +72,9 @@ private typealias RegexGeoURI = Regex<(Substring, latitude: Substring, longitude
|
||||
private extension RegexGeoURI {
|
||||
static let standard: Self = /geo:(?<latitude>-?\d+(?:\.\d+)?),(?<longitude>-?\d+(?:\.\d+)?)(?:;u=(?<uncertainty>\d+(?:\.\d+)?))?/
|
||||
}
|
||||
|
||||
extension GeoURI {
|
||||
init(coordinate: CLLocationCoordinate2D) {
|
||||
self.init(latitude: coordinate.latitude, longitude: coordinate.longitude)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user