File tree 2 files changed +31
-2
lines changed
microapps/MapComposeApp/app/src/main/java/com/arcgismaps/toolkit/mapcomposeapp/screens
2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,9 @@ import com.arcgismaps.toolkit.geocompose.MapState
29
29
@Composable
30
30
fun MainScreen () {
31
31
32
- val mapState = MapState (arcGISMap = ArcGISMap (BasemapStyle .ArcGISStreets ))
32
+ val mapModel = MapModel (arcGISMap = ArcGISMap (BasemapStyle .ArcGISImagery ))
33
33
Map (
34
34
modifier = Modifier .fillMaxSize(),
35
- mapState = mapState,
35
+ mapState = mapModel. mapState,
36
36
)
37
37
}
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2023 Esri
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ *
16
+ */
17
+
18
+ package com.arcgismaps.toolkit.mapcomposeapp.screens
19
+
20
+ import androidx.lifecycle.ViewModel
21
+ import com.arcgismaps.mapping.ArcGISMap
22
+ import com.arcgismaps.toolkit.geocompose.MapState
23
+
24
+ class MapModel (
25
+ arcGISMap : ArcGISMap
26
+ ) : ViewModel() {
27
+
28
+ val mapState: MapState = MapState (arcGISMap)
29
+ }
You can’t perform that action at this time.
0 commit comments