mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-06-30 01:55:35 +02:00
long press to add node
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user