abhishekduhoon/custom_info_window

How show infoWindows on onMapCreated function.

Opened this issue · 1 comments

Hi, I would like to know how show customInfoWindow when a map is been created with his markers, I try something like this, but doesn't work
image

The problem is that the library uses googleMapController.getScreenCoordinate() function but it returns ScreenCoordinate(0, 0) in onMapCreated.

What i have done in my project is add the infowindow in the onCameraIdle() function, because then googleMapController.getScreenCoordinate() will return the correct coordinates.

GoogleMap(
  onCameraIdle: () {
    _customInfoWindowController.addInfoWindow(
      MyInfoWindow(),
      LatLng(28.7041, 77.1025)
    )
  }
)