Skip to content

[google_maps_flutter] iOS infoWindow is not showing always #159471

Closed
flutter/packages
#8939

Description

@ice1250

Steps to reproduce

Click on a marker in the Google sample code

Expected results

The InfoWindow should be �showing

Actual results

The InfoWindow is not showing.
This issue only occurs on iOS. It does not occur on Android.

ios version : 17.5

My yaml code ..

name: flutter_application_1
description: "A new Flutter project."
publish_to: 'none'

version: 1.0.0+1

environment:
sdk: ^3.5.4

dependencies:
flutter:
sdk: flutter

cupertino_icons: ^1.0.8
google_maps_flutter: ^2.10.0

dev_dependencies:
flutter_test:
sdk: flutter

flutter_lints: ^4.0.0

flutter:
uses-material-design: true

Code sample

Code sample
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key});


  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

late GoogleMapController mapController;

  final LatLng _center = const LatLng(-33.86, 151.20);

  void _onMapCreated(GoogleMapController controller) {
    mapController = controller;
  
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.green,
      ),
      home: Scaffold(
        appBar: AppBar(
            title: const Text('Sydney'), backgroundColor: Colors.green[700]),
        body: GoogleMap(
          onMapCreated: _onMapCreated,
          initialCameraPosition: CameraPosition(
            target: _center,
            zoom: 14.0,
          ),
          markers: {
             const Marker(
              markerId: MarkerId('Sydney'),
              position: LatLng(-33.86, 151.20),
              infoWindow: InfoWindow(
                title: "Sydney",
                snippet: "Capital of New South Wales",
              ),
            )
          },
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]
Simulator Screenshot - iPhone 15 - 2024-11-26 at 16 52 52

Logs

Logs
Launching lib/main.dart on iPhone 15 in debug mode...
Xcode build done.                                            9.1s
Connecting to VM Service at ws://127.0.0.1:56399/ujeJXU6tVYU=/ws
Connected to the VM Service.
Google Maps SDK for iOS version: 8.4.0.0
New version of Google Maps SDK for iOS available: 9.1.1.0
Reloaded 1 of 785 libraries in 188ms (compile: 8 ms, reload: 71 ms, reassemble: 86 ms).

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.5, on macOS 14.1.1 23B81 darwin-arm64, locale ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] VS Code (version 1.95.3)
[✓] Connected device (5 available)
[✓] Network resources

Activity

  1. changed the title [-][google_maps_flutter] iOS infoWindow[/-] [+][google_maps_flutter] iOS infoWindow not showing always[/+] on Nov 26, 2024
  2. changed the title [-][google_maps_flutter] iOS infoWindow not showing always[/-] [+][google_maps_flutter] iOS infoWindow is not showing always[/+] on Nov 26, 2024
  3. darshankawar commented on Nov 26, 2024

    @darshankawar
    Member

    @ice1250
    I am able to replicate this on iOS, while on Android it works as expected.

    stable : 3.24.5
    master : 3.27.0-1.0.pre.628
    
  4. added
    platform-iosiOS applications specifically
    p: mapsGoogle Maps plugin
    packageflutter/packages repository. See also p: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    team-iosOwned by iOS platform team
    and removed
    in triagePresently being triaged by the triage team
    on Nov 26, 2024
  5. siddhinho commented on Nov 29, 2024

    @siddhinho
  6. promocare commented on Dec 2, 2024

    @promocare

    Can confirm on iOS simulator and real device.

    Forcing on tap
    mapController.showMarkerInfoWindow(MarkerId(...));
    does not work.

    mapController.isMarkerInfoWindowShown(markerId) returns true.

    Rollback of plugin version does not fix the issue.

    [✓] Flutter (Channel stable, 3.24.4, on macOS 15.1.1 24B91 darwin-arm64, locale en-US)
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    [✓] Xcode - develop for iOS and macOS (Xcode 16.1)
    [✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google
        Chrome.app/Contents/MacOS/Google Chrome)
        ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
    [✓] Android Studio (version 2024.2)
    [✓] VS Code (version 1.95.3)
    [✓] Connected device (4 available)
    [✓] Network resources
    
  7. siddhinho commented on Dec 3, 2024

    @siddhinho

    Guys, i resolve this issue creating my own PopOver. I used this lib https://pub.dev/packages/custom_info_window and make my layout.

  8. 39 remaining items

  9. N-G3 commented on Apr 3, 2025

    @N-G3
  10. added
    r: fixedIssue is closed as already fixed in a newer version
    on Apr 4, 2025
  11. github-actions commented on Apr 18, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listc: regressionIt was better in the past than it is nowfound in release: 3.24Found to occur in 3.24found in release: 3.27Found to occur in 3.27has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: mapsGoogle Maps pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions