mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-09-30 13:09:35 +02:00
long press to add node
This commit is contained in:
1 parent
d87a112c0a
commit
0b812bdaea
5 files changed
+79
-2
No files matched your search
@@ -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