Skip to content

Conversation

@colinanderson
Copy link
Collaborator

@colinanderson colinanderson commented Dec 10, 2025

Description

PR to add a new Kotlin sample "add building scene layer" in layers category. Design is here.

Links and Data

Sample Epic: runtime/kotlin/issues/ISSUE_NUMBER

What To Review

  • Review the code to make sure it is easy to follow like other samples on Android
  • README.md and README.metadata.json files

How to Test

Run the sample on the sample viewer or the repo.

Screenshots

image

@colinanderson colinanderson marked this pull request as ready for review December 10, 2025 17:19
@shubham7109 shubham7109 added the New sample New Kotlin sample using ArcGIS Maps SDK label Dec 12, 2025
@shubham7109 shubham7109 self-requested a review December 12, 2025 17:05
@shubham7109 shubham7109 changed the title Colinanderson/buiding scene layer Add building scene layer Dec 12, 2025
Copy link
Collaborator

@shubham7109 shubham7109 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unable to test the sample locally, please update the arcgisMapsKotlinVersion to consume LSV build.

Seems like the layer may take a while to load, could you use the shared LoadingDialog component to display on launch and dismissed using the LaunchedEffect?

Comment on lines +46 to +47
import com.arcgismaps.toolkit.geoviewcompose.LocalSceneView
import com.arcgismaps.toolkit.geoviewcompose.LocalSceneViewProxy
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Libs toml will need to be updated with v.next to allow local builds use LSV.

Comment on lines +58 to +73
val elevationSource = remember {
ArcGISTiledElevationSource("https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer")
}

val buildingSceneLayer = remember {
BuildingSceneLayer("https://www.arcgis.com/home/item.html?id=669f6279c579486eb4a0acc7eb59d7ca")
.apply {
// Sets the altitude offset of the building scene layer.
// Upon first inspection of the model, it does not line up with the global
// elevation layer perfectly. To fix this, add an altitude offset to align
// the model with the ground surface.
altitudeOffset = 1.0
}
}

val localSceneViewProxy = remember { LocalSceneViewProxy() }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this sample does not use a view model, if so we should I would recommend remember { mutableStateOf(...) } as needed to allow updates to pass down to the GeoView.

// The full model sublayer which contains all the features of the building.
var fullModelSublayer: BuildingSublayer? = null

val arcGISScene = remember {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this scene also be a mutable state of if not using a view model?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New sample New Kotlin sample using ArcGIS Maps SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants