@@ -37,6 +37,16 @@ struct ShowGeodesicSectorAndEllipseView: View {
3737 Viewpoint ( center: center, scale: 1e7 )
3838 )
3939 }
40+ . overlay ( alignment: . top) {
41+ if model. center == nil {
42+ HStack {
43+ Text ( " Tap map to create a geodesic sector. " )
44+ }
45+ . frame ( maxWidth: . infinity)
46+ . padding ( . vertical, 6 )
47+ . background ( . thinMaterial, ignoresSafeAreaEdges: . horizontal)
48+ }
49+ }
4050 . toolbar {
4151 ToolbarItemGroup ( placement: . bottomBar) {
4252 Button ( " Settings " ) {
@@ -107,7 +117,7 @@ private extension ShowGeodesicSectorAndEllipseView {
107117
108118 /// The graphics overlay that will be displayed on the map view.
109119 /// This will display a highlighted section of the ellipse path.
110- private let sectorGraphicOverlay : GraphicsOverlay = {
120+ private let sectorGraphicOverlay = {
111121 let overlay = GraphicsOverlay ( )
112122 overlay. renderer = SimpleRenderer ( symbol: SimpleFillSymbol ( style: . solid, color: . green) )
113123 return overlay
@@ -132,19 +142,19 @@ private extension ShowGeodesicSectorAndEllipseView {
132142 }
133143 }
134144 /// Controls the complexity of the geometries and the approximation of the ellipse curve.
135- var maxPointCount : Double = 1_000 {
145+ var maxPointCount = 1_000.0 {
136146 didSet {
137147 updateSector ( )
138148 }
139149 }
140150 /// Changes the length of ellipse shape on one axis.
141- var semiAxis1Length : Double = 200 {
151+ var semiAxis1Length = 200.0 {
142152 didSet {
143153 updateSector ( )
144154 }
145155 }
146156 /// Changes the length of ellipse shape on one axis.
147- var semiAxis2Length : Double = 100 {
157+ var semiAxis2Length = 100.0 {
148158 didSet {
149159 updateSector ( )
150160 }
@@ -156,7 +166,7 @@ private extension ShowGeodesicSectorAndEllipseView {
156166 }
157167 }
158168 /// Changes the direction of the sector.
159- var startDirection : Double = 45 {
169+ var startDirection = 45.0 {
160170 didSet {
161171 updateSector ( )
162172 }
0 commit comments