public static final class CameraPosition.Builder
extends java.lang.Object
Constructor | Description |
---|---|
Builder() |
Create an empty builder.
|
Builder(android.content.res.TypedArray typedArray) |
Create a builder with an existing CameraPosition data.
|
Builder(CameraPosition previous) |
Create a builder with an existing CameraPosition data.
|
Builder(com.trimblemaps.mapsdk.camera.CameraUpdateFactory.CameraPositionUpdate update) |
Create a builder from an existing CameraPositionUpdate update.
|
Builder(com.trimblemaps.mapsdk.camera.CameraUpdateFactory.ZoomUpdate update) |
Create builder from an existing CameraPositionUpdate update.
|
Modifier and Type | Method | Description |
---|---|---|
CameraPosition.Builder |
bearing(double bearing) |
Sets the direction that the camera is pointing in, in degrees clockwise from north.
|
CameraPosition |
build() |
Builds the CameraPosition.
|
CameraPosition.Builder |
padding(double[] padding) |
Padding in pixels that shifts the viewport by the specified amount.
|
CameraPosition.Builder |
padding(double left,
double top,
double right,
double bottom) |
Padding in pixels that shifts the viewport by the specified amount.
|
CameraPosition.Builder |
target(LatLng location) |
Sets the location where the camera is pointing at.
|
CameraPosition.Builder |
tilt(double tilt) |
Set the tilt of the camera in degrees
|
CameraPosition.Builder |
zoom(double zoom) |
Set the zoom of the camera
|
public Builder()
public Builder(@Nullable CameraPosition previous)
previous
- Existing CameraPosition values to usepublic Builder(@Nullable android.content.res.TypedArray typedArray)
typedArray
- TypedArray containing attribute valuespublic Builder(@Nullable com.trimblemaps.mapsdk.camera.CameraUpdateFactory.CameraPositionUpdate update)
update
- Update containing camera optionspublic Builder(@Nullable com.trimblemaps.mapsdk.camera.CameraUpdateFactory.ZoomUpdate update)
update
- Update containing camera options@NonNull public CameraPosition.Builder bearing(double bearing)
bearing
- Bearing@NonNull public CameraPosition.Builder target(LatLng location)
location
- target of the camera@NonNull public CameraPosition.Builder tilt(double tilt)
value is clamped to TrimbleMapsConstants.MINIMUM_TILT
and TrimbleMapsConstants.MAXIMUM_TILT
.
tilt
- Tilt value of the camera@NonNull public CameraPosition.Builder zoom(double zoom)
Zoom ranges from TrimbleMapsConstants.MINIMUM_ZOOM
to TrimbleMapsConstants.MAXIMUM_ZOOM
zoom
- Zoom value of the camera@NonNull public CameraPosition.Builder padding(double[] padding)
Specified in left, top, right, bottom order.
padding
- Camera padding@NonNull public CameraPosition.Builder padding(double left, double top, double right, double bottom)
Specified in left, top, right, bottom order.
public CameraPosition build()