我第一次使用GMap,但我的地圖不會顯示...我正在尋找一個工作的C#應用程序源。你可以幫我嗎?工作GMap.NET應用程序源
注:我已經下載this和http://greatmaps.codeplex.comthis文件,但它們只是應用程序,並沒有包括源...
感謝。
我第一次使用GMap,但我的地圖不會顯示...我正在尋找一個工作的C#應用程序源。你可以幫我嗎?工作GMap.NET應用程序源
注:我已經下載this和http://greatmaps.codeplex.comthis文件,但它們只是應用程序,並沒有包括源...
感謝。
這是gMapControl1
的形式就可以了。將Gmap.NET.Core
和Gmap.NET.WindowsForms
的參考添加到您的項目中。
using System;
using System.Windows.Forms;
using GMap.NET.MapProviders;
using GMap.NET;
namespace gmap
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
//use google provider
gMapControl1.MapProvider = GoogleMapProvider.Instance;
//get tiles from server only
gMapControl1.Manager.Mode = AccessMode.ServerOnly;
//not use proxy
GMapProvider.WebProxy = null;
//center map on moscow
gMapControl1.Position = new PointLatLng(55.755786121111, 37.617633343333);
//zoom min/max; default both = 2
gMapControl1.MinZoom = 1;
gMapControl1.MaxZoom = 20;
//set zoom
gMapControl1.Zoom = 10;
}
}
}
greatmaps.net是CodePlex上,因此具有可來源:http://greatmaps.codeplex.com/SourceControl/list/changesets# –
這裏是一個初學者對GMap.NET教程Windows窗體:HTTP: //bit.ly/12RyRT3 –