我正在使用WebBrowser显示谷歌地图,这不是我想要的。我想只显示地图,也许还有一些标记...而不是我表格中的浏览器版本.. 这是我做的:
private void button1_Click(object sender, EventArgs e)
{
string street = textBox1.Text;
string city = textBox2.Text;
string state = textBox3.Text;
try
{
StringBuilder queryaddress = new StringBuilder();
queryaddress.Append("https://maps.google.com/maps?q=");
if (street != string.Empty)
{
queryaddress.Append(street + ",+");
}
if (city != string.Empty)
{
queryaddress.Append(city + ",+");
}
if (state != string.Empty)
{
queryaddress.Append(state + ",+");
}
webBrowser1.Navigate(queryaddress.ToString());
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString(), "Error");
}
}
另外......如何在这个版本的地图上放置标记?