Set my location by long-pressing the path maps
Move the map's confirm-and-set-location flow into a shared helper and call it on long-press and right-click in the path trace and channel message path maps, so the self position can be set while viewing a path.
This commit is contained in:
1 parent
c296597a2d
commit
00756ef05e
4 files changed
+99
-67
No files matched your search
@@ -24,6 +24,7 @@ import '../widgets/adaptive_app_bar_title.dart';
|
||||
import '../widgets/mesh_ui.dart';
|
||||
import '../widgets/path_map_scaffold.dart';
|
||||
import '../widgets/path_map_ui.dart';
|
||||
import '../widgets/set_my_location_dialog.dart';
|
||||
|
||||
class ChannelMessagePathScreen extends StatelessWidget {
|
||||
final ChannelMessage message;
|
||||
@@ -911,6 +912,10 @@ class _ChannelMessagePathMapScreenState
|
||||
initialCenter: model.initialCenter,
|
||||
initialZoom: model.initialZoom,
|
||||
bounds: model.bounds,
|
||||
onLongPress: (_, point) =>
|
||||
confirmAndSetMyLocation(context, connector, point),
|
||||
onSecondaryTap: (_, point) =>
|
||||
confirmAndSetMyLocation(context, connector, point),
|
||||
onPositionChanged: (camera, hasGesture) {
|
||||
if (!mounted) return;
|
||||
// A manual pan/zoom releases the follow lock.
|
||||
|
||||
Reference in new issue
Block a user