long press to add node

This commit is contained in:
stopflock
2026-06-14 21:20:17 -05:00
parent d87a112c0a
commit 0b812bdaea
5 changed files with 79 additions and 2 deletions
+11
View File
@@ -43,6 +43,7 @@ class MapView extends StatefulWidget {
this.onSearchPressed,
this.onNodeLimitChanged,
this.onLocationStatusChanged,
this.onMapLongPress,
});
final FollowMeMode followMeMode;
@@ -54,6 +55,7 @@ class MapView extends StatefulWidget {
final VoidCallback? onSearchPressed;
final void Function(bool isLimited)? onNodeLimitChanged;
final VoidCallback? onLocationStatusChanged;
final void Function(LatLng)? onMapLongPress;
@override
State<MapView> createState() => MapViewState();
@@ -514,6 +516,15 @@ class MapViewState extends State<MapView> {
_dataManager.showZoomWarningIfNeeded(context, pos.zoom, appState.uploadMode);
}
},
onTap: (tapPosition, point) {
// Handle tap on empty map area - currently no action needed
debugPrint('[MapView] Tap at: $point');
},
onLongPress: (tapPosition, point) {
// Handle long press on empty map area - add node here
debugPrint('[MapView] Long press at: $point');
widget.onMapLongPress?.call(point);
},
),
children: [
_tileManager.buildTileLayer(