SceneViewProxy

Used to perform operations on a composable SceneView.

There should be a one-to-one relationship between a SceneViewProxy and a composable SceneView. This relationship is established by passing an instance of SceneViewProxy to the composable SceneView function. Operations can only be performed once the associated composable SceneView has entered the composition. Operations performed when the associated composable SceneView is not in the composition will fail gracefully, i.e. won't throw exceptions but won't return a successful result.

Since

200.4.0

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

The horizontal field of view of the scene view in degrees.

Link copied to clipboard

The ratio indicates how much the vertical field of view is distorted.

Link copied to clipboard

Indicates whether manual rendering is enabled or not.

Link copied to clipboard

True if continuous panning across the international date line is enabled in the GeoView, false otherwise. A null value represents that it is currently undetermined.

Functions

Link copied to clipboard

Exports an image snapshot of the current composable MapView or SceneView.

Link copied to clipboard
fun getLayerViewState(layer: Layer): LayerViewState?

Retrieve the layer's LayerViewState.

Link copied to clipboard
suspend fun identify(layer: Layer, screenCoordinate: ScreenCoordinate, tolerance: Dp, returnPopupsOnly: Boolean = false, maximumResults: Int? = 1): Result<IdentifyLayerResult>

Initiate an Identify operation on the specified layer.

suspend fun identify(graphicsOverlay: GraphicsOverlay, screenCoordinate: ScreenCoordinate, tolerance: Dp, returnPopupsOnly: Boolean = false, maximumResults: Int? = 1): Result<IdentifyGraphicsOverlayResult>

Initiate an Identify operation on the specified graphicsOverlay.

Link copied to clipboard
suspend fun identifyGraphicsOverlays(screenCoordinate: ScreenCoordinate, tolerance: Dp, returnPopupsOnly: Boolean = false, maximumResults: Int? = 1): Result<List<IdentifyGraphicsOverlayResult>>

Initiate an Identify operation on all graphics overlays.

Link copied to clipboard
suspend fun identifyLayers(screenCoordinate: ScreenCoordinate, tolerance: Dp, returnPopupsOnly: Boolean = false, maximumResults: Int? = 1): Result<List<IdentifyLayerResult>>

Initiate an Identify operation on all layers in the view.

Link copied to clipboard
fun locationToScreen(point: Point): LocationToScreenResult?

Converts a location in map coordinates to a point in screen coordinates relative to the upper-left corner of the scene view.

Link copied to clipboard

Draws the scene based on a user-defined pulse. In order for this method to have any effect, isManualRenderingEnabled has to be set to true

Link copied to clipboard
fun screenToBaseSurface(screenCoordinate: ScreenCoordinate): Point?

Converts a screen coordinate (in pixels) to a point on the base surface of the scene within the scene view's spatial reference.

Link copied to clipboard
suspend fun screenToLocation(screenCoordinate: ScreenCoordinate): Result<Point>

Asynchronously converts a screen coordinate relative to the upper-left corner of the scene view to a location in map coordinates.

Link copied to clipboard
suspend fun setBookmark(bookmark: Bookmark): Result<Boolean>

Animate the geo view's viewpoint to the viewpoint of the bookmark.

Link copied to clipboard
fun setFieldOfView(angle: Double, distortionRatio: Double = 1.0)

Sets the field of view on the scene view in degrees and determines how much the vertical field of view is distorted.

Link copied to clipboard
fun setFieldOfViewFromLensIntrinsics(xFocalLength: Float, yFocalLength: Float, xPrincipal: Float, yPrincipal: Float, xImageSize: Float, yImageSize: Float, deviceOrientation: DeviceOrientation)

Matches the field of view of the scene view to the field of view of a camera lens using the lens characteristics. All parameter values must be greater than 0.

Link copied to clipboard
fun setManualRenderingEnabled(isManualRenderingEnabled: Boolean)

Sets whether manual rendering is enabled or not.

Link copied to clipboard
fun setViewpoint(viewpoint: Viewpoint)

Change the geo view to the new viewpoint. The viewpoint is updated instantaneously.

Link copied to clipboard
suspend fun setViewpointAnimated(viewpoint: Viewpoint, duration: Duration = 0.25.seconds): Result<Boolean>

Animate the geo view to the new viewpoint, taking the given duration to complete the navigation.

Link copied to clipboard
fun setViewpointCamera(camera: Camera)

Change the scene view to the viewpoint specified by the given camera. The viewpoint is updated instantaneously.

Link copied to clipboard
suspend fun setViewpointCameraAnimated(camera: Camera, duration: Duration = 0.25.seconds): Result<Boolean>

Animate the scene view to the viewpoint specified by the given camera using the specified duration.