-
Notifications
You must be signed in to change notification settings - Fork 34
/
Constants.swift
194 lines (192 loc) · 8.02 KB
/
Constants.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
import Foundation
import UIKit
typealias NamedController = (
name: String,
description: String,
controller: UIViewController.Type,
storyboard: UIStoryboard?, // Is the example containined in a storyboard? If so, we assume the Initial View Controller of the storyboard.
pushExampleToViewController: Bool // If the example does not go directly into the example,(i.e. another map is shown) set this value to true
)
let listOfExamples: [NamedController] = [
(
name: "Advanced Implementation",
description: """
Demonstrates how to display a custom map style and how to apply stylized components in the UI.
This example also allows the user to select an alternate route. Long press on the map to begin.
NavigationViewController reuses a NavigationMapView instance, allowing for a seamless transition
between between a route preview and active turn-by-turn navigation.
Note: The Directions API will not always return alternative routes.
""",
controller: AdvancedViewController.self,
storyboard: nil,
pushExampleToViewController: true
),
(
name: "Basic",
description: "A basic hello world example showing how to create a navigation experience using the fewest lines of code possible.",
controller: BasicViewController.self,
storyboard: nil,
pushExampleToViewController: false
),
(
name: "Custom Destination Marker",
description: "Use a custom image for styling the destination marker.",
controller: CustomDestinationMarkerController.self,
storyboard: nil,
pushExampleToViewController: true
),
(
name: "Embedded View Controller",
description: "Demonstrates how to embed a NavigationViewController within a parent view controller.",
controller: EmbeddedExampleViewController.self,
storyboard: UIStoryboard(name: "EmbeddedExamples", bundle: nil),
pushExampleToViewController: true
),
(
name: "Styled UI Elements",
description: "Demonstrates how to customize various UI elements and also change the map style.",
controller: CustomStyleUIElements.self,
storyboard: nil,
pushExampleToViewController: false
),
(
name: "Waypoint Arrival Screen",
description: "Demonstrates how to provide a custom UIView for the user upon arriving at a waypoint.",
controller: WaypointArrivalScreenViewController.self,
storyboard: nil,
pushExampleToViewController: false
),
(
name: "Directions API beta query parameters",
description: "Demonstrates how to subclass NavigationRouteOptions to take advantage of the beta query parameters available from the Directions API.",
controller: BetaQueryViewController.self,
storyboard: nil,
pushExampleToViewController: true
),
(
name: "Custom Waypoint Styling",
description: "Demonstrates how to customize waypoint styling.",
controller: CustomWaypointsViewController.self,
storyboard: nil,
pushExampleToViewController: true
),
(
name: "Custom Voice Controller",
description: "Add custom audio recordings for your instructions.",
controller: CustomVoiceControllerUI.self,
storyboard: nil,
pushExampleToViewController: false
),
(
name: "Custom Directions Server",
description: "Use a custom directions server with the Navigation SDK via the Mapbox Map Matching SDK.",
controller: CustomServerViewController.self,
storyboard: nil,
pushExampleToViewController: false
),
(
name: "Custom Top & Bottom Bars",
description: "Use a custom UI for top and bottom bars during navigation.",
controller: CustomBarsViewController.self,
storyboard: nil,
pushExampleToViewController: false
),
(
name: "Route Deserialization",
description: "Demonstrates how to initialize a Route and deserialize it from JSON.",
controller: RouteDeserializationViewController.self,
storyboard: nil,
pushExampleToViewController: false
),
(
name: "Route Initialization",
description: "Demonstrates how to initialize a Route and RouteResponse using initializers in code.",
controller: RouteInitializationViewController.self,
storyboard: nil,
pushExampleToViewController: false
),
(
name: "Building Extrusion",
description: "Demonstrates how to highlight building extrusion.",
controller: BuildingExtrusionViewController.self,
storyboard: nil,
pushExampleToViewController: true
),
(
name: "Predictive Caching",
description: "Demonstrates how to use predictive caching for navigation.",
controller: PredictiveCachingViewController.self,
storyboard: nil,
pushExampleToViewController: false
),
(
name: "Route Alerts",
description: "Demonstrates how to display route alerts.",
controller: RouteAlertsViewController.self,
storyboard: nil,
pushExampleToViewController: false
),
(
name: "Location Snapping",
description: "Demonstrates how to snap user location to the road network in a map view outside of active turn-by-turn navigation. Simulate Navigation option isn't supported here, instead you can use location simulation inside of the Simulator (Features ‣ Location ‣ \"City Bicycle Ride\") to see the difference with and without snapping.",
controller: LocationSnappingViewController.self,
storyboard: nil,
pushExampleToViewController: true
),
(
name: "Electronic Horizon Events Observing",
description: "Demonstrates how to use electronic horizon to predict user's most probable path and show upcoming intersections. Simulate Navigation option isn't supported here, instead you can simulate location in Xcode.",
controller: ElectronicHorizonEventsViewController.self,
storyboard: nil,
pushExampleToViewController: true
),
(
name: "Custom Navigation Camera",
description: "Demonstrates how to add custom data source and transitions to navigation camera.",
controller: CustomNavigationCameraViewController.self,
storyboard: nil,
pushExampleToViewController: true
),
(
name: "Route Lines Styling",
description: "Demonstrates how to provide custom styling for the route lines.",
controller: RouteLinesStylingViewController.self,
storyboard: nil,
pushExampleToViewController: true
),
(
name: "Custom Segue",
description: "Demonstrates how to create an instance of NavigationViewController from UIStoryboardSegue.",
controller: SegueViewController.self,
storyboard: UIStoryboard(name: "CustomSegue", bundle: nil),
pushExampleToViewController: true
),
(
name: "Custom User Location",
description: "Demonstrates how to provide custom user location indicator layer during navigation.",
controller: CustomUserLocationViewController.self,
storyboard: nil,
pushExampleToViewController: true
),
(
name: "Offline Regions",
description: "Demonstrates how to create a custom TileStore and handle offline regions.",
controller: OfflineRegionsViewController.self,
storyboard: nil,
pushExampleToViewController: true
),
(
name: "Custom RoutingProvider",
description: "Demonstrates how to implement and utilize custom `RoutingProvider`.",
controller: CustomRoutingProviderViewController.self,
storyboard: nil,
pushExampleToViewController: true
),
(
name: "History Recording",
description: "Demonstrates how to create history files in Free drive and Active turn-by-turn navigation.",
controller: HistoryRecordingViewController.self,
storyboard: nil,
pushExampleToViewController: true
)
]