Reputation: 271
I have a variety of JavaScript Google Maps, which I would like to be embedded into a C# WPF windows application. I've seen multiple different ways of doing so online, but they all use outdated and broken methods. Is there any way of easily achieving this currently?
If not is there any other easy and well document map which can be displayed inside a C# WPF application. I need to be able to plot markers, draw map lines, calculate routes, most features the Google Maps API delivers.
Eg Outdated: embed google map in wpf control
Upvotes: 2
Views: 3303
Reputation: 271
The solution is to use a WebBrowser control, it is important to insert the following HTML code into the HTML file, otherwise you will get an error stating "You are using a browser that is not supported by the Google Maps JavaScript API. Consider changing your browser." So also doesn't appear to work"
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
This should be inserted in the head of the HTML. For more on WebBrowsers view here. Hope this helps someone else out.
Upvotes: 2