-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
479 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
app/Assets.xcassets/Colors/dgs_green.colorset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "41", | ||
"green" : "153", | ||
"red" : "63" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "splash_logo.pdf", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import SwiftUI | ||
import PlatformSDK | ||
|
||
extension Future { | ||
|
||
@inlinable public func sinkOnMainThread( | ||
receiveValue: @escaping (Value) -> Void, | ||
failure: @escaping (Error) -> Void | ||
) -> PlatformSDK.Cancellable { | ||
self.sink { value in | ||
DispatchQueue.main.async { | ||
receiveValue(value) | ||
} | ||
} failure: { error in | ||
DispatchQueue.main.async { | ||
failure(error) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import PlatformSDK | ||
|
||
extension GeoPoint: CustomStringConvertible { | ||
|
||
public var description: String { | ||
"Latitude: \(self.latitude.value)\nLongitude: \(self.longitude.value)" | ||
} | ||
} | ||
|
||
extension GeoPointWithElevation: CustomStringConvertible { | ||
|
||
public var description: String { | ||
"Latitude: \(self.latitude.value)\nLongitude: \(self.longitude.value)\nElevation: \(self.elevation.value)" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import PlatformSDK | ||
|
||
extension RenderedObjectInfo: CustomStringConvertible { | ||
|
||
public var description: String { | ||
let pointDescription = self.closestMapPoint.description | ||
switch self.item.item { | ||
case let dgisMapObject as DgisMapObject: | ||
return "Id: \(dgisMapObject.id.value)" | ||
case let searchResult as SearchResultMarkerObject: | ||
if let id = searchResult.id { | ||
return "Id: \(id.value)" | ||
} else { | ||
return searchResult.markerPosition.description | ||
} | ||
case let cluster as ClusterObject: | ||
return "Objects count: \(cluster.objectCount)" | ||
case let route as RouteMapObject: | ||
return route.route?.description ?? pointDescription | ||
case let routePoint as RoutePointMapObject: | ||
return routePoint.route?.description ?? pointDescription | ||
case is MyLocationMapObject, is GeometryMapObject: | ||
return pointDescription | ||
default: | ||
return pointDescription | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import PlatformSDK | ||
|
||
extension TrafficRoute: CustomStringConvertible { | ||
|
||
public var description: String { | ||
"Distance: \(self.length.millimeters * 1000)m" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import SwiftUI | ||
|
||
struct MapObjectCardView: View { | ||
|
||
@ObservedObject private var viewModel: MapObjectCardViewModel | ||
|
||
init(viewModel: MapObjectCardViewModel) { | ||
self.viewModel = viewModel | ||
} | ||
|
||
var body: some View { | ||
ZStack { | ||
HStack(alignment: .top){ | ||
VStack(alignment: .leading) { | ||
Text(self.viewModel.title) | ||
.font(Font.system(size: 24, weight: .regular)) | ||
.foregroundColor(.black) | ||
.padding([.top, .leading], 16) | ||
Text(self.viewModel.description) | ||
.font(Font.system(size: 12, weight: .regular)) | ||
.foregroundColor(.black) | ||
.padding(.top, 2) | ||
.padding([.bottom, .leading], 16) | ||
} | ||
Spacer() | ||
VStack(alignment: .trailing) { | ||
Button(action: { | ||
self.viewModel.close() | ||
}) { | ||
Image(systemName: "xmark.circle.fill") | ||
.resizable() | ||
.frame(width: 20, height: 20) | ||
} | ||
.padding([.top, .trailing], 16) | ||
} | ||
.padding(.leading, 16) | ||
} | ||
} | ||
.background( | ||
RoundedRectangle(cornerRadius: 20, style: .circular) | ||
.fill(Color.white) | ||
.shadow(color: Color.black.opacity(0.2), radius: 3) | ||
) | ||
.padding([.leading, .bottom, .trailing], 16) | ||
} | ||
} |
Oops, something went wrong.