Skip to content
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

[Fix] "false" utility network load problem #259

Merged
merged 2 commits into from
Sep 7, 2023
Merged

Conversation

yo1995
Copy link
Collaborator

@yo1995 yo1995 commented Aug 23, 2023

Description

This PR fixes an issue in the Trace utility network sample.

In the original PR, when the sample opens, a computed property private var network: UtilityNetwork? { map.utilityNetworks.first } tries to get the first utility network from the web map. However, because the web map is not explicitly loaded, network can become nil occasionally, depending on the load timing of the map.

This leads to the problem in 4401 where the network?.makeElement(arcGISFeature: feature) call silently fails. A status message was added in #248 to show the error.

After discussing with Jen, both the web map and the network need to be loaded. Only loading the map is not enough; only loading the network doesn't guarantee the map to be present either. Once the map is loaded, we can safely assume the utility network's description is available.

Linked Issue(s)

How To Test

  • On v.next, sometimes you cannot add element to the utility network
  • With the fixes on this branch, the sample is correct

@dg0yal
Copy link
Member

dg0yal commented Sep 7, 2023

let's get this moving

Copy link

@saratchandrakarumuri saratchandrakarumuri left a comment

Choose a reason for hiding this comment

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

Tested this multiple times with the fix and identify is working as expected on UN.

Copy link

@saratchandrakarumuri saratchandrakarumuri left a comment

Choose a reason for hiding this comment

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

Tested this multiple times with the fix and identify is working as expected on UN.

@yo1995 yo1995 merged commit ff79adc into v.next Sep 7, 2023
1 check passed
@yo1995 yo1995 deleted the Ting/Fix-TUNLoad branch September 7, 2023 16:07
@yo1995
Copy link
Collaborator Author

yo1995 commented Sep 7, 2023

Thank you!

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.

None yet

4 participants