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

Question: When is MapControl coming to WinUI 3.x? #3024

Closed
Tracked by #12694
robloo opened this issue Jul 31, 2020 · 55 comments
Closed
Tracked by #12694

Question: When is MapControl coming to WinUI 3.x? #3024

robloo opened this issue Jul 31, 2020 · 55 comments
Labels
feature proposal New feature proposal needs-triage Issue needs to be triaged by the area owners product-winui3 WinUI 3 issues question team-Controls Issue for the Controls team

Comments

@robloo
Copy link
Contributor

robloo commented Jul 31, 2020

I have an app that depends on MapControl which isn't currently supported by WinUI 3.0. When might I expect that
to be added?

WinUI 3.0 Preview 2 lists MapControl as a missing platform feature with no timeline given.
https://docs.microsoft.com/en-us/windows/apps/winui/winui3/#missing-platform-features

I don't even need all the advanced functionality -- just something that shows a 2D map and allows pins to be added.

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Jul 31, 2020
@robloo
Copy link
Contributor Author

robloo commented Aug 1, 2020

Adding @YuliKl who seems to be assigned MapControl-related issues.

@StephenLPeters StephenLPeters added product-winui3 WinUI 3 issues and removed needs-triage Issue needs to be triaged by the area owners labels Aug 3, 2020
@robloo
Copy link
Contributor Author

robloo commented Aug 21, 2020

@YuliKl Any news on this?

@robloo
Copy link
Contributor Author

robloo commented Sep 20, 2020

@YuliKl @StephenLPeters Any updates on this? This is going to end up being a show stopper for me using winUI 3. It's pretty important this gets on a roadmap so plans can be made one way or another.

@StephenLPeters
Copy link
Contributor

@Austin-Lamb or @MikeHillberg ?

@robloo
Copy link
Contributor Author

robloo commented Nov 15, 2020

On the latest roadmap this is considered a stretch goal even after 3.0 release. I'm guessing that means this control might not get updated for years -- if ever. What is the alternative? I could use Bing maps hosted in WebView2 if only it was possible to put pins on the map. Bing doesn't support that though. Can we get that team involved and come up with something at least in the interim?

@p2pbsh
Copy link

p2pbsh commented Nov 19, 2020

Bump on this one. The MapControl is pretty much the centrepiece of my UWP app, seeing it listed as stretch goal of 3.x is slightly ominous in regards of me being able to adopt WinUI. Could someone please elaborate with some more concrete info on the plans for MapControl please?

@robloo robloo changed the title Question: When is MapControl coming to WinUI 3.0 Previews? Question: When is MapControl coming to WinUI 3.x? Nov 19, 2020
@ryandemopoulos
Copy link
Member

Hey @robloo, we don't have a specific timeframe for a Map control, but I suspect it will be a while. We tried to indicate this in our public feature roadmap (see the last row in the table at the bottom of the page). I could see us adding it in a 3.x point release after 3.0 ships, but I doubt it would be 3.1 or 3.2, which very likely will be focused on other things like Acrylic, XAML Islands, more WPF parity functionality, tooling innovation, and broadening the set of Windows devices we run on.

While that's definitely no the answer you're looking for, WinUI 2 will continue to be maintained and invested-in so using a system XAML/WinUI 2-powered stack would provide that for you. Or, since WinUI 3 will offer a lot of hosting flexibility given it's coming interoperability with HWNDs, perhaps there could be other 3rd party options to power a map experience. Not sure if those alternatives could work for you until we get to a MapControl.

@robloo
Copy link
Contributor Author

robloo commented Nov 20, 2020

@ryandemopoulos Thanks for your response. I do realize it was added to the roadmap some months ago and the latest comments reflect that. You are correct that that's not the answer I was hoping for but it was basically what I was expecting at this point. You have got to understand how difficult of a place you are putting UWP developers in. I'm now locked out of .net 5, c#9 and WinUI3 for 1-2 years without major rewrites to the app. UWP developers, who invested in Microsofts latest technology, are getting burned in several ways here.

I guess you have made your WinUI decisions knowing full well it would have some negative impact to those heavily invested in UWP. You made that decision based on UWP usage numbers most likely. Still, I think something should have been done to keep UWP developers from being impacted in this way. They are really the most loyal developers - or those most heavily invested in the tech becoming WinUI3 at this point.

Reguardless, I have no choice but to pursue rewrites for the MapControl and other missing functionality in WinUI3. I appreciate at least being able to firmly plan on that now.

Its also great you are focusing on closing the feature gap with WPF. Wish it was done 2-3 years ago but better late than never.

Keep up the good work with WinUI3. Its unfortunate I'm in the position I am but overall it will be beneficial to Windows. Hoping a lot of the decisions you are making are also to update the shell and Microsoft's legacy apps.

@mdtauk
Copy link
Contributor

mdtauk commented Nov 20, 2020

You do have to wonder if it would not be better, easier, and more futureproof, to perhaps transition away from a MapControl, and instead offer a WebView/WebView2 implementation, so future updates can come online. And who knows, maybe even enable Apple Maps and Google Maps support at some point by having a ServiceProvider API

@p2pbsh
Copy link

p2pbsh commented Nov 20, 2020

@ryandemopoulos Thanks for the update. Much like @robloo it's a frustrating time to be a UWP developer, seeing the platform placed on the back burner having committed to it. What I would personally like to see if feasible would be an update of the roadmap that offers clear milestones with migration paths for UWP developers. For example:

  • 3.abc - WinUI xaml feature parity with current UWP platform, UWP desktop apps can now be ported to .NET desktop

I'm not particularly bothered by MS deciding to pull the plug on UWP which appears to be the case, makes sense in a lot of ways, just want to be confident the pathway exists to move my work to a WinUI based framework and have an approximate idea of timescales so I can plan ahead accordingly. I'd argue that a complete 'escape route' for UWP devs should really be in place by the time .NET6 drops.

@leoniDEV
Copy link

@mdtauk But for example with MapControl you can leverage offline maps!

@robloo
Copy link
Contributor Author

robloo commented Nov 20, 2020

@mdtauk I looked into using a map within webview already. The issue is the APIs dont support really anything. MapControl has a lot of advanced functionality to draw on the map. I only need push pin support in my case; however, I can't even place multiple pins with any online maps provider and control the zoom level. Best I can do with tricks is to place a single pin. No offline support is unfortunate as well but would be tolerable if anything else worked.

MapControls are expensive to implement primarily due to the data. Even using OpenStreetMaps you have to pay for rendered tile server data. Otherwise, adding this functionality, and storage capacity to your company's existing servers is not cheap.

@robloo
Copy link
Contributor Author

robloo commented Nov 20, 2020

It anyone knows of some fancy math or techniques that could be used to calculate the geographical position coordinates of the pixels in a Google or Bing maps there are some ideas. It might be possible to write a new control using a layered technique and manually drawing on top of a webview2 containing the map on the bottom layer. Keeping things positional synronized during movement would also be difficult though. Recalculation when the underlying map changed projection modes would be nearly impossible I suspect.

@mdtauk
Copy link
Contributor

mdtauk commented Nov 20, 2020

It anyone knows of some fancy math or techniques that could be used to calculate the geographical position coordinates of the pixels in a Google or Bing maps there are some ideas. It might be possible to write a new control using a layered technique and manually drawing on top of a webview2 containing the map on the bottom layer. Keeping things positional synronized during movement would also be difficult though. Recalculation when the underlying map changed projection modes would be nearly impossible I suspect.

If Microsoft were to go the wrapped WebView approach with a future Map Control - it would need to have Offline data support, as well as supporting the drawing of polygons on-top of the map layers. It would also need to be hardware accelerated.

Chromium can do all this, using PWA tech AFAIK.

@robloo
Copy link
Contributor Author

robloo commented Dec 4, 2020

The link below seems to be the best control available for replacement. However, I don't think it's simple to use without a paid map provider. It does support some offline tile data formats though.

https://github.com/Mapsui/Mapsui
https://mapsui.com/documentation/getting-started-wpf.html (UWP is the same)

@Mogikan
Copy link

Mogikan commented Jan 18, 2021

I haven't thought WinUI 3.0 could be incompatible with existing UWP app. Please provide controls which were available in UWP. It is a bad tone to decide to throw away controls! This is a really a blocker problem for me to start migration to the new platform.

@wjax
Copy link

wjax commented Jan 21, 2021

I have tumbled here because I wanted to evaluate porting my WPF app to WinUI. I wanted to use the great Map Control from UWP... Seems there is no chance and I will keep using my old but bullet proof WPF Win32 apps.

@venklar
Copy link

venklar commented Mar 12, 2021

I second all of the above: Map Control is required ASAP!
I work on GIS and for me the lack of a Map control is a blocker to addapting WinUI 3.

Not sure but I think using Uno Platform it's possible to use both WinUI and UWP Map Control?... Still not prod ready though :(

@ryandemopoulos is there a way for devs to vote on roadmap features? Thanks

@krschau krschau added the feature proposal New feature proposal label Jul 28, 2021
@nesherhh
Copy link

I have ported XAML Islands to .NET 5. It is possible to use MapControl in .NET 5/6.
https://github.com/nesherhh/XamlIslandsNET5

@wjax
Copy link

wjax commented Oct 20, 2021 via email

@robloo
Copy link
Contributor Author

robloo commented Oct 20, 2021

@nesherhh Very interesting and a good solution. This might be a great idea to unblock some WinUI 3 ports.

@Mogikan
Copy link

Mogikan commented May 28, 2022

Hi, I see that MapControl disappeared from Roadmap. What does it mean? Is it supported in WinUI 3.0 or it will never be implemented?
https://github.com/microsoft/microsoft-ui-xaml/blob/main/docs/roadmap.md

@mfeingol
Copy link

So is it fair to say at this point that WinUI will not get a native MapControl for the foreseeable future?

@p2pbsh
Copy link

p2pbsh commented Mar 12, 2023

They discussed it in the last WinUI community call, sounded like they still want to do it, but I wouldn't expect seeing it anytime soon.

@TFreudi1
Copy link

The missing map control in WinUI3 blocks me from porting Xamarin App's to NET. MAUI !

@Panda-Sharp
Copy link

Panda-Sharp commented Mar 13, 2023

The missing map control in WinUI3 blocks me from porting Xamarin App's to NET. MAUI !

this...and Ink Canvas Control for us

@robloo
Copy link
Contributor Author

robloo commented Jul 19, 2023

This is still valid for a lot of people. Windows Community toolkit had to end up wrapping a web control. And we also have Mapsui. But the WinUI team needs to make a decision and report finally if this control will ever come.

@mfeingol
Copy link

mfeingol commented Jul 19, 2023

This is still valid for a lot of people. Windows Community toolkit had to end up wrapping a web control. And we also have Mapsui. But the WinUI team needs to make a decision and report finally if this control will ever come.

Agreed. MapsUI is missing functionality like 3D rendering that make up key use cases in our UWP apps. It's frustrating to not have any signs of life on this topic.

@Panda-Sharp
Copy link

This is still valid for a lot of people. Windows Community toolkit had to end up wrapping a web control. And we also have Mapsui. But the WinUI team needs to make a decision and report finally if this control will ever come.

Agreed. MapsUI is missing functionality like 3D rendering that make up key use cases in our UWP apps. It's frustrating to not have any signs of life on this topic.

It's frustrating the sign of life of winui in general 😓

@bpulliam bpulliam added the team-Controls Issue for the Controls team label Aug 8, 2023
@bricelam
Copy link

bricelam commented Aug 8, 2023

#6293 (comment) gave me a bit of hope. I don't pretend to know how this control would actually be implemented, but hosting the UWP map control inside a XAML island was how they had it working in WinForms and WPF for .NET Core 3. Sadly, .NET Core 3 is out of support and XAML islands stopped working in the next version of .NET.

@rmarinho
Copy link
Member

rmarinho commented Sep 1, 2023

So on MAUI we added to the toolkit a WinUI Map that is a wrapper on a WebPage with bing maps. So if anyone wants to grab some inspiration how to map from c# to javascript and back .. for some basic stuff.

https://github.com/CommunityToolkit/Maui/blob/main/src/CommunityToolkit.Maui.Maps/Handler/Map/MapHandler.Windows.cs

@duncanmacmichael
Copy link
Member

Closing this question as the Maps Control is on track to be delivered in the WinAppSDK 1.5, per the currently posted roadmap:

https://github.com/microsoft/WindowsAppSDK/blob/main/docs/roadmap.md

For any questions about the new maps control or suggestions when it arrives, please feel free to open a new issue. Thanks!

@robloo
Copy link
Contributor Author

robloo commented Dec 9, 2023

I'm surprised this is coming, even if much later than it was needed. Great work on this!

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Dec 9, 2023
@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Dec 11, 2023
@hez2010
Copy link

hez2010 commented Feb 7, 2024

Closing this question as the Maps Control is on track to be delivered in the WinAppSDK 1.5, per the currently posted roadmap:

microsoft/WindowsAppSDK@main/docs/roadmap.md

For any questions about the new maps control or suggestions when it arrives, please feel free to open a new issue. Thanks!

@duncanmacmichael Please don't ship the WebView based MapControl, what we expect is a native MapControl just like the one in UWP. And we expect the MapControl to work even if there's no Internet access so that we can still use the offline map data which has been downloaded in advance.
Otherwise I can't figure out any reason for not using the native MapControl through UWP XAML Island. The WebView based MapControl is completely useless, we can already do this by using the WebView directly and it's not even necessary to be a control.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Feb 7, 2024
@moshegutman
Copy link

Please don't ship a non-native control. The Azure Maps base map doesn't come close to the Bing Maps base map. Also, for those of us using the UWP control under a Bing Maps Enterprise Agreement, I don't see how this new control could possibly fulfill the contractual obligations of that agreement.

@mfeingol
Copy link

mfeingol commented Feb 7, 2024

@hez2010: two question:

  1. Why do we think it won't be a native MapControl?
  2. How exactly would one use the UWP MapControl in a WinUI app? Last I checked that project doesn't work beyond .NET 5...

@tipa
Copy link
Contributor

tipa commented Feb 7, 2024

  1. Why do we think it won't be a native MapControl?

https://github.com/microsoft/microsoft-ui-xaml/blob/winui3/release/1.5-stable/controls/dev/MapControl/MapControl.xaml

I agree that a WebView map control just won't do it. I haven't tested it myself but I have a very, very strong feeling that it will be lacking a lot of features compared to the UWP MapControl (e.g. binding a collection that renders XAML on the map) and also performance will be subpar

@mfeingol
Copy link

mfeingol commented Feb 7, 2024

Thanks, @tipa. Looking at the IDL, the API looks extremely basic:

https://github.com/microsoft/microsoft-ui-xaml/blob/winui3/release/1.5-stable/controls/dev/MapControl/MapControl.idl

A deal-breaker for me would be the inability to render MapTileSources. This doesn't bode well...

@nesherhh
Copy link

nesherhh commented Feb 7, 2024

I need pitch, heading and offline functionality. Also traffic and itenary overlays.

Web control can do only 45 or 90 degrees rotation and no offline mode.

I don't understand why they don't build native control. They do have source code for UWP version. How complicated could it be to migrate it to WinUI?

@mfeingol
Copy link

mfeingol commented Feb 7, 2024

Well, I poked around 1.5.240205001-preview1 for a few minutes. It's worse than I expected.

I was unable to get MapControl working beyond a blue Azure screen, despite trying several different Azure/Bing Maps API keys. So I can't comment on how things look or what sorts of controls are in the HTML/JS.

API surface area-wise, it's a complete disaster. I'm not even sure how the Maui folks will implement their relatively limited surface area.

MapTileSource is gone, so no custom tiles are possible.

MapStyle is gone. No way to programmatically select map type.

There's a MapLayer property that does something, but it's unclear how to use it. There's a MapElementsLayer subclass of MapLayer which appears to hold MapElements instead of the usual MapElements property, so at least you can do that.

But MapPolyline and MapPolygon are gone. MapIcon is still alive but has no Title, Image, ZIndex, NormalizedAnchorPoint or anything hinting at customization.

The Children property is also gone, so no XAML elements can be used. Unsurprisingly.

MapRouteView is gone.

CenterChanged and ZoomLevelChanged are gone. MapElementPointerEntered and MapElementPointerExited are gone. FindMapElementsAtOffset, GetVisibleRegion and TrySetViewBoundsAsync are all gone. Good luck actually using this MapControl for anything sophisticated.

Lastly, ColorScheme and MapProjection are gone. ZoomInteractionMode, TiltInteractionMode, PanInteractionMode and RotateInteractionMode are also gone.

And this is just the surface area my app uses. At current course and speed, WinUI is no longer a viable platform for me and I will need to look at third party offerings.

@tipa
Copy link
Contributor

tipa commented Feb 7, 2024

@mfeingol Thanks for testing & reporting.
What a joke... I won't even care creating feature requests for these missing (and essential) features, Microsoft obviously has no interest in providing a usable mapping control

@mfeingol
Copy link

mfeingol commented Feb 7, 2024

I'd be curious to see if someone can figure out how to get it working at least... i.e. which MapServiceToken it will accept.

Beyond that... it's Preview 1, the core JS control clearly has more capabilities, those might light up in future previews... But I'm already sensing that this won't be able to fully replace UWP MapControl for my uses.

MapsUI seems like the most advanced third party control, staying within WinUI. Unfortunately it's missing the nice 3D views that more advanced controls have. That will be a big loss for my scenarios.

@dotMorten
Copy link
Contributor

@mfeingol just to toot my own horn: Esri.ArcGISRuntime.WinUI fully supports both 2D and 3D maps and is using native directx rendering into WinUI's swapchain. I realize it might be overkill for your needs, but it'll do what the UWP control you used did and then some.

@mfeingol
Copy link

@dotMorten: I hadn't realized there was a free beer license for Esri's map control, so that merits further exploration. It looks like there's lot of functionality in there!

One thing I don't love, a priori, is the distinction between Maps and Scenes. A really nice feature of the UWP control is the seamless transition between 2D and 3D views fed by elevation data. Can this control do something similar?

@dotMorten
Copy link
Contributor

@mfeingol let's take this outside here. Ping me on twitter, discord, etc on this username and I'll be happy to help out (this goes for everyone)

@dotMorten
Copy link
Contributor

@mfeingol btw the blue screen issue is reported here: #9324 This issue seems to still exist in final v1.5 too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature proposal New feature proposal needs-triage Issue needs to be triaged by the area owners product-winui3 WinUI 3 issues question team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests