Package 

Interface CameraController

    • Constructor Detail

    • Method Detail

      • 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.Region
        marginRect - margin rectangle
      • 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
      • 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
      • 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