Skip to content

Commit

Permalink
Rename default mog path/location, clean up dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
sufyanAbbasi committed Feb 29, 2024
1 parent a6261c9 commit b912038
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ground/src/main/java/com/google/android/ground/Config.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ object Config {
const val MAX_MEDIA_UPLOAD_RETRY_COUNT = 5

// TODO(#1730): Make sub-paths configurable and stop hardcoding here.
const val DEFAULT_MOG_TILE_URL = "/offline-imagery/default/"
const val DEFAULT_MOG_TILE_LOCATION = "/offline-imagery/default"
const val DEFAULT_MOG_MIN_ZOOM = 8
const val DEFAULT_MOG_MAX_ZOOM = 14

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ import com.google.android.ground.ui.util.FileUtil
import com.google.android.ground.util.ByteCount
import com.google.android.ground.util.deleteIfEmpty
import com.google.android.ground.util.rangeOf
import java.io.File
import javax.inject.Inject
import javax.inject.Singleton
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.map
import timber.log.Timber
import java.io.File
import javax.inject.Inject
import javax.inject.Singleton

/**
* Corners of the viewport are scaled by this value when determining the name of downloaded areas.
Expand Down Expand Up @@ -148,7 +148,9 @@ constructor(

/** Returns the default configured tile sources. */
fun getDefaultTileSources(): List<TileSource> =
listOf(TileSource(url = Config.DEFAULT_MOG_TILE_URL, type = TileSource.Type.MOG_COLLECTION))
listOf(
TileSource(url = Config.DEFAULT_MOG_TILE_LOCATION, type = TileSource.Type.MOG_COLLECTION)
)

suspend fun hasHiResImagery(bounds: Bounds): Boolean {
val client = getMogClient()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package com.google.android.ground.ui.home
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.google.android.ground.repository.SurveyRepository
import com.google.android.ground.ui.common.AbstractViewModel
import com.google.android.ground.ui.common.Navigator
import com.google.android.ground.ui.common.SharedViewModel
Expand All @@ -33,7 +32,6 @@ class HomeScreenViewModel
@Inject
internal constructor(
private val navigator: Navigator,
surveyRepository: SurveyRepository,
) : AbstractViewModel() {

private val _openDrawerRequests: MutableSharedFlow<Unit> = MutableSharedFlow()
Expand Down

0 comments on commit b912038

Please sign in to comment.