public static final class CameraPosition.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder()
Create an empty builder.
|
Builder(CameraPosition previous)
Create a builder with an existing CameraPosition data.
|
Builder(com.mapbox.mapboxsdk.camera.CameraUpdateFactory.CameraPositionUpdate update)
Create a builder from an existing CameraPositionUpdate update.
|
Builder(com.mapbox.mapboxsdk.camera.CameraUpdateFactory.ZoomUpdate update)
Create builder from an existing CameraPositionUpdate update.
|
Builder(android.content.res.TypedArray typedArray)
Create a builder with an existing CameraPosition data.
|
Modifier and Type | Method and 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.mapbox.mapboxsdk.camera.CameraUpdateFactory.CameraPositionUpdate update)
update
- Update containing camera optionspublic Builder(@Nullable com.mapbox.mapboxsdk.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 MapboxConstants.MINIMUM_TILT
and MapboxConstants.MAXIMUM_TILT
.
tilt
- Tilt value of the camera@NonNull public CameraPosition.Builder zoom(double zoom)
Zoom ranges from MapboxConstants.MINIMUM_ZOOM
to MapboxConstants.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()