gpt4 book ai didi

c# - 一个工作的 GMap.NET 应用程序源

转载 作者:太空宇宙 更新时间:2023-11-03 18:13:23 31 4
gpt4 key购买 nike

关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。












想改进这个问题?将问题更新为 on-topic对于堆栈溢出。

6年前关闭。




Improve this question




我第一次使用 GMap,但我的 map 不会显示...我正在寻找一个工作的 c# 应用程序源。你能帮助我吗?

注意:我已经下载了thisthis来自 http://greatmaps.codeplex.com 的文件,但它们只是应用程序,不包括源...

谢谢。

最佳答案

这是带有 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;
}
}
}

关于c# - 一个工作的 GMap.NET 应用程序源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10547147/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com