[Proposal] Windows Map handler based on WebView
See original GitHub issueWindows Map handler
- Proposed
- Prototype: Started
- Implementation: Started
- iOS Support
- Android Support
- macOS Support
- Windows Support
- Unit Tests: Not Started
- Sample: Not Started
- Documentation: Not Started
Link to Discussion
Summary
We have released the Map view on MAUI .net7, unfortunately there was no Windows handler since WinUI doesn’t have a MapControl yet, this proposal closes the gap on Windows by providing a Map handler based on WebView and the Bing Maps SDK. This was discussed internally on the .NET MAUI team, and decided to provide this on the Toolkit and to on MAUI itself.
Motivation
Enabling users to have a cross platform implementation of Maps
Detailed Design
Using a WebView2 control to load a local HTML page that renders the Bing Maps control, and add javascript interop to map MAUI Map properties to the Web Bing maps control.
Usage Syntax
XAML Usage
None
C# Usage
MauiApp.CreateBuilder().UseMauiCommunityToolkitMaps("key")
Drawbacks
The drawback is this will be removed in the future when WinUI team provides the MapControl.
Alternatives
Unresolved Questions
Issue Analytics
- State:
- Created a year ago
- Reactions:5
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Taking the new Chromium WebView2 Control for a Spin in .NET
This is Part 1 of a two part article that gives an overview of the new WebView2 Web browser control that is based...
Read more >WebView | Android Developers
Build apps that give your users seamless experiences from phones to tablets, watches, and more. ... Learn to build for your use case...
Read more >WebView control for Windows Forms and WPF
The WebView control shows web content in your Windows Forms or WPF desktop application. This is one of several wrapped Universal Windows ......
Read more >Using the TomTom Maps Web SDK in a NativeScript ...
Next, we add a buttonPressHandler function to change the map's center coordinates in the WebView based on the coordinates entered in our ...
Read more >Android WebView Example Tutorial
Android WebView is used to display HTML in an android app. We can use android WebView to load HTML page into android app....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@VladislavAntonyuk this would live in the Community Toolkit until we have a proper solution for WinUI , and then we would obsolete and drop it from the Community Toolkit. We talked internally and this was the best decision as we don’t want to put it on MAUI repo for now. This would be shipped on the toolkit on a 7.0 version.
What performance issue? tbh I run the sample and I don’t see any big performance issues compared with other platforms. Also the implementation uses device capabilities like gps to get user location etc. |
@jfversluis @brminnick can someone help me figure if this can go in our not? who makes the decision? if it can’t be here I will publish this somewhere else.
Thanks