MapViewProxy

Used to perform operations on a composable MapView.

There should be a one-to-one relationship between a MapViewProxy and a composable MapView. This relationship is established by passing an instance of MapViewProxy to the composable MapView function. Operations can only be performed once the associated composable MapView has entered the composition. Operations performed when the associated composable MapView 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

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 locationToScreenOrNull(mapPoint: Point): ScreenCoordinate?

Converts a coordinate within the mapview's spatial reference to a screen coordinate (in pixels). If the wraparound mode is active, this method returns the closest screen location matching the specified map location. 'Closest' meaning: If it's in view, return that location, otherwise return for the frame where the location is the closest to the center of the view.

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

Converts a screen coordinate (in pixels) to a coordinate within the mapview's spatial reference.

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 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.

suspend fun setViewpointAnimated(viewpoint: Viewpoint, duration: Duration, curve: AnimationCurve): Result<Boolean>

Animates the map view to the new viewpoint, taking the given duration to complete the navigation.

Link copied to clipboard
suspend fun setViewpointCenter(center: Point, scale: Double? = null): Result<Boolean>

Animate the map view to the center point and scale.

Link copied to clipboard
suspend fun setViewpointGeometry(boundingGeometry: Geometry, paddingInDips: Double? = null): Result<Boolean>

Animate the map view to the bounding geometry with padding applied.

Link copied to clipboard
suspend fun setViewpointRotation(angleDegrees: Double): Result<Boolean>

Animate the rotation of the map view to the provided angle.

Link copied to clipboard
suspend fun setViewpointScale(scale: Double): Result<Boolean>

Animate the map view to zoom to a scale.