BMap.NET.WindowsForm/MapDownloadDialog.cs
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using BMap.NET.HTTPService;
using System;
using System.Collections;
using System.Drawing;
using System.IO;
using System.Threading;
using System.Windows.Forms;
namespace BMap.NET.WindowsForm
{
public partial class MapDownloadDialog : Form
{
private LatLngPoint p1; private LatLngPoint p2;
private ArrayList _waittodownload = new ArrayList(); //待下载图片集合
public MapDownloadDialog(LatLngPoint p1, LatLngPoint p2)
{
InitializeComponent();
this.p1 = p1;
this.p2 = p2;
}
private void button1_Click(object sender, EventArgs e)
{
using (FolderBrowserDialog fb = new FolderBrowserDialog())
{
if (fb.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
txtPath.Text = fb.SelectedPath;
}
}
}
private void button2_Click(object sender, EventArgs e)
{
_path = txtPath.Text;
if (_path.Equals(""))
{
MessageBox.Show("请选择存储路径!");
return;
}
if (numZoom.Value > numZoomEnd.Value)
{
MessageBox.Show("地图级别设置不对!");
return;
}
int zoomStart = (int)numZoom.Value;
int zoomEnd = (int)numZoomEnd.Value;
int thread = (int)numThread.Value;
_waittodownload.Clear();
for (int zoom = zoomStart; zoom <= zoomEnd; ++zoom)
{
PointF point1 = MapHelper.GetLocationByLatLng(p1, zoom); //将第一个点经纬度转换成平面2D坐标
PointF point2 = MapHelper.GetLocationByLatLng(p2, zoom); //将第二个点经纬度转换成平面2D坐标
int startX = (int)point1.X / 256; //起始列
int endX = (int)point2.X / 256; //结束列
后面还有 180 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
