public void initialize(OnNavigationReadyCallback onNavigationReadyCallback,
                         @NonNull CameraPosition initialMapCameraPosition) {
    this.onNavigationReadyCallback = onNavigationReadyCallback;
    this.initialMapCameraPosition = initialMapCameraPosition;
    if (!isMapInitialized) {
      mapView.getMapAsync(this);
    } else {
      onNavigationReadyCallback.onNavigationReady(navigationViewModel.isRunning());
    }
  }
public void initialize ( OnNavigationReadyCallback onNavigationReadyCallback , @ NonNull CameraPosition initialMapCameraPosition ) { this . onNavigationReadyCallback = onNavigationReadyCallback ; this . initialMapCameraPosition = initialMapCameraPosition ; if ( ! isMapInitialized ) { mapView . getMapAsync ( this ) ; } else { onNavigationReadyCallback . onNavigationReady ( navigationViewModel . isRunning ( ) ) ; } }
Should be called after {@link NavigationView#onCreate(Bundle)}.
<p>
This method adds the {@link OnNavigationReadyCallback},
which will fire the ready events for this view.
<p>
This method also accepts a {@link CameraPosition} that will be set as soon as the map is
ready.  Note, this position is ignored during rotation in favor of the last known map position.

@param onNavigationReadyCallback to be set to this view
@param initialMapCameraPosition  to be shown once the map is ready