Skip to content

Commit 197e084

Browse files
committed
Fix few issues after upgrading sdk
1 parent b74ff0b commit 197e084

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

arcgis_map_sdk_ios/ios/arcgis_map_sdk_ios/Sources/arcgis_map_sdk_ios/ArcgisMapView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,10 +419,10 @@ class ArcgisMapView: NSObject, FlutterPlatformView {
419419

420420

421421
private func onStartLocationDisplayDataSource(_ call: FlutterMethodCall, _ result: @escaping FlutterResult) {
422-
423422
Task {
424423
do {
425424
try await mapContentView.mapViewModel.locationDisplay.dataSource.start();
425+
result(true)
426426
}
427427
catch{
428428
let flutterError = FlutterError(
@@ -552,7 +552,7 @@ class ArcgisMapView: NSObject, FlutterPlatformView {
552552
return
553553
}
554554

555-
mapContentView.mapViewModel.attributionBarHidden = isVisible
555+
mapContentView.mapViewModel.attributionBarHidden = !isVisible
556556
result(true)
557557
}
558558

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ struct MapContentView: View {
4646
// Clear the mapViewProxy reference when view disappears
4747
mapViewModel.mapViewProxy = nil
4848
}
49+
.ignoresSafeArea(edges: .all)
4950
}
5051
}
5152
}
@@ -57,7 +58,7 @@ class MapViewModel: ObservableObject {
5758

5859
@Published var viewpoint: Viewpoint
5960
@Published var mapViewProxy: MapViewProxy?
60-
@Published var attributionBarHidden: Bool = false
61+
@Published var attributionBarHidden: Bool = true
6162
@Published var contentInsets: EdgeInsets = EdgeInsets()
6263
@Published var interactionModes: MapViewInteractionModes = .all
6364
@Published var defaultGraphicsOverlay = GraphicsOverlay()

example/lib/location_indicator_example_page.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ class _LocationIndicatorExamplePageState extends State<LocationIndicatorExampleP
125125
await Geolocator.requestPermission();
126126
final location = await Geolocator.getLastKnownPosition();
127127
if (!mounted || location == null) return;
128-
128+
// Small delay to let the map render before moving the camera
129+
await Future.delayed(Duration(milliseconds: 300));
129130
await _controller!.moveCamera(
130131
point: LatLng(location.latitude, location.longitude),
131132
zoomLevel: 16,

0 commit comments

Comments
 (0)