Skip to content

Commit 5ebe8c6

Browse files
committed
Update icons to labels.
#359 (comment)
1 parent 91f6a6b commit 5ebe8c6

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

Shared/Samples/Find route in mobile map package/FindRouteInMobileMapPackageView.swift

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,22 +101,30 @@ private extension FindRouteInMobileMapPackageView {
101101
.resizable()
102102
.scaledToFit()
103103
.frame(height: 50)
104-
.overlay(alignment: .top) {
105-
// The symbols indicating the map's functionality.
104+
105+
VStack(alignment: .leading, spacing: 2) {
106+
Text(mapName)
107+
106108
HStack {
107-
// The symbol indicating whether the map can route.
108-
Image(systemName: "arrow.triangle.turn.up.right.circle")
109-
.opacity(!map.transportationNetworks.isEmpty ? 1 : 0)
110-
Spacer()
111109
// The symbol indicating whether the map can geocode.
112-
Image(systemName: "mappin.circle")
113-
.opacity(mapPackage.locatorTask != nil ? 1 : 0)
110+
if mapPackage.locatorTask != nil {
111+
HStack(spacing: 2) {
112+
Image(systemName: "mappin.circle")
113+
Text("Geocoding")
114+
}
115+
}
116+
117+
// The symbol indicating whether the map can route.
118+
if !map.transportationNetworks.isEmpty {
119+
HStack(spacing: 2) {
120+
Image(systemName: "arrow.triangle.turn.up.right.circle")
121+
Text("Routing")
122+
}
123+
}
114124
}
115-
.foregroundColor(.black)
116-
.padding(2)
125+
.font(.caption2)
126+
.foregroundStyle(.secondary)
117127
}
118-
119-
Text(mapName)
120128
}
121129
}
122130
}
1.79 KB
Loading

0 commit comments

Comments
 (0)