From eb8ac9f08a35206c9373ae0586504f9ad7e55bb2 Mon Sep 17 00:00:00 2001 From: TADraeseke Date: Tue, 10 Dec 2024 21:47:58 +0000 Subject: [PATCH 1/2] Update MapViewModelTemplate.kt with TODO reminding that the mutablestate object is only needed if the map is expected to change in this sample --- tools/NewModuleScript/MapViewModelTemplate.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/NewModuleScript/MapViewModelTemplate.kt b/tools/NewModuleScript/MapViewModelTemplate.kt index 6dce93a7f..745c7d46d 100644 --- a/tools/NewModuleScript/MapViewModelTemplate.kt +++ b/tools/NewModuleScript/MapViewModelTemplate.kt @@ -28,6 +28,7 @@ import com.esri.arcgismaps.sample.sampleslib.components.MessageDialogViewModel import kotlinx.coroutines.launch class MapViewModel(application: Application) : AndroidViewModel(application) { + // TODO - The ArcGISMap only needs to be wrapped in a MutableState object if it will change in this sample val arcGISMap by mutableStateOf( ArcGISMap(BasemapStyle.ArcGISNavigationNight).apply { initialViewpoint = Viewpoint(39.8, -98.6, 10e7) From 7b4c37630e809ee35b78fca6fddb9cab5e261acd Mon Sep 17 00:00:00 2001 From: TADraeseke Date: Wed, 11 Dec 2024 16:42:53 +0000 Subject: [PATCH 2/2] Update MapViewModelTemplate.kt --- tools/NewModuleScript/MapViewModelTemplate.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/NewModuleScript/MapViewModelTemplate.kt b/tools/NewModuleScript/MapViewModelTemplate.kt index 745c7d46d..ee949b341 100644 --- a/tools/NewModuleScript/MapViewModelTemplate.kt +++ b/tools/NewModuleScript/MapViewModelTemplate.kt @@ -28,7 +28,7 @@ import com.esri.arcgismaps.sample.sampleslib.components.MessageDialogViewModel import kotlinx.coroutines.launch class MapViewModel(application: Application) : AndroidViewModel(application) { - // TODO - The ArcGISMap only needs to be wrapped in a MutableState object if it will change in this sample + //TODO - delete mutable state when the map does not change or the screen does not need to observe changes val arcGISMap by mutableStateOf( ArcGISMap(BasemapStyle.ArcGISNavigationNight).apply { initialViewpoint = Viewpoint(39.8, -98.6, 10e7)