-
Notifications
You must be signed in to change notification settings - Fork 42
Add building scene layer #446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v.next
Are you sure you want to change the base?
Conversation
shubham7109
left a comment
There was a problem hiding this 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?
| import com.arcgismaps.toolkit.geoviewcompose.LocalSceneView | ||
| import com.arcgismaps.toolkit.geoviewcompose.LocalSceneViewProxy |
There was a problem hiding this comment.
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.
| 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() } |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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?
Description
PR to add a new Kotlin sample "add building scene layer" in
layerscategory. Design is here.Links and Data
Sample Epic:
runtime/kotlin/issues/ISSUE_NUMBERWhat To Review
README.mdandREADME.metadata.jsonfilesHow to Test
Run the sample on the sample viewer or the repo.
Screenshots