since some days google earth is directly available via browsers like edge or internetexplorer. However, if a create a Webbrowser control in wpf and navigate to google.com/maps and click on "satellite view", the website tells me, that google earth view is not available for me.
Compare both views:
Images can be found here:
http://wb20.stedum-bekum.de/wp-content/uploads/2017/10/Webbrowser.png
http://wb20.stedum-bekum.de/wp-content/uploads/2017/10/IE.png
*the yellow rectangle sais: 3d View not available
In my code i set User Agent manuelly and update it via urlmon in the navigating event.
webbrowser.Navigate(new Uri("https://google.de/maps"), null, null, "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv: 11.0) like Gecko \r\n");
and
[DllImport("urlmon.dll", CharSet = CharSet.Ansi)]
private static extern int UrlMkSetSessionOption(
int dwOption, string pBuffer, int dwBufferLength, int dwReserved);
const int URLMON_OPTION_USERAGENT = 0x10000001;
const int URLMON_OPTION_USERAGENT_REFRESH = 0x10000002;
public void ChangeUserAgent(string agent)
{
UrlMkSetSessionOption(URLMON_OPTION_USERAGENT_REFRESH, null, 0, 0);
UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, agent, agent.Length, 0);
}
and i also changed webbrowser to behave like ie via FEATURE_BROWSER_EMULATION
does anybody have an idea how to use it in webbrowser?
I also tried dotnetbrowser to integrate. This worked for some days, but now i get the same message.
I also tried firefox, edge and chrome (outside of my code), they are all working fine like IE.