Skip to content

Add dynamic entity layer #139

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

Merged
merged 19 commits into from
Oct 31, 2023
Merged

Add dynamic entity layer #139

merged 19 commits into from
Oct 31, 2023

Conversation

prupani-7
Copy link

@prupani-7 prupani-7 commented Oct 16, 2023

Description

PR to add a new Kotlin sample "Add Dynamic Entity Layer" in Layers category.

Links and Data

Sample Epic: runtime/kotlin/issues/2927

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.

@prupani-7 prupani-7 self-assigned this Oct 17, 2023
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.

Nice sample @prupani-7!

prupani-7 and others added 11 commits October 19, 2023 15:42
…ple/adddynamicentitylayer/screens/MainScreen.kt

Co-authored-by: Shubham Sharma <[email protected]>
…ple/adddynamicentitylayer/screens/MainScreen.kt

Co-authored-by: Shubham Sharma <[email protected]>
…ple/adddynamicentitylayer/components/BottomAppContent.kt

Co-authored-by: Shubham Sharma <[email protected]>
…ple/adddynamicentitylayer/components/BottomAppContent.kt

Co-authored-by: Shubham Sharma <[email protected]>
…ple/adddynamicentitylayer/components/BottomAppContent.kt

Co-authored-by: Shubham Sharma <[email protected]>
…ple/adddynamicentitylayer/components/MapViewModel.kt

Co-authored-by: Shubham Sharma <[email protected]>
…ple/adddynamicentitylayer/components/MapViewModel.kt

Co-authored-by: Shubham Sharma <[email protected]>
@prupani-7
Copy link
Author

@shubham7109 thanks for the detailed review. Applied you suggestions and added couple comments with my thoughts. Please re-review and let me know if the changes look good to be approved?

@prupani-7 prupani-7 requested a review from shubham7109 October 20, 2023 21:05
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.

Just one final change. Looks good to approve @prupani-7!

observationsPerTrack: Float,
onDismiss: () -> Unit = { }
) {
var sliderValue by remember { mutableStateOf(observationsPerTrack) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

You could remove this as well, and use observationsPerTrack to set the slider value.

Copy link
Author

Choose a reason for hiding this comment

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

missed removing this earlier. Thanks!

Comment on lines 146 to 153
text = sliderValue.toInt().toString()
)
}
Slider(
value = sliderValue,
onValueChange = {
sliderValue = it
onObservationsChanged(sliderValue)
Copy link
Collaborator

Choose a reason for hiding this comment

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

And you could pass in the observationsPerTrack to the slider and Compose would handle observation changes

Suggested change
text = sliderValue.toInt().toString()
)
}
Slider(
value = sliderValue,
onValueChange = {
sliderValue = it
onObservationsChanged(sliderValue)
text = observationsPerTrack.roundToInt().toString()
)
}
Slider(
value = observationsPerTrack,
onValueChange = {
onObservationsChanged(it)

@shubham7109 shubham7109 added the New sample New Kotlin sample using ArcGIS Maps SDK label Oct 24, 2023
@shubham7109 shubham7109 changed the title Pri/add dynamic entity layer Add dynamic entity layer Oct 27, 2023
@rchintapalli rchintapalli self-requested a review October 30, 2023 16:07
Copy link
Collaborator

@rchintapalli rchintapalli left a comment

Choose a reason for hiding this comment

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

Couple of doc related issues found

Overall a nice sample to showcase dynamic entities, UI looks nice and clean


## Use case

A stream service is a type of service provided by ArcGIS Velocity and GeoEvent Server that allows clients to receive a stream of data observations via a web socket. ArcGIS Maps SDK for .NET allows you to connect to a stream service and manage the information as dynamic entities and display them in a dynamic entity layer. Displaying information from feeds such as a stream service is important in applications like dashboards where users need to visualize and track updates of real-world objects in real-time.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
A stream service is a type of service provided by ArcGIS Velocity and GeoEvent Server that allows clients to receive a stream of data observations via a web socket. ArcGIS Maps SDK for .NET allows you to connect to a stream service and manage the information as dynamic entities and display them in a dynamic entity layer. Displaying information from feeds such as a stream service is important in applications like dashboards where users need to visualize and track updates of real-world objects in real-time.
A stream service is a type of service provided by ArcGIS Velocity and GeoEvent Server that allows clients to receive a stream of data observations via a web socket. ArcGIS Maps SDK for Kotlin allows you to connect to a stream service and manage the information as dynamic entities and display them in a dynamic entity layer. Displaying information from feeds such as a stream service is important in applications like dashboards where users need to visualize and track updates of real-world objects in real-time.


## How it works

1. Create an `ArcGIStreamService` using a `Uri`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

In Kotlin we just take Url string. This seems to be dotnet specific

@prupani-7
Copy link
Author

Thanks @rchintapalli for suggestions! good catch
Please re-review?

@prupani-7 prupani-7 merged commit 24d6391 into v.next Oct 31, 2023
@prupani-7 prupani-7 deleted the pri/add-dynamic-entity-layer branch October 31, 2023 21:48
@prupani-7
Copy link
Author

Thanks @shubham7109 @rchintapalli for reviews! Merged.

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