@@ -37,7 +37,6 @@ import com.google.maps.android.compose.CameraPositionState
37
37
import com.google.maps.android.compose.Circle
38
38
import com.google.maps.android.compose.ComposeMapColorScheme
39
39
import com.google.maps.android.compose.GoogleMap
40
- import com.google.maps.android.compose.MapEffect
41
40
import com.google.maps.android.compose.MapProperties
42
41
import com.google.maps.android.compose.MapType
43
42
import com.google.maps.android.compose.MapUiSettings
@@ -52,7 +51,6 @@ import com.what3words.components.compose.maps.W3WMapDefaults
52
51
import com.what3words.components.compose.maps.mapper.toGoogleLatLng
53
52
import com.what3words.components.compose.maps.models.W3WMarkerColor
54
53
import com.what3words.components.compose.maps.providers.googlemap.W3WGoogleMapDrawer
55
- import com.what3words.components.compose.maps.providers.googlemap.W3WGoogleMapProjection
56
54
import com.what3words.components.compose.maps.providers.googlemap.updateCameraBound
57
55
import com.what3words.components.compose.maps.rememberW3WMapManager
58
56
import com.what3words.components.compose.maps.state.camera.W3WGoogleCameraState
@@ -72,7 +70,7 @@ import kotlinx.coroutines.flow.launchIn
72
70
import kotlinx.coroutines.flow.onEach
73
71
import kotlinx.coroutines.launch
74
72
75
- private const val TAG = " GoogleMapWithW3WActivity "
73
+ private const val TAG = " ExistingMapWithDrawerScreen "
76
74
77
75
val defaultCameraPosition = CameraPosition .fromLatLngZoom(london1Coordinate.toGoogleLatLng(), 11f )
78
76
@@ -119,9 +117,7 @@ fun ExistingMapWithDrawerScreen(
119
117
w3wGoogleCameraState?.cameraState = cameraPositionState
120
118
onDispose { }
121
119
}
122
- var mapProjection: W3WGoogleMapProjection ? by remember {
123
- mutableStateOf(null )
124
- }
120
+
125
121
val w3wGoogleCameraState = mapState.cameraState as W3WGoogleCameraState
126
122
var lastProcessedPosition by remember { mutableStateOf(cameraPositionState.position) }
127
123
@@ -210,11 +206,6 @@ fun ExistingMapWithDrawerScreen(
210
206
},
211
207
content = {
212
208
// region What3words map components setup
213
- // REQUIRED - needed to draw the 3x3m grid on the map
214
- MapEffect (Unit ) { map ->
215
- mapProjection = W3WGoogleMapProjection (map.projection)
216
- }
217
-
218
209
// REQUIRED - needed to draw the 3x3m grid on the map
219
210
W3WGoogleMapDrawer (
220
211
state = mapState,
0 commit comments