File tree Expand file tree Collapse file tree 2 files changed +20
-12
lines changed
Shared/Samples/Find route in mobile map package Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments