Skip to content

Forms: Check if map has a FeatureFormDefinition #399

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 11 commits into from
Apr 23, 2024

Conversation

kaushikrw
Copy link
Collaborator

@kaushikrw kaushikrw commented Apr 18, 2024

Summary of changes

  • When a Map is opened, a check is performed to see if any of its FeatureLayers contains a FeatureFormDefinition. If none exists, an alert dialog is shown informing the user.
  • Bumps SDK version to pick up the latest changes

@kaushikrw kaushikrw self-assigned this Apr 18, 2024
@kaushikrw kaushikrw marked this pull request as ready for review April 18, 2024 21:13
@kaushikrw kaushikrw requested a review from sorenoid April 18, 2024 21:14
Copy link
Collaborator

@sorenoid sorenoid left a comment

Choose a reason for hiding this comment

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

Looks good, I suggest one small change

map.load()
val layer = map.operationalLayers.firstOrNull {
if (it is FeatureLayer) {
it.load()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think it is necessary to load the layer here. The featureFormDefinition will be non-null before the layer is loaded if it exists. It could be loaded below in the else case so that only the layer that is needed is loaded explicitly here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@sorenoid It seems like the layer needs to be loaded at this time. I can update this when that changes.

@kaushikrw kaushikrw requested a review from sorenoid April 22, 2024 22:24
Copy link
Collaborator

@sorenoid sorenoid left a comment

Choose a reason for hiding this comment

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

based on the featureFormDefinition's availability before layer loading, approved.

@kaushikrw
Copy link
Collaborator Author

thanks @sorenoid

@kaushikrw kaushikrw merged commit 10caf96 into feature-branches/forms Apr 23, 2024
@kaushikrw kaushikrw deleted the kaushik/forms/identify-ffdef branch April 23, 2024 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants