Skip to content

Commit 7527df9

Browse files
authored
Merge branch 'master' into fix/retain-children-coordinates
2 parents 1deb02b + 6d25519 commit 7527df9

File tree

4 files changed

+27
-6
lines changed

4 files changed

+27
-6
lines changed

.github/workflows/branch.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
run: flutter build apk --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
9595
- name: Archive Artifact
9696
if: ${{ matrix.sdk == '' }}
97-
uses: actions/upload-artifact@v5
97+
uses: actions/upload-artifact@v6
9898
with:
9999
name: apk-build
100100
path: example/build/app/outputs/apk/release
@@ -129,7 +129,7 @@ jobs:
129129
working-directory: .
130130
- name: Archive Artifact
131131
if: ${{ matrix.sdk == '' }}
132-
uses: actions/upload-artifact@v5
132+
uses: actions/upload-artifact@v6
133133
with:
134134
name: exe-build
135135
path: windowsTemp/WindowsApplication.exe
@@ -156,7 +156,7 @@ jobs:
156156
- name: Build Web Application
157157
run: flutter build web --wasm --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
158158
- name: Archive Artifact
159-
uses: actions/upload-artifact@v5
159+
uses: actions/upload-artifact@v6
160160
if: ${{ matrix.sdk == '' }}
161161
with:
162162
name: web-build

.github/workflows/master.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Build Android Application
5454
run: flutter build apk --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
5555
- name: Archive Artifact
56-
uses: actions/upload-artifact@v5
56+
uses: actions/upload-artifact@v6
5757
with:
5858
name: apk-build
5959
path: example/build/app/outputs/apk/release
@@ -82,7 +82,7 @@ jobs:
8282
run: iscc "windowsApplicationInstallerSetup.iss"
8383
working-directory: .
8484
- name: Archive Artifact
85-
uses: actions/upload-artifact@v5
85+
uses: actions/upload-artifact@v6
8686
with:
8787
name: exe-build
8888
path: windowsTemp/WindowsApplication.exe
@@ -107,7 +107,7 @@ jobs:
107107
- name: Build Web Application
108108
run: flutter build web --wasm --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
109109
- name: Archive Artifact
110-
uses: actions/upload-artifact@v5
110+
uses: actions/upload-artifact@v6
111111
with:
112112
name: web-build
113113
path: example/build/web

lib/src/gestures/map_interactive_viewer.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,10 @@ class MapInteractiveViewerState extends State<MapInteractiveViewer>
420420
}
421421

422422
void _onPointerMove(PointerMoveEvent event) {
423+
if (_options.onPointerMove != null) {
424+
final latLng = _camera.offsetToCrs(event.localPosition);
425+
_options.onPointerMove!(event, latLng);
426+
}
423427
if (!_ckrTriggered.value) return;
424428

425429
final baseSetNorth =

lib/src/map/options/options.dart

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ typedef PointerHoverCallback = void Function(
4040
LatLng point,
4141
);
4242

43+
/// Callback to notify when the map registers a pointer move event.
44+
typedef PointerMoveCallback = void Function(
45+
PointerMoveEvent event,
46+
LatLng point,
47+
);
48+
4349
/// Callback that gets called when the viewport of the map changes.
4450
///
4551
/// {@macro map_position.has_gesture}
@@ -109,6 +115,16 @@ class MapOptions {
109115
/// down (e.g. mouse pointers, but not most touch pointers)
110116
final PointerHoverCallback? onPointerHover;
111117

118+
/// Called when a pointer is down and moves.
119+
///
120+
/// If used while dragging the map, this may emit the same point as by
121+
/// [onPositionChanged], but might not due to map pixel snapping or a slight
122+
/// delay, or any other disconnect between the pointer and map camera.
123+
///
124+
/// Prefer using [onPositionChanged], unless this is specifically required,
125+
/// such as obtaining the pointer position while the map camera is 'locked'.
126+
final PointerMoveCallback? onPointerMove;
127+
112128
/// This callback fires when the [MapCamera] data has changed. This gets
113129
/// called if the zoom level, or map center changes.
114130
final PositionCallback? onPositionChanged;
@@ -158,6 +174,7 @@ class MapOptions {
158174
this.onPointerUp,
159175
this.onPointerCancel,
160176
this.onPointerHover,
177+
this.onPointerMove,
161178
this.onPositionChanged,
162179
this.onMapEvent,
163180
this.onMapReady,

0 commit comments

Comments
 (0)