Skip to content

[google_maps_flutter] Can't remove "camera control" #164059

@JossPaddock

Description

@JossPaddock

Steps to reproduce

Using google map flutter widget on web, the camera controls suddenly always appear. This was not an issue at first and then it just appeared ~2 weeks ago.

see the "camera control" here: https://developers.google.com/maps/documentation/javascript/controls

I have these dependencies with these versions
google_maps_flutter_web: ^0.5.10+1
google_maps_flutter: 2.10.0

Expected results

The camera controls do not appear in the bottom right corner of the google map.

Actual results

The camera controls do appear in the bottom right corner of the map.

Code sample

Code sample
<script src="https://maps.googleapis.com/maps/api/js?key=my API key"></script>
                    GoogleMap(
                      onCameraMove: (CameraPosition cameraPosition) {
                        _onCameraMove(cameraPosition.zoom);
                      },
                      cloudMapId: mapId, // Set the map style ID here
                      zoomGesturesEnabled: _zoomEnabled,
                      initialCameraPosition: _kGooglePlex,
                      zoomControlsEnabled: false,
                      minMaxZoomPreference: MinMaxZoomPreference(3.0, 900.0),
                      markers: markers,
                      onMapCreated: (GoogleMapController controller) async {
                        double zoom = await controller.getZoomLevel();
                        _currentZoom = zoom;
                        print('onMapCreated is running');
                        if (_controllerSignedOut.isCompleted) {
                          _controllerSignedOut = Completer();
                        }

                        _controllerSignedOut.future.then((value) {
                          value.setMapStyle(_mapStyleString);
                        });
                        print('mapStyle should be set');
                        print('callback is working');
                        setState(() {});
                        print(markers.length);
                        await loadMarkers(false);
                        //await Future.delayed(Duration(milliseconds: 1000));
                        print(markers.length);
                        _controllerSignedOut.complete(controller);
                        setState(() {});
                      },
                    ),

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[!] Flutter (Channel stable, 3.22.2, on macOS 15.2 24C101 darwin-arm64, locale en-US)
    • Flutter version 3.22.2 on channel stable at /Users/josspaddock/Documents/flutter
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.3.0/libexec/bin/dart, which is not inside your current Flutter SDK checkout at
      /Users/josspaddock/Documents/flutter. Consider adding /Users/josspaddock/Documents/flutter/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (9 months ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/josspaddock/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[!] Xcode - develop for iOS and macOS (Xcode 16.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    ! iOS 18.2 Simulator not installed; this may be necessary for iOS and macOS development.
      To download and install the platform, open Xcode, select Xcode > Settings > Platforms,
      and click the GET button for the required platform.

      For more information, please visit:
        https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes
    • CocoaPods version 1.15.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] IntelliJ IDEA Community Edition (version 2023.3.4)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 78.1.1
    • Dart plugin version 233.13763.5

[✓] Connected device (4 available)
    • iPhone (19) (mobile)            • 00008130-0006345401D1001C • ios            • iOS 18.1.1 22B91
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 15.2 24C101 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 15.2 24C101 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 133.0.6943.127

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 4 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in triagePresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions