Google Maps Stops Working

Created: February 23, 2015 Tagged As: HTML, JavaScript Share:

I have some Google Maps code embedded in a Windows Forms app I have written for a client. The code runs using a WebBrowser control embedded within the native Windows application. This is cool since to the user, it appear as if Google Maps is just another window in their app, and not a separate web process.

Unfortunately, the WebBrowser control uses Internet Explorer by default in its lowest compatibility settings, which basically makes it act like IE8. And Google recently dropped support for IE8 and other "legacy" browsers.

What to do? The answer is surprisingly simple - all you need to do is add one line of code to the HEAD tag of the HTML that is part of your Google Maps code:

<meta http-equiv="X-UA-Compatible" content="IE=edge"> 
This enables the WebBrowser control to utilize Internet Explorer in its native and current form (assuming a current version is installed on the system).

One line of code and the problem is fixed. Unfortunately, it took me over an hour to find the solution, so hopefully you read this and avoid the same issue.