File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ class _ExampleMapState extends State<ExampleMap> {
69
69
bool _baseMapToggled = false ;
70
70
final initialCenter = LatLng (51.16 , 10.45 );
71
71
final tappedHQ = LatLng (48.1234963 , 11.5910182 );
72
+ var _isInteractionEnabled = true ;
72
73
73
74
@override
74
75
void dispose () {
@@ -451,6 +452,20 @@ class _ExampleMapState extends State<ExampleMap> {
451
452
),
452
453
],
453
454
),
455
+ ElevatedButton (
456
+ onPressed: () {
457
+ _controller? .setInteraction (
458
+ isEnabled: ! _isInteractionEnabled,
459
+ );
460
+
461
+ setState (() {
462
+ _isInteractionEnabled = ! _isInteractionEnabled;
463
+ });
464
+ },
465
+ child: Text (
466
+ "${_isInteractionEnabled ? "Disable" : "Enable" } Interaction" ,
467
+ ),
468
+ ),
454
469
ElevatedButton (
455
470
onPressed: () {
456
471
_routeToVectorLayerMap ();
You can’t perform that action at this time.
0 commit comments