class DynamicCamera extends SimpleCamera {

  @Override
  public Point target(RouteInformation routeInformation) {
    if (isShutdown) {
      return DEFAULT_TARGET;
    }

    if (routeInformation.location() != null) {
      Location target = routeInformation.location();
      return Point.fromLngLat(target.getLongitude(), target.getLatitude());
    } else if (routeInformation.route() != null) {
      return super.target(routeInformation);
    }
    // Without route or location info, return the current position
    LatLng currentTarget = mapboxMap.getCameraPosition().target;
    return Point.fromLngLat(currentTarget.getLongitude(), currentTarget.getLongitude());
  }

  public  DynamicCamera(@NonNull MapboxMap mapboxMap);

}