You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d9eee4c
Browse filesBrowse the repository at this point in the historyBrowse files
[google_maps_flutter] Add support for mapType, fullscreen, and Street View controls on web (flutter#11955)
This PR adds support for mapTypeControlEnabled, fullscreenControlEnabled, and streetViewControlEnabled on Flutter web.
Previously, these options were not exposed through the GoogleMap widget and were internally defaulted to false in MapConfiguration.
This change propagates these parameters through google_maps_flutter, google_maps_flutter_platform_interface, and google_maps_flutter_web, allowing developers to explicitly enable or disable these controls.
To preserve backward compatibility, the existing behavior is maintained by defaulting these options to false when they are not provided by the user.
I created a sample app and tested the changes using dependency_overrides. Attaching a video for reference.
https://github.com/user-attachments/assets/014a50c4-e6d4-4325-8005-9d5d4b2db076Fixesflutter#104111.
## Pre-Review Checklist
**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
@@ -374,6 +377,21 @@ class GoogleMap extends StatefulWidget {
374
377
/// See https://developers.google.com/maps/documentation/javascript/controls for more details.
375
378
finalbool webCameraControlEnabled;
376
379
380
+
/// True if map type control should be shown.
381
+
///
382
+
/// Web only.
383
+
finalbool mapTypeControlEnabled;
384
+
385
+
/// True if fullscreen control should be shown.
386
+
///
387
+
/// Web only.
388
+
finalbool fullscreenControlEnabled;
389
+
390
+
/// True if street view control should be shown.
391
+
///
392
+
/// Web only.
393
+
finalbool streetViewControlEnabled;
394
+
377
395
/// Identifier that's associated with a specific cloud-based map style.
378
396
///
379
397
/// See https://developers.google.com/maps/documentation/get-map-id
0 commit comments