aboutsummaryrefslogtreecommitdiff
path: root/iosApp/iosApp/Shared/Utils.swift
diff options
context:
space:
mode:
Diffstat (limited to 'iosApp/iosApp/Shared/Utils.swift')
-rw-r--r--iosApp/iosApp/Shared/Utils.swift7
1 files changed, 7 insertions, 0 deletions
diff --git a/iosApp/iosApp/Shared/Utils.swift b/iosApp/iosApp/Shared/Utils.swift
index 9b473a5..61a8f90 100644
--- a/iosApp/iosApp/Shared/Utils.swift
+++ b/iosApp/iosApp/Shared/Utils.swift
@@ -38,4 +38,11 @@ class Utils {
tileInfo.cacheDir = thisCacheDir
return tileInfo
}
+
+ static func getMapsURL(longitude: Float, latitude: Float) -> URL? {
+ let template = NSLocalizedString("maps-url-template", comment: "")
+ return URL(string: template
+ .replacingOccurrences(of: "{x}", with: "\(latitude)")
+ .replacingOccurrences(of: "{y}", with: "\(longitude)"))
+ }
}