-
- All Implemented Interfaces:
public interface CameraController
-
-
Method Summary
Modifier and Type Method Description abstract voidsetZoomLevelRange(@NonNull() Range<Float> range)* Set the range of zoom levels, inclusive, that the camera controller can use abstract Range<Float>getZoomLevelRange()* The range of zoom levels, inclusive, that the camera controller can use abstract voidshowRegion(@NonNull() Camera.Region region)* Set the current viewing region of the camera abstract voidshowRegion(@NonNull() Camera.Region region, @NonNull() Rect marginRect)* Set the current viewing region of the camera, region will be shown inside the view rect. abstract voidshowRegion(@NonNull() Camera.Region region, @NonNull() Margins.Pixels pixelMargins)* Set the current viewing region of the camera, region will be shown inside the view rect. abstract voidshowRegion(@NonNull() Camera.Region region, @NonNull() Margins.Percentages percentageMargins)* Set the current viewing region of the camera, region will be shown inside the view rect. abstract booleanshowRegionForRoutes(@NonNull() RegionForRoutesInfo regionForRoutesInfo)Pan and zoom (but not rotate) view to encompass given routes within given screen-relative rectangle. abstract voidsetPosition(@NonNull() Camera.Position position)* Set the position and attitude of camera Camera.Position abstract Camera.PositiongetPosition()* Get the position and attitude of the camera Camera.Position abstract voidsetRenderMode(@NonNull() Camera.RenderMode mode)* Set the render mode. abstract Camera.RenderModegetRenderMode()* Get the current render mode. abstract voidenableFollowVehicleMode(@NonNull() Camera.FollowVehicleMode mode, boolean useAutoZoom)* Set the vehicle follow mode. abstract voiddisableFollowVehicle()* Disable the camera following the vehicle abstract voidsetEnableAutoZoom(boolean enableAutozoom)* Enable or disable auto zoom feature abstract Camera.FollowVehicleModegetVehicleFollowMode()* Get the current follow vehicle mode abstract PointFworldToViewport(@NonNull() Location location)Convert world coordinates to screen coordinates abstract LocationviewportToWorld(@NonNull() PointF point)Convert screen coordinates to world coordinates abstract voidshowMapScale(double verticalMargin, double horizontalMargin)shows and sets the map scale margins abstract voidhideMapScale()hides the map scale, to show map scale call SetMapScaleMargin -
-
Method Detail
-
setZoomLevelRange
abstract void setZoomLevelRange(@NonNull() Range<Float> range)
* Set the range of zoom levels, inclusive, that the camera controller can use
- Parameters:
range- the range of zoom levels, inclusive
-
getZoomLevelRange
@NonNull() abstract Range<Float> getZoomLevelRange()
* The range of zoom levels, inclusive, that the camera controller can use
-
showRegion
abstract void showRegion(@NonNull() Camera.Region region)
* Set the current viewing region of the camera
- Parameters:
region- Camera.Region
-
showRegion
abstract void showRegion(@NonNull() Camera.Region region, @NonNull() Rect marginRect)
* Set the current viewing region of the camera, region will be shown inside the view rect.
- Parameters:
region- Camera.RegionmarginRect- margin rectangle
-
showRegion
abstract void showRegion(@NonNull() Camera.Region region, @NonNull() Margins.Pixels pixelMargins)
* Set the current viewing region of the camera, region will be shown inside the view rect.
- Parameters:
region- Camera.RegionpixelMargins- margin, in pixels, for all sides
-
showRegion
abstract void showRegion(@NonNull() Camera.Region region, @NonNull() Margins.Percentages percentageMargins)
* Set the current viewing region of the camera, region will be shown inside the view rect.
- Parameters:
region- Camera.RegionpercentageMargins- margin, in percentages of the view, for all sides
-
showRegionForRoutes
abstract boolean showRegionForRoutes(@NonNull() RegionForRoutesInfo regionForRoutesInfo)
Pan and zoom (but not rotate) view to encompass given routes within given screen-relative rectangle. The rectangle's coordinates are automatically transformed to take into account the current screen orientation, and the origin is in the upper-left corner. Note that this currently doesn't take into account skew, so for this to work, the HorizontalOffset(Y) and VerticalOffset(X) must be set to zero.
- Parameters:
regionForRoutesInfo- data object which contains all needed data RegionForRoutesInfo
-
setPosition
abstract void setPosition(@NonNull() Camera.Position position)
* Set the position and attitude of camera Camera.Position
- Parameters:
position- the desired position and attitude of the camera
-
getPosition
@NonNull() abstract Camera.Position getPosition()
* Get the position and attitude of the camera Camera.Position
-
setRenderMode
abstract void setRenderMode(@NonNull() Camera.RenderMode mode)
* Set the render mode. See Camera.RenderMode
- Parameters:
mode- the mode to set
-
getRenderMode
@NonNull() abstract Camera.RenderMode getRenderMode()
* Get the current render mode. See Camera.RenderMode
-
enableFollowVehicleMode
abstract void enableFollowVehicleMode(@NonNull() Camera.FollowVehicleMode mode, boolean useAutoZoom)
* Set the vehicle follow mode. See Camera.FollowVehicleMode
- Parameters:
mode- the mode to setuseAutoZoom- automatically change the zoom level to highlight important moments.
-
disableFollowVehicle
abstract void disableFollowVehicle()
* Disable the camera following the vehicle
-
setEnableAutoZoom
abstract void setEnableAutoZoom(boolean enableAutozoom)
* Enable or disable auto zoom feature
-
getVehicleFollowMode
@Nullable() abstract Camera.FollowVehicleMode getVehicleFollowMode()
* Get the current follow vehicle mode
-
worldToViewport
@Nullable() abstract PointF worldToViewport(@NonNull() Location location)
Convert world coordinates to screen coordinates
- Parameters:
location- word point
-
viewportToWorld
@Nullable() abstract Location viewportToWorld(@NonNull() PointF point)
Convert screen coordinates to world coordinates
- Parameters:
point- screen point
-
showMapScale
abstract void showMapScale(double verticalMargin, double horizontalMargin)
shows and sets the map scale margins
- Parameters:
verticalMargin- in pixelshorizontalMargin- in pixels called with (0,0) means the map scale will be rendered at the bottom right corner as verticalMargin increases, the map scale will be moved up as horizontalMargin increases, the map scale will be moved left
-
hideMapScale
abstract void hideMapScale()
hides the map scale, to show map scale call SetMapScaleMargin
-
-
-
-