Skip to content

Commit c82c3a2

Browse files
authored
Merge pull request #93 from tappeddev/fix-map-status-update
fix-map-status-update
2 parents 62257c2 + d60988f commit c82c3a2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arcgis_map_sdk_ios/ios/arcgis_map_sdk_ios/Sources/arcgis_map_sdk_ios/MapContentView.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@ struct MapContentView: View {
3434
.onVisibleAreaChanged { polygon in
3535
viewModel.onVisibleAreaChanged?(polygon)
3636
}
37-
.onChange(of: viewModel.map.basemap?.loadStatus) { newValue in
38-
if let newValue {
39-
viewModel.onLoadStatusChanged?(newValue)
40-
}
41-
}
4237
.task {
4338
// Store the mapViewProxy for external access
4439
viewModel.mapViewProxy = mapViewProxy
@@ -50,6 +45,11 @@ struct MapContentView: View {
5045
viewModel.mapViewProxy = nil
5146
}
5247
.ignoresSafeArea(edges: .all)
48+
.task {
49+
for await loadStatus in viewModel.map.$loadStatus {
50+
viewModel.onLoadStatusChanged?(loadStatus)
51+
}
52+
}
5353
}
5454
}
5555
}

0 commit comments

Comments
 (0)