class InfoWindow {

  public void update() {
    MapboxMap mapboxMap = this.mapboxMap.get();
    Marker marker = boundMarker.get();
    View view = this.view.get();
    if (mapboxMap != null && marker != null && view != null) {
      coordinates = mapboxMap.getProjection().toScreenLocation(marker.getPosition());

      if (view instanceof BubbleLayout) {
        view.setX(coordinates.x + viewWidthOffset - markerWidthOffset);
      } else {
        view.setX(coordinates.x - (view.getMeasuredWidth() / 2) - markerWidthOffset);
      }
      view.setY(coordinates.y + viewHeightOffset);
    }
  }

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

}