Scene View
A compose equivalent of the view-based SceneView.
Since
200.4.0
Parameters
the ArcGISScene to be rendered by this composable SceneView
Modifier to be applied to the composable SceneView
lambda invoked when the viewpoint changes, passing a viewpoint type of ViewpointType.CenterAndScale
lambda invoked when the viewpoint changes, passing a viewpoint type of ViewpointType.BoundingGeometry
graphics overlays used by this composable SceneView
the SceneViewProxy to associate with the composable SceneView
the SceneViewInteractionOptions used by this composable SceneView
the ViewLabelProperties used by the composable SceneView
the SelectionProperties used by the composable SceneView
true if attribution bar is visible in the composable SceneView, false otherwise
lambda invoked when the attribution text of the composable SceneView has changed
lambda invoked when the attribution bar's position or size changes
the CameraController to manage the position, orientation, and movement of the camera
analysis overlays that render the results of 3D visual analysis on the composable SceneView
image overlays for displaying images in the composable SceneView
the effect applied to the scene's atmosphere
the TimeExtent used by the composable SceneView
lambda invoked when the composable SceneView's TimeExtent is changed
the visual effect of outer space in the composable SceneView
the position of the sun in the composable SceneView based on a specific date and time
the type of ambient sunlight and shadows in the composable SceneView
the color of the composable SceneView's ambient light
lambda invoked when the navigation status of the composable SceneView has changed
lambda invoked when the spatial reference of the composable SceneView has changed
lambda invoked when the composable SceneView's layer view state is changed
lambda invoked when the user starts and ends interacting with the composable SceneView
lambda invoked when the viewpoint camera of the composable SceneView has changed
lambda invoked when a user performs a rotation gesture on the composable SceneView
lambda invoked when a user performs a pinch gesture on the composable SceneView
lambda invoked when the user removes all their pointers from the composable SceneView
lambda invoked when the user first presses on the composable SceneView
lambda invoked when the user taps once on the composable SceneView
lambda invoked the user double taps on the composable SceneView
lambda invoked when a user holds a pointer on the composable SceneView
lambda invoked when a user taps two pointers on the composable SceneView
lambda invoked when a user drags a pointer or pointers across composable SceneView
lambda invoked when the draw status of the composable SceneView is changed
the content of the composable SceneView
See also
Samples
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import com.arcgismaps.Color
import com.arcgismaps.data.ServiceFeatureTable
import com.arcgismaps.geometry.Point
import com.arcgismaps.geometry.SpatialReference
import com.arcgismaps.mapping.ArcGISMap
import com.arcgismaps.mapping.ArcGISScene
import com.arcgismaps.mapping.ArcGISTiledElevationSource
import com.arcgismaps.mapping.BasemapStyle
import com.arcgismaps.mapping.Surface
import com.arcgismaps.mapping.Viewpoint
import com.arcgismaps.mapping.layers.FeatureLayer
import com.arcgismaps.mapping.symbology.SimpleLineSymbol
import com.arcgismaps.mapping.symbology.SimpleLineSymbolStyle
import com.arcgismaps.mapping.symbology.SimpleRenderer
import com.arcgismaps.mapping.view.Camera
import com.arcgismaps.toolkit.geoviewcompose.MapView
import com.arcgismaps.toolkit.geoviewcompose.SceneView
fun main() {
//sampleStart
// Display a SceneView with an elevation surface and an initial viewpoint
// add base surface for elevation data
val elevationSource = ArcGISTiledElevationSource(
uri = "https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"
)
val surface = Surface().apply {
elevationSources.add(elevationSource)
// add an exaggeration factor to increase the 3D effect of the elevation.
elevationExaggeration = 2.5f
}
val cameraLocation = Point(
x = -118.794,
y = 33.909,
z = 5330.0,
spatialReference = SpatialReference.wgs84()
)
val camera = Camera(
locationPoint = cameraLocation,
heading = 355.0,
pitch = 72.0,
roll = 0.0
)
// create a scene to display the elevation source
val scene by remember {
mutableStateOf(ArcGISScene(BasemapStyle.ArcGISImagery).apply {
baseSurface = surface
initialViewpoint = Viewpoint(cameraLocation, camera)
})
}
// display the Composable SceneView
SceneView(
scene,
modifier = Modifier.fillMaxSize(),
)
//sampleEnd
}