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

Maps on Windows fails with "Handler not found" #19040

Closed
david-maw opened this issue Nov 27, 2023 · 3 comments
Closed

Maps on Windows fails with "Handler not found" #19040

david-maw opened this issue Nov 27, 2023 · 3 comments
Labels
area-controls-map Map / Maps platform/windows 🪟 t/bug Something isn't working

Comments

@david-maw
Copy link

Description

I'm new to Maps and so tried to run the sample program and also create a simple test. My test works fine on Android but on Windows it fails with "Handler not found for view Microsoft.Maui.Controls.Maps.Map".

I tried using VS 17.9 preview 1 on two systems running Windows 10 and 11 with the same result. Given that the Android version seems to work fine I'm not sure what to make of it, Is there some additional step needed on Windows?

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows 10 and 11

Did you find any workaround?

No response

Relevant log output

No response

@david-maw david-maw added the t/bug Something isn't working label Nov 27, 2023
@drasticactions
Copy link
Contributor

https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/map?view=net-maui-8.0

The Map control isn't supported on Windows due to lack of a map control in WinUI. However, the CommunityToolkit.Maui.Maps NuGet package provides access to Bing Maps through a WebView on Windows. For more information, see Get started.

That error message could probably be better handled to point to this doc, IMO. But yeah, it's currently not supported. But you should be able to use the CommunityToolkit version.

@jfversluis
Copy link
Member

WinUI has announced that they will implement a map control, when they do, we can implement it in .NET MAUI directly!

I've opened a PR to make the exception a bit more clear. If we take that, it should help prevent this question, if we decide to not want the PR there is nothing much else we can do right now. So either way, closing this one.

Thanks!

@jfversluis jfversluis closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2023
@david-maw
Copy link
Author

Thanks @jfversluis and @drasticactions, that documentation is pretty clear, unfortunately I started in the middle, from an interesting blog post then didn't read carefully enough, so thanks for not just saying RTFM! I agree that a somewhat better failure mode would be nice (maybe a fake handler that just throws a "not implemented" exception), Bottom line is that it doesn't work for non-mysterious reasons and since my primary target is android anyway, I can easily fall back to the community toolkit map control on Windows until such time as the Windows Map control is implemented.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-map Map / Maps platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants