CameraPosition
Package: com.eegeo.mapapi.camera
Class which encapsulates a 3D camera position and orientation.
Fields
public final LatLng target
The coordinate of the interest point that the camera is pointing at.
public final double targetElevation
The elevation of the interest point, in meters. The property is interpreted differently, depending on targetElevationMode.
public final ElevationMode targetElevationMode
An enumerated value indicating whether targetElevation is specified as a height above terrain, or an absolute altitude above sea level.
public final String targetIndoorMapId
For a camera with interest point on an indoor map, the string identifier of the indoor map; else, an empty string.
public final int targetIndoorMapFloorId
For a camera with interest point on an indoor map, the identifier of an indoor map floor on which the target interest point lies.
public final boolean targetIndoorMapDefaultFloor
For a camera with interest point on an indoor map, whether to target the default floor or not.
public final double zoom
The zoom level, in the range 0 to 26.
public final double tilt
The angle formed at the target coordinate from the camera direction to the vertical, in degrees.
public final double bearing
The camera bearing, in degrees clockwise from north.
class CameraPosition.Builder
Builds a CameraPosition.
Constructors
Builder()
Creates an empty builder.
Builder(CameraPosition previous)
Creates an builder initialised to the values of the supplied CameraPosition
Methods
CameraPosition.Builder target(double latitude, double longitude)
Sets the target point of the camera.
Returns: Updated CameraPosition.Builder object.
Type | argument | Description |
---|---|---|
double | latitude | Latitude in degrees. |
double | longitude | Longitude in degrees. |
CameraPosition.Builder target(double latitude, double longitude, double altitude)
Sets the target point of the camera.
Returns: Updated CameraPosition.Builder object.
Type | argument | Description |
---|---|---|
double | latitude | Latitude in degrees. |
double | longitude | Longitude in degrees. |
double | altitude | Altitude in meters. |
CameraPosition.Builder target(LatLng latLon)
Sets the target point of the camera.
Returns: Updated CameraPosition.Builder object.
Type | argument | Description |
---|---|---|
LatLng | latLon | Target point. |
CameraPosition.Builder target(LatLngAlt latLonAlt)
Sets the target point of the camera.
Returns: Updated CameraPosition.Builder object.
Type | argument | Description |
---|---|---|
LatLngAlt | latLonAlt | Target point. |
CameraPosition.Builder elevation(double elevation)
Sets the targetElevation for the CameraPosition. The default targetElevation is 0. Note that this is an experimental field - values other than 0 may have unexpected effects on camera control
Returns: Updated CameraPosition.Builder object.
Type | argument | Description |
---|---|---|
double | elevation | The elevation, in meters. |
CameraPosition.Builder elevationMode(ElevationMode elevationMode)
Sets the targetElevationMode for the CameraPosition. The default targetElevationMode is ElevationMode.HeightAboveGround. Note that this is an experimental field - values other than ElevationMode.HeightAboveGround may have unexpected effects on camera control
Returns: Updated CameraPosition.Builder object.
Type | argument | Description |
---|---|---|
ElevationMode | elevationMode | The ElevationMode used to interpret the targetElevation. |
CameraPosition.Builder indoor(String indoorMapId)
Sets the indoor map properties for the CameraPosition target. If this method is not called, the builder is initialised to create a CameraPosition with its interest point on an outdoor map.
Returns: Updated CameraPosition.Builder object.
Type | argument | Description |
---|---|---|
String | indoorMapId | The identifier of the indoor map of the camera target interest point. |
CameraPosition.Builder indoor(String indoorMapId, int indoorMapFloorId)
Sets the indoor map properties for the CameraPosition target. If this method is not called, the builder is initialised to create a CameraPosition with its interest point on an outdoor map.
Returns: Updated CameraPosition.Builder object.
Type | argument | Description |
---|---|---|
String | indoorMapId | The identifier of the indoor map of the camera target interest point. |
int | indoorMapFloorId | The identifier of the indoor map floor of the camera target interest point. |
CameraPosition.Builder zoom(double zoom)
Sets the camera zoom.
Returns: Updated CameraPosition.Builder object.
Type | argument | Description |
---|---|---|
double | zoom | The new zoom value. |
CameraPosition.Builder tilt(double tilt)
Sets the tilt of the camera.
Returns: Updated CameraPosition.Builder object.
Type | argument | Description |
---|---|---|
double | tilt | Camera tilt in degrees. Tilt is an offset from the earth normal, so a tilt of 0 means the camera looks straight down at the earth. The SDK will clamp the requested tilt to be within limits dependent on altitude. |
CameraPosition.Builder bearing(double bearing)
Sets the orientation of the camera in the earth tangent plane, in degrees clockwise from north.
Returns: Updated CameraPosition.Builder object.
Type | argument | Description |
---|---|---|
double | bearing | The direction that the camera is facing, in degrees clockwise from north. |
CameraPosition build()
Builds a CameraPosition object.
Returns: The final CameraPosition object.