toInitialCameraOptions

fun toInitialCameraOptions(initialView: MPInitialView, viewWidthDp: Int, viewHeightDp: Int, administrativeId: String? = null): CameraOptions?

Camera options for a map that does not exist yet — pass them as MapInitOptions.cameraOptions, so the map's very first frame is the venue rather than the globe.

The zoom fits the venue's bounds to a view of the given size, since no map is there to fit them.

administrativeId names the venue to frame, for a multi-venue solution — the same value passed to MPMapConfig.Builder.setInitialVenue, so this camera and the one the SDK applies agree. Without it a multi-venue solution yields null rather than a guess; see MPInitialView.venueToFrame.

Return

The options, or null when no venue can be framed or there is nothing to derive a zoom from.