-
- All Implemented Interfaces:
public interface CameraController
-
-
Method Summary
Modifier and Type Method Description abstract Unit
showRegion(Camera.Region region)
abstract Unit
showRegion(Camera.Region region, Rect marginRect)
abstract Unit
showRegion(Camera.Region region, Margins.Pixels pixelMargins)
abstract Unit
showRegion(Camera.Region region, Margins.Percentages percentageMargins)
abstract Boolean
showRegionForRoutes(RegionForRoutesInfo regionForRoutesInfo)
Pan and zoom (but not rotate) view to encompass given routes within given screen-relative rectangle. abstract Boolean
showRegionForModelInstance(RegionForModelInstance regionForModelInstance)
Pan and zoom (but not rotate) view to encompass the given model instance within given screen-relative rectangle. abstract Unit
enableFollowVehicleMode(Camera.FollowVehicleMode mode, Boolean useAutoZoom)
abstract Unit
disableFollowVehicle()
abstract Unit
setEnableAutoZoom(Boolean enableAutozoom)
abstract PointF
worldToViewport(Location location)
Convert world coordinates to screen coordinates abstract Location
viewportToWorld(PointF point)
Convert screen coordinates to world coordinates abstract Range<Float>
getZoomLevelRange()
abstract Unit
setZoomLevelRange(Range<Float> zoomLevelRange)
abstract Camera.Position
getPosition()
abstract Unit
setPosition(Camera.Position position)
abstract Camera.RenderMode
getRenderMode()
abstract Unit
setRenderMode(Camera.RenderMode renderMode)
abstract Double
getStepAutoZoomMaxZoom()
the max zoom level when auto zoom on step which can be used to make the camera will not zoom in as close as possible. abstract Unit
setStepAutoZoomMaxZoom(Double stepAutoZoomMaxZoom)
the max zoom level when auto zoom on step which can be used to make the camera will not zoom in as close as possible. abstract Camera.FollowVehicleMode
getVehicleFollowMode()
abstract Unit
setVehicleFollowMode(Camera.FollowVehicleMode vehicleFollowMode)
-
-
Method Detail
-
showRegion
abstract Unit showRegion(Camera.Region region)
Set the current viewing region of the camera
- Parameters:
region
- Camera.Region
-
showRegion
abstract Unit showRegion(Camera.Region region, 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 Unit showRegion(Camera.Region region, 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 Unit showRegion(Camera.Region region, 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(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
-
showRegionForModelInstance
abstract Boolean showRegionForModelInstance(RegionForModelInstance regionForModelInstance)
Pan and zoom (but not rotate) view to encompass the given model instance 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.
The rect is specified by parameters of x, y, width and height. If gridAligned is false, the rectangle region can be encompassed in the giver rect in arbitrary rotation. In fact the rect covers the circumscribed circle of the region in this case. If gridAligned is true, the rect covers the rectangle of the region only when it's in 2D north up mode.
Note that this currently doesn't take into account skew, so for this to work, the HorizontalOffset and VerticalOffset must be set to zero.
- Parameters:
regionForModelInstance
- data object which contains all needed data RegionForModelInstance
-
enableFollowVehicleMode
abstract Unit enableFollowVehicleMode(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 Unit disableFollowVehicle()
Disable the camera following the vehicle
-
setEnableAutoZoom
abstract Unit setEnableAutoZoom(Boolean enableAutozoom)
Enable or disable auto zoom feature
-
worldToViewport
abstract PointF worldToViewport(Location location)
Convert world coordinates to screen coordinates
- Parameters:
location
- word point
-
viewportToWorld
abstract Location viewportToWorld(PointF point)
Convert screen coordinates to world coordinates
- Parameters:
point
- screen point
-
getZoomLevelRange
abstract Range<Float> getZoomLevelRange()
-
setZoomLevelRange
abstract Unit setZoomLevelRange(Range<Float> zoomLevelRange)
-
getPosition
abstract Camera.Position getPosition()
Set the position and attitude of camera Camera.Position
-
setPosition
abstract Unit setPosition(Camera.Position position)
Set the position and attitude of camera Camera.Position
- Parameters:
position
- the desired position and attitude of the camera
-
getRenderMode
abstract Camera.RenderMode getRenderMode()
-
setRenderMode
abstract Unit setRenderMode(Camera.RenderMode renderMode)
-
getStepAutoZoomMaxZoom
abstract Double getStepAutoZoomMaxZoom()
the max zoom level when auto zoom on step which can be used to make the camera will not zoom in as close as possible. Max engine zoom is 0, so setting something larger than that will make the stepped auto zoom stop zooming in sooner, allowing the camera to see more please noted that 0 is continent level and 18 is street level
-
setStepAutoZoomMaxZoom
abstract Unit setStepAutoZoomMaxZoom(Double stepAutoZoomMaxZoom)
the max zoom level when auto zoom on step which can be used to make the camera will not zoom in as close as possible. Max engine zoom is 0, so setting something larger than that will make the stepped auto zoom stop zooming in sooner, allowing the camera to see more please noted that 0 is continent level and 18 is street level
-
getVehicleFollowMode
abstract Camera.FollowVehicleMode getVehicleFollowMode()
Get the current follow vehicle mode
-
setVehicleFollowMode
abstract Unit setVehicleFollowMode(Camera.FollowVehicleMode vehicleFollowMode)
Get the current follow vehicle mode
-
-
-
-