Reputation: 63
We have been using Google Maps APi for 10 years via a WebBrowser control within our Windows Forms (.NET) software. Customers tell us that it no longer works.
We understand that the .NET WebBrowser control uses Internet Explorer and cannot be changed. We have already tried to insert the following tag, but it doesn't work.
<meta http-equiv = "X-UA-Compatible" content = "IE = edge" />
We also tried using the FEATURE_BROWSER_EMULATION registry keys, but it doesn't work. https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/ee330730(v=vs.85)?redirectedfrom=MSDN#browser-emulation
Is there still a way to use the Google Maps API within a .NET Windows Form?
Thanks for any help
Upvotes: 0
Views: 1841
Reputation: 551
You can replace the browser control. I'm using CefSharp which is based on Chromium. Microsoft offers WebView2 which is based on its Edge Browser.
Both have a different interface than the old IE based web control and therefore require some changes to your code. How much you need to change depends on what else you do besides navigating to a Google Maps page.
Neither of the two is preinstalled on user's computers. You therefore need to add them to your application setup.
Upvotes: 3