class InfoWindow {

  @NonNull
  InfoWindow close() {
    MapboxMap mapboxMap = this.mapboxMap.get();
    if (isVisible && mapboxMap != null) {
      isVisible = false;
      View view = this.view.get();
      if (view != null && view.getParent() != null) {
        ((ViewGroup) view.getParent()).removeView(view);
      }

      Marker marker = getBoundMarker();
      MapboxMap.OnInfoWindowCloseListener listener = mapboxMap.getOnInfoWindowCloseListener();
      if (listener != null) {
        listener.onInfoWindowClose(marker);
      }

      setBoundMarker(null);
    }
    return this;
  }

    InfoWindow(MapView mapView, int layoutResId, MapboxMap mapboxMap);
    InfoWindow(@NonNull View view, MapboxMap mapboxMap);

}