incorrect zoom when turning the camera programmatically on the map
@LuisThein đang làm issue này rồi.
Từ ngày 17/11/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Hello.
When using a map with the camera's bearing in degrees parameter "initialCameraPosition: CameraPosition(target: ..., zoom: 16.0, heading: 62.0)" set, when the widget is being drawn, the zoom changes to a lower value. The soft zoom using the created zoom-in and zoom-out buttons does not work correctly. _controller.zoomIn() changes the zoom level with +0.01, and _controller.zoomOut() changes the zoom value with -2.0. there is no other way to rotate the map (specifically the map, not the camera's bearing), but there is a need to rotate the map, since it is necessary to display a certain area of the map with a certain rotation of the map, for a more comfortable user experience. when the map is rotated by the user's gestures, then the zoom works correctly.
// apple_maps_flutter: 1.4.0
// Flutter 3.29.2 • channel stable • https://github.com/flutter/flutter.git
// Framework • revision c236373904 (8 months ago) • 2025-03-13 16:17:06 -0400
// Engine • revision 18b71d647a
// Tools • Dart 3.7.2 • DevTools 2.42.3
// example
class _MapSampleState extends State<MapSample> {
late final AppleMapController _controller;
@override
Widget build(BuildContext context) {
return Stack(
children: [
AppleMap(
initialCameraPosition: const CameraPosition(
target: LatLng(37.768, -25.335),
zoom: 16.0,
heading: 62.0,
),
onMapCreated: (AppleMapController controller) {
_controller = controller;
},
),
Positioned(
top: (Theme.of(context).bottomAppBarTheme.height ?? 80),
right: 16.0,
child: IconButton.filled(
onPressed: () =>
_controller.animateCamera(CameraUpdate.zoomIn()),
icon: const Icon(Icons.add)),
),
Positioned(
top: (Theme.of(context).bottomAppBarTheme.height ?? 80) + 40,
right: 16.0,
child: IconButton.filled(
onPressed: () =>
_controller.animateCamera(CameraUpdate.zoomOut()),
icon: const Icon(Icons.remove)),
),
],
);
}
}
Expected behavior : correct zoomIn and zoomOut
Tested on Simulator iPhone 12 17.4 and iPhone 13 18.4
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.29.2, on macOS 26.1 25B78 darwin-arm64, locale ru-RU)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 26.1.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.104.0)
[✓] Connected device (4 available)
[✓] Network resources
- Ngôn ngữ chính
- Dart
- Star
- 84
- Fork
- 120
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của fluttercommunity/apple_maps_flutter
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
fluttercommunity/apple_maps_flutter#85 · 8 bình luận · 5 reaction ·
-
Crash in MKPuckAccuracyLayer _updateColors due to CFStringGetLength (iOS)Có thể đã có người làm @LuisThein đã nhận 277 ngày trước. Đang mởbug
fluttercommunity/apple_maps_flutter#81 · 1 người được giao ·
-
Apple maps consumes more CPU and memory than google mapsCó thể làm lại được @LuisThein đã nhận 443 ngày trước và không có pull request nào đang mở. Đang mởbug
fluttercommunity/apple_maps_flutter#78 · 1 người được giao ·
-
Add option to manually set light/dark appearance (overrideUserInterfaceStyle)Có thể đã có người làm @LuisThein đã nhận 502 ngày trước. Đang mởenhancement
fluttercommunity/apple_maps_flutter#77 · 2 bình luận · 1 reaction · 1 người được giao ·
Tất cả issue của fluttercommunity/apple_maps_flutter
Issue tương tự
-
[Bug] 附近设备权限未申请Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
bggRGjQaUbCoE/PiliPlus#3369 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
auto-implement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
bannzai/kashakeibo#143 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
[lsp] Remove DartAnalysisServerService.serverReadyForRequest() from EnableDartSupportForModuleĐang mởP1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
flutter/flutter-intellij#9177 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
AOSSIE-Org/Ell-ena#356 ·
Maintainer thường phản hồi trong vòng 1 ngày