diff --git a/ground/src/main/java/com/google/android/ground/ui/common/BaseMapViewModel.kt b/ground/src/main/java/com/google/android/ground/ui/common/BaseMapViewModel.kt index d43a5da5d6..437c9d71ab 100644 --- a/ground/src/main/java/com/google/android/ground/ui/common/BaseMapViewModel.kt +++ b/ground/src/main/java/com/google/android/ground/ui/common/BaseMapViewModel.kt @@ -257,6 +257,7 @@ constructor( Timber.d("Camera moved : ${newCameraPosition.target}") lastCameraPosition = currentCameraPosition.value currentCameraPosition.value = newCameraPosition + mapStateRepository.setCameraPosition(newCameraPosition) } companion object { diff --git a/ground/src/main/java/com/google/android/ground/ui/home/mapcontainer/HomeScreenMapContainerViewModel.kt b/ground/src/main/java/com/google/android/ground/ui/home/mapcontainer/HomeScreenMapContainerViewModel.kt index 8db4fc0ac7..ca0fc37e45 100644 --- a/ground/src/main/java/com/google/android/ground/ui/home/mapcontainer/HomeScreenMapContainerViewModel.kt +++ b/ground/src/main/java/com/google/android/ground/ui/home/mapcontainer/HomeScreenMapContainerViewModel.kt @@ -53,7 +53,6 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.mapNotNull import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.launch -import timber.log.Timber @OptIn(ExperimentalCoroutinesApi::class) @SharedViewModel @@ -61,7 +60,7 @@ class HomeScreenMapContainerViewModel @Inject internal constructor( private val loiRepository: LocationOfInterestRepository, - private val mapStateRepository: MapStateRepository, + mapStateRepository: MapStateRepository, private val submissionRepository: SubmissionRepository, locationManager: LocationManager, settingsManager: SettingsManager, @@ -158,9 +157,7 @@ internal constructor( override fun onMapCameraMoved(newCameraPosition: CameraPosition) { super.onMapCameraMoved(newCameraPosition) - Timber.d("Setting position to $newCameraPosition") onZoomChange(lastCameraPosition?.zoomLevel, newCameraPosition.zoomLevel) - mapStateRepository.setCameraPosition(newCameraPosition) } private fun onZoomChange(oldZoomLevel: Float?, newZoomLevel: Float?) {