-
Notifications
You must be signed in to change notification settings - Fork 128
Bugfix: Fixing bug with EnableDefaultWorldGeocode value not being honored in MAUI #655
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
Bugfix: Fixing bug with EnableDefaultWorldGeocode value not being honored in MAUI #655
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.
Is this issue only present in .NET MAUI? Will WPF/WinUI/UWP not have the same issue?
Removed the unsubscribe line from `SearchView_Loaded`. Added a check in `HandleViewpointChanged` to ensure the view is loaded before executing logic.
I tested the behavior with WinUI, WPF and and UWP and seems that it is working as expected. It is only bug with MAUI. |
I thought you said it was because WinUI/WPF/UWP test app was using a view model in the sample that avoided hitting the problem, not that it wasn't a problem? |
I was mentioning about this. |
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 was able to set EnableDefaultWorldGeocoder to "false" in XAML or in code, and the control honored it by not sending any arcgis.com requests 👍
- Changed `_loadTask` in `LocatorSearchSource` to `Lazy<Task>` for lazy initialization. - Modified `WorldGeocoderSearchSource` to use `Lazy<Task>` for `_additionalLoadTask`.
src/Toolkit/Toolkit/UI/Controls/SearchView/LocatorSearchSource.cs
Outdated
Show resolved
Hide resolved
src/Toolkit/Toolkit/UI/Controls/SearchView/LocatorSearchSource.cs
Outdated
Show resolved
Hide resolved
- Updated LocatorSearchSource to implement INotifyPropertyChanged, introducing a new display name management system. - - Removed the _additionalLoadTask from WorldGeocoderSearchSource, simplifying the loading process to rely only on LoadTask.
- Modified logic to ensure `_displayName` is set to an empty string if both `Name` and `Description` are unavailable, preventing potential null states. - Added `ProeprtyChanged` Event for DisplayName When Refresh happens.
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, except the default fallback to string.empty seem wrong?
Uh oh!
There was an error while loading. Please reload this page.