user1123849
user1123849

Reputation: 21

Load google map failed

In my a c# program, I want to load a google map which is a html file stored in my local disk but it failed.It says that the application have something wrong with internet connection. Here is my screenshot and some code

  private void 加载地图ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //webBrowser1.Navigate("D:/GoogleMap/GoogleMap.html");
            webBrowser1.Navigate("D:/exercise/源代码/windows监控端/TestGoogleMapGps/TestGoogleMapGps/GoogleMap.html");
        }

Upvotes: 0

Views: 116

Answers (1)

Jack Marchetti
Jack Marchetti

Reputation: 15754

Well normally your local machine uses the backslash, not the forward slash, so try:

webBrowser1.Navigate(@"D:\GoogleMap\GoogleMap.html");
webBrowser1.Navigate(@"D:\exercise\源代码\windows监控端\TestGoogleMapGps\TestGoogleMapGps\GoogleMap.html");

Although, I'm not entirely sure that's the solution you're going for.

Upvotes: 1

Related Questions