-
Notifications
You must be signed in to change notification settings - Fork 34
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
Migrate "Query features with Arcade expression" to compose #294
base: v.next
Are you sure you want to change the base?
Conversation
801e4ec
to
268b660
Compare
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.
@01smito01 looks good, but I've run into a bug with the layer not being set
...e/queryfeatureswitharcadeexpression/components/QueryFeaturesWithArcadeExpressionViewModel.kt
Outdated
Show resolved
Hide resolved
} | ||
|
||
_queryStateFlow.value = QueryState(arcadeEvaluationResult.result as Double, LoadState.LOADED) | ||
} |
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.
if policeBeatsLayer
is null, then the load state never gets set back to LOADED
policeBeatsLayer = arcGISMap.operationalLayers.firstOrNull { layer -> | ||
layer.id == "RPD_Reorg_9254" | ||
} |
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 think this needs to go in the coroutine scope above, because if the map is not loaded then the layer remains null
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.
LGTM, app is now working on my device
} | ||
|
||
// update query state, map is ready for user interaction | ||
_queryStateFlow.value = QueryState() |
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.
Little Nitpick: I think it's a bit clearer to explicitly set this to READY_TO_START
here rather than leave it as a default value
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 swithered a bit on passing READY_TO_START
explicitly, but it does make things clearer. I'll add it back in.
Description
Query features with Arcade expression, but compose
Links and Data
Old version: here
Sample design: here
Sample Epic: #4961
What To Review
README.md
makes senseHow to Test
Run the sample on the sample viewer.