Map3DInitConfig

public final class Map3DInitConfig implements Parcelable


Base class to configure the Map3DView and related classes during their initialization.

Summary

Public fields

static final @NonNull Parcelable.Creator<@NonNull Map3DInitConfig>

Public methods

final @NonNull Map3DInitConfig
copy(
    double centerLat,
    double centerLng,
    double centerAlt,
    double heading,
    double tilt,
    double roll,
    double range,
    double minAltitude,
    double maxAltitude,
    double minHeading,
    double maxHeading,
    double minTilt,
    double maxTilt,
    LatLngBounds bounds,
    @Map3DMode int mapMode,
    String mapId,
    @NonNull String language,
    @NonNull String region
)

Creates a copy of this Map3DInitConfig with modified properties.

static final @NonNull Map3DInitConfig
create(
    double centerLat,
    double centerLng,
    double centerAlt,
    double heading,
    double tilt,
    double roll,
    double range,
    double minAltitude,
    double maxAltitude,
    double minHeading,
    double maxHeading,
    double minTilt,
    double maxTilt,
    LatLngBounds bounds,
    @Map3DMode Integer mapMode,
    String mapId,
    @NonNull String language,
    @NonNull String region
)

Factory method with default values.

static final @NonNull Map3DInitConfig

Creates a Map3DInitConfig from an AttributeSet.

final LatLngBounds

The bounds of the map in LatLng coordinates.

final double

The altitude of the center of the map in meters.

final double

The latitude of the center of the map in degrees.

final double

The longitude of the center of the map in degrees.

final double

The heading of the camera in degrees.

final @NonNull String

The language of the map's {@link Locale}.

final String

The map ID of the map.

final int

The mode of the map.

final double

The maximum altitude of the camera in meters.

final double

The maximum heading of the camera in degrees.

final double

The maximum tilt of the camera in degrees.

final double

The minimum altitude of the camera in meters.

final double

The minimum heading of the camera in degrees.

final double

The minimum tilt of the camera in degrees.

final double

The range of the camera in meters.

final @NonNull String

The region of the map's {@link Locale}.

final double

The roll of the camera in degrees.

final double

The tilt of the camera in degrees.

@NonNull String
void
writeToParcel(@NonNull Parcel out, int flags)

Extension functions

final void

Validates a specified Map3DInitConfig objects.

Public fields

CREATOR

public static final @NonNull Parcelable.Creator<@NonNull Map3DInitConfigCREATOR

Public methods

copy

public final @NonNull Map3DInitConfig copy(
    double centerLat,
    double centerLng,
    double centerAlt,
    double heading,
    double tilt,
    double roll,
    double range,
    double minAltitude,
    double maxAltitude,
    double minHeading,
    double maxHeading,
    double minTilt,
    double maxTilt,
    LatLngBounds bounds,
    @Map3DMode int mapMode,
    String mapId,
    @NonNull String language,
    @NonNull String region
)

Creates a copy of this Map3DInitConfig with modified properties.

Returns
@NonNull Map3DInitConfig

A new Map3DInitConfig with the same properties as this one, except for the ones specified as parameters.

create

public static final @NonNull Map3DInitConfig create(
    double centerLat,
    double centerLng,
    double centerAlt,
    double heading,
    double tilt,
    double roll,
    double range,
    double minAltitude,
    double maxAltitude,
    double minHeading,
    double maxHeading,
    double minTilt,
    double maxTilt,
    LatLngBounds bounds,
    @Map3DMode Integer mapMode,
    String mapId,
    @NonNull String language,
    @NonNull String region
)

Factory method with default values. This should be used to create Map3DInitConfig.

Parameters
@Map3DMode Integer mapMode

The mode of the map. If null, it is considered unspecified. A valid map mode must be specified for the map to load successfully.

fromAttributeSet

public static final @NonNull Map3DInitConfig fromAttributeSet(@NonNull Context context, AttributeSet attrs)

Creates a Map3DInitConfig from an AttributeSet.

Parameters
@NonNull Context context

The Context to read the options from.

AttributeSet attrs

The AttributeSet to read the options from.

Returns
@NonNull Map3DInitConfig

The Map3DInitConfig created from the AttributeSet.

getBounds

public final LatLngBounds getBounds()

The bounds of the map in LatLng coordinates.

getCenterAlt

public final double getCenterAlt()

The altitude of the center of the map in meters.

getCenterLat

public final double getCenterLat()

The latitude of the center of the map in degrees.

getCenterLng

public final double getCenterLng()

The longitude of the center of the map in degrees.

getHeading

public final double getHeading()

The heading of the camera in degrees.

getLanguage

public final @NonNull String getLanguage()

The language of the map's {@link Locale}.

getMapId

public final String getMapId()

The map ID of the map.

getMapMode

public final int getMapMode()

The mode of the map. This parameter is required.

getMaxAltitude

public final double getMaxAltitude()

The maximum altitude of the camera in meters.

getMaxHeading

public final double getMaxHeading()

The maximum heading of the camera in degrees.

getMaxTilt

public final double getMaxTilt()

The maximum tilt of the camera in degrees.

getMinAltitude

public final double getMinAltitude()

The minimum altitude of the camera in meters.

getMinHeading

public final double getMinHeading()

The minimum heading of the camera in degrees.

getMinTilt

public final double getMinTilt()

The minimum tilt of the camera in degrees.

getRange

public final double getRange()

The range of the camera in meters.

getRegion

public final @NonNull String getRegion()

The region of the map's {@link Locale}.

getRoll

public final double getRoll()

The roll of the camera in degrees.

getTilt

public final double getTilt()

The tilt of the camera in degrees.

toString

public @NonNull String toString()

writeToParcel

public void writeToParcel(@NonNull Parcel out, int flags)

Extension functions

ValidatorsKt.validate

public final void ValidatorsKt.validate(@NonNull Map3DInitConfig receiver)

Validates a specified Map3DInitConfig objects.

Throws
kotlin.IllegalArgumentException

If the Map3DInitConfig is not valid.