Skip to content

Commit 94bf4bb

Browse files
committed
Revert "Apply marker color changes triggered by InfoBubble click to circles as well."
This reverts commit 6be0db4.
1 parent 6be0db4 commit 94bf4bb

5 files changed

Lines changed: 230 additions & 285 deletions

File tree

example-app/src/main/java/com/mapconductor/example/AppViewModel.kt

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ package com.mapconductor.example
22

33
import androidx.compose.runtime.MutableState
44
import androidx.compose.runtime.mutableStateOf
5-
import androidx.compose.ui.graphics.Color
6-
import androidx.compose.ui.unit.dp
75
import androidx.core.net.toUri
86
import androidx.lifecycle.ViewModel
97
import com.mapconductor.StarbucksHI_list
@@ -28,7 +26,6 @@ interface AppViewModel {
2826
val selectedMarker: MarkerState?
2927
val infoBubbleState: InfoBubbleState
3028
val markerList: List<MarkerState>
31-
val circleList: StateFlow<List<CircleState>>
3229
val messages: StateFlow<List<ToastMessage>>
3330

3431
fun changeState(state: MapViewState<*>)
@@ -46,10 +43,6 @@ interface AppViewModel {
4643
fun removeToast(toastMessage: ToastMessage)
4744

4845
fun createIntentForDirection(markerState: MarkerState): Intent
49-
50-
fun updateCircleColor(pairMarkerId: String, fillColor: Color, strokeColor: Color)
51-
52-
fun updateCircleList(newList: List<CircleState>)
5346
}
5447

5548
class AppViewModelImpl :
@@ -74,20 +67,6 @@ class AppViewModelImpl :
7467

7568
override val markerList = StarbucksHI_list.slice(IntRange(0, 10))
7669

77-
private val _circleList = MutableStateFlow(
78-
markerList.map { markerState ->
79-
CircleState(
80-
center = markerState.position,
81-
radius = 1000.0,
82-
fillColor = Color(0x88FF3366),
83-
strokeColor = Color.White,
84-
strokeWidth = 1.dp,
85-
pairMarker = markerState.id,
86-
)
87-
}
88-
)
89-
override val circleList: StateFlow<List<CircleState>> = _circleList.asStateFlow()
90-
9170
private val _infoBubbleState: MutableState<InfoBubbleState> = mutableStateOf(InfoBubbleState())
9271
override val infoBubbleState: InfoBubbleState
9372
get() = _infoBubbleState.value
@@ -116,14 +95,6 @@ class AppViewModelImpl :
11695
return mapIntent
11796
}
11897

119-
override fun updateCircleColor(pairMarkerId: String, fillColor: Color, strokeColor: Color) {
120-
TODO("Not yet implemented")
121-
}
122-
123-
override fun updateCircleList(newList: List<CircleState>) {
124-
_circleList.value = newList
125-
}
126-
12798
override fun cameraReset(listener: MapViewState.MoveCameraCallback?) {
12899
this@AppViewModelImpl.mapViewState.value?.moveCameraTo(
129100
cameraPosition = initCameraPosition,

0 commit comments

Comments
 (0)