问题描述
大家好
我想做一个Windows应用程序,在其中我在textBoxes中输入r的纬度经度.我有一个webbrouser工具可以在我的应用程序上显示它.我在互联网上看到它们都对Web应用程序提供了建议,但我需要使用C#在Windows应用程序中实现.因此,任何人都可以向我建议一些代码或链接.
谢谢你提前
Arun
hello guys
I want to do a windows application where i enter the latitude longitude that r in textBoxes . I m having a webbrouser tool to display it on my application . I saw in internet they all give suggestions on web application but i need to implement in on windows application using C# . So can any body suggest me some code or link.
Thanks with advance
Arun
推荐答案
private void button1_Click(object sender, EventArgs e)
{
webBrowser1.Navigate("http://maps.googleapis.com/maps/api/staticmap?center=" + textBox1.Text + "," + textBox2.Text+"&zoom=14&size=400x400&sensor=false");
}
例如.在textbox1中,键入51,在textbox2中,键入0(即零),然后按按钮导航到该位置.该示例将显示伦敦地图.地图中的缩放级别也可以根据您的选择进行更改.
上面的示例将显示静态地图,但是希望您得到了想要的东西. :)
Eg. In textbox1 type 51, in textbox2 type 0 (i.e zero), and then press the button to navigate to that location. The example will show London map. The zoom level in the map can also be changed according to your choice.
The above example will show static maps, but I hope you got what you wanted. :)
这篇关于在Winforms中使用Google Map API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!