-
Notifications
You must be signed in to change notification settings - Fork 6
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
Forms
: Check if map has a FeatureFormDefinition
#399
Conversation
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.
Looks good, I suggest one small change
map.load() | ||
val layer = map.operationalLayers.firstOrNull { | ||
if (it is FeatureLayer) { | ||
it.load() |
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 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.
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.
@sorenoid It seems like the layer needs to be loaded at this time. I can update this when that changes.
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.
based on the featureFormDefinition's availability before layer loading, approved.
thanks @sorenoid |
Summary of changes
FeatureLayer
s contains aFeatureFormDefinition
. If none exists, an alert dialog is shown informing the user.