From 9e74292ef6523b55a044dbae85719015dd97aa9e Mon Sep 17 00:00:00 2001 From: Wayne Bishop Date: Mon, 9 Dec 2024 13:14:57 -0800 Subject: [PATCH] feat: updates on GoogleMapView lifecycle revisions --- .../GoogleMaps-SwiftUI/Dialog/Helper/MapExamplesViewModel.swift | 2 +- .../GoogleMaps-SwiftUI/Samples/MapWithMarker.swift | 1 + .../GoogleMaps-SwiftUI/Samples/MapWithStreetLevel.swift | 2 +- .../GoogleMaps-SwiftUI/Samples/MapWithTypes.swift | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Dialog/Helper/MapExamplesViewModel.swift b/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Dialog/Helper/MapExamplesViewModel.swift index 0367e660..25b799e2 100644 --- a/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Dialog/Helper/MapExamplesViewModel.swift +++ b/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Dialog/Helper/MapExamplesViewModel.swift @@ -19,7 +19,7 @@ class MapExamplesViewModel: ObservableObject { @Published var examples: [MapExample] = [ MapExample( title: "Basic map", - description: "A simple map. Shows how to initalize and upddate map options.", + description: "A simple map. Shows how to initalize and update map options.", destination: AnyView(BasicMap()) ), MapExample( diff --git a/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Samples/MapWithMarker.swift b/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Samples/MapWithMarker.swift index ca0ec5c8..58e769dd 100644 --- a/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Samples/MapWithMarker.swift +++ b/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Samples/MapWithMarker.swift @@ -15,6 +15,7 @@ import SwiftUI import GoogleMaps struct MapWithMarker: View { + private let mapOptions: GMSMapViewOptions = { var options = GMSMapViewOptions() diff --git a/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Samples/MapWithStreetLevel.swift b/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Samples/MapWithStreetLevel.swift index 8561e8b2..d468d1e2 100644 --- a/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Samples/MapWithStreetLevel.swift +++ b/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Samples/MapWithStreetLevel.swift @@ -16,7 +16,7 @@ import GoogleMaps struct MapWithStreetLevel: View { - @State private var mapOptions: GMSMapViewOptions = { + private var mapOptions: GMSMapViewOptions = { var options = GMSMapViewOptions() // Initialize map centered on San Francisco options.camera = .streetLevel(.sanFrancisco, bearing: 45) diff --git a/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Samples/MapWithTypes.swift b/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Samples/MapWithTypes.swift index ba196b5a..b25bc7d9 100644 --- a/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Samples/MapWithTypes.swift +++ b/GoogleMaps-SwiftUI/GoogleMaps-SwiftUI/Samples/MapWithTypes.swift @@ -16,7 +16,7 @@ import GoogleMaps struct MapWithTypes: View { - @State private var mapOptions: GMSMapViewOptions = { + private var mapOptions: GMSMapViewOptions = { var options = GMSMapViewOptions() // Initialize map centered on San Francisco options.camera = .camera(.sanFrancisco)