Skip to content

Commit 4c30012

Browse files
committed
Update MapViewModel.kt
1 parent dd42f3b commit 4c30012

File tree

1 file changed

+2
-3
lines changed
  • manage-operational-layers/src/main/java/com/esri/arcgismaps/sample/manageoperationallayers/components

1 file changed

+2
-3
lines changed

Diff for: manage-operational-layers/src/main/java/com/esri/arcgismaps/sample/manageoperationallayers/components/MapViewModel.kt

+2-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ class MapViewModel(
3131
) : AndroidViewModel(application) {
3232

3333
// create an ArcGISMap
34-
val arcGISMap: ArcGISMap = ArcGISMap(BasemapStyle.ArcGISTopographic).apply {
35-
initialViewpoint = Viewpoint(39.8, -98.6, 5e7)
36-
}
34+
val arcGISMap: ArcGISMap = ArcGISMap(BasemapStyle.ArcGISTopographic)
3735

3836
// a list of the active map image layer names
3937
var activateLayerNames = mutableStateListOf<String>()
@@ -65,6 +63,7 @@ class MapViewModel(
6563

6664
// add the layers to the map's operational layers
6765
arcGISMap.apply {
66+
initialViewpoint = Viewpoint(39.8, -98.6, 5e7)
6867
operationalLayers.addAll(
6968
listOf(
7069
imageLayerElevation,

0 commit comments

Comments
 (0)