Select to view content in your preferred language

.NET MAUI, Android: Map is not shown when navigated back to map-page

5576
22
Jump to solution
06-27-2023 10:34 AM
SokoFromNZ
Regular Contributor

Hi,

Since day one I have basically the same issue as described here: https://community.esri.com/t5/net-maps-sdk-questions/net-maui-map-not-loading-for-the-second-time/m-...

The issue persits on Android (emulator and real device). On Windows it is OK. iOS I cannot test.

See the attached example solution for your convenience (I'm using latest VS v17.6.4). 

Please provide a valid license and Apikey in MauiProgram.cs before starting...

The app starts like this:

SokoFromNZ_0-1687886895825.png

 

Then use the lower tab buttons to switch to the "Note" page:

SokoFromNZ_1-1687886922979.png

 

Switching back to the "Map" page shows the watermark, but now map:

SokoFromNZ_3-1687886971583.png

 

If you just move the finger on the "empty" map, it appears again.

 

I reckon it is a Maui bug...as most of the issues we are having 😞

But I haven't found any workaround yet and my customer gets really annoyed by this bug now as it is in our app since day one and Maui does not seem to improve.

Would be great if you can give me a little insight on this behaviour and maybe let me know a workaround.

Thanks

Soko

0 Kudos
22 Replies
SokoFromNZ
Regular Contributor

"...people seemed to rely on wrong behavior..." is a veery nice way to say "...people spent days to find workaround for bugs that shouldn't be there and with .NET8 those workarounds cause troubles...".

In my .NET MAUI app (Android only) for example do the separator-lines in the flyout work no-more and the highlighting of the submenu (menu on the bottom) does not work for the icons. Just to name a two of the issues with upgrading to .NET8.

But I'm with you: I hope MAUI gets better and more bug-free over time and it will be as stable as WPF (one day)

Thanks for your support here, highly appreciated.

0 Kudos
dotMorten_esri
Esri Notable Contributor

> "...people seemed to rely on wrong behavior..." is a veery nice way to say "...people spent days to find workaround for bugs that shouldn't be there and with .NET8 those workarounds cause troubles...".

Yup that's fair but maintaining broken behavior for the foreseeable future probably isn't the right thing to do either. At least with .NET 8, it'll be easier to just pick specific versions of the MAUI controls, and not be as tied to the workload as was the case before. So you can choose when to get the bugfixes, or when to stay on older versions.

0 Kudos
SokoFromNZ
Regular Contributor

@dotMorten_esri : While re-testing this bug with the latest versions of all I've found a _severe_ bug which I'd like to draw your attention to!

I've found the blank map is fixed  => your original workaround is not needed anymore. Although with active GPS the fatal crash above is still a no-go. 
To not stretch this bug too far lets continue on the new one and treat this one as closed

0 Kudos