Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
L
ldmap-download
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
王健
ldmap-download
Commits
f9255149
提交
f9255149
authored
4月 14, 2020
作者:
张航
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加了默认下载基础地图以及地图的发布
上级
e7586d80
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
65 行增加
和
25 行删除
+65
-25
WebMvcConfig.java
...java/com/comleader/ldmapdownload/config/WebMvcConfig.java
+31
-0
DownMapLv3.java
.../java/com/comleader/ldmapdownload/service/DownMapLv3.java
+7
-5
DownMapLv4.java
.../java/com/comleader/ldmapdownload/service/DownMapLv4.java
+7
-5
DownMapLv5.java
.../java/com/comleader/ldmapdownload/service/DownMapLv5.java
+8
-6
DownMapLv6.java
.../java/com/comleader/ldmapdownload/service/DownMapLv6.java
+8
-6
DownMapLv6Runner.java
...com/comleader/ldmapdownload/service/DownMapLv6Runner.java
+0
-1
download-map.properties
src/main/resources/config/download-map.properties
+3
-1
index.html
src/main/resources/static/index.html
+1
-1
run.png
src/main/resources/static/run.png
+0
-0
没有找到文件。
src/main/java/com/comleader/ldmapdownload/config/WebMvcConfig.java
0 → 100644
浏览文件 @
f9255149
package
com
.
comleader
.
ldmapdownload
.
config
;
import
com.comleader.ldmapdownload.util.CLStringUtil
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
;
/**
* @ClassName WebMvcConfig
* @Description: WebMvcConfig配置类(设置地图资源静态路径)
* @Author zhanghang
* @Date 2020/4/14
* @Version V1.0
**/
@Configuration
@PropertySource
(
value
=
{
"classpath:config/download-map.properties"
},
encoding
=
"UTF-8"
)
public
class
WebMvcConfig
extends
WebMvcConfigurerAdapter
{
@Value
(
"${file.mapImgPath}"
)
private
String
mapImgPath
;
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
registry
.
addResourceHandler
(
"/**"
)
.
addResourceLocations
(
"file:/"
+
mapImgPath
+
"/"
);
super
.
addResourceHandlers
(
registry
);
}
}
src/main/java/com/comleader/ldmapdownload/service/DownMapLv3.java
浏览文件 @
f9255149
...
@@ -29,13 +29,15 @@ public class DownMapLv3 {
...
@@ -29,13 +29,15 @@ public class DownMapLv3 {
for
(
int
y
=
0
;
y
<=
7
;
y
++)
{
// X轴
for
(
int
y
=
0
;
y
<=
7
;
y
++)
{
// X轴
//高德地图(6:影像,7:矢量,8:影像路网)
//高德地图(6:影像,7:矢量,8:影像路网)
String
imgUrl
=
CLStringUtil
.
getImgUrl
(
z
,
x
,
y
);
String
imgUrl
=
CLStringUtil
.
getImgUrl
(
z
,
x
,
y
);
File
file
=
CLStringUtil
.
getFullFile
(
z
,
x
,
y
);
File
file
=
CLStringUtil
.
getFullFile
NotExist
(
z
,
x
,
y
);
System
.
out
.
println
(
imgUrl
);
System
.
out
.
println
(
imgUrl
);
// 开始下载地图
// 开始下载地图
try
{
if
(
file
!=
null
)
{
HttpUtil
.
downImageByGet
(
imgUrl
,
file
);
try
{
}
catch
(
Exception
e
)
{
HttpUtil
.
downImageByGet
(
imgUrl
,
file
);
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
}
}
...
...
src/main/java/com/comleader/ldmapdownload/service/DownMapLv4.java
浏览文件 @
f9255149
...
@@ -29,14 +29,16 @@ public class DownMapLv4 {
...
@@ -29,14 +29,16 @@ public class DownMapLv4 {
for
(
int
y
=
0
;
y
<=
9
;
y
++)
{
// X轴
for
(
int
y
=
0
;
y
<=
9
;
y
++)
{
// X轴
//高德地图(6:影像,7:矢量,8:影像路网)
//高德地图(6:影像,7:矢量,8:影像路网)
String
imgUrl
=
CLStringUtil
.
getImgUrl
(
z
,
x
,
y
);
String
imgUrl
=
CLStringUtil
.
getImgUrl
(
z
,
x
,
y
);
File
file
=
CLStringUtil
.
getFullFile
(
z
,
x
,
y
);
File
file
=
CLStringUtil
.
getFullFile
NotExist
(
z
,
x
,
y
);
System
.
out
.
println
(
imgUrl
);
System
.
out
.
println
(
imgUrl
);
// 开始下载地图
// 开始下载地图
try
{
if
(
file
!=
null
)
{
HttpUtil
.
downImageByGet
(
imgUrl
,
file
);
try
{
}
catch
(
Exception
e
)
{
HttpUtil
.
downImageByGet
(
imgUrl
,
file
);
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
}
}
...
...
src/main/java/com/comleader/ldmapdownload/service/DownMapLv5.java
浏览文件 @
f9255149
...
@@ -17,8 +17,8 @@ public class DownMapLv5 {
...
@@ -17,8 +17,8 @@ public class DownMapLv5 {
private
static
int
z
=
5
;
private
static
int
z
=
5
;
/**
/**
* @description: 下载第四级的Map
* @param
* @param
* @description: 下载第四级的Map
* @return: void
* @return: void
* @author: zhanghang
* @author: zhanghang
* @date: 2020/4/3
* @date: 2020/4/3
...
@@ -29,14 +29,16 @@ public class DownMapLv5 {
...
@@ -29,14 +29,16 @@ public class DownMapLv5 {
for
(
int
y
=
10
;
y
<=
23
;
y
++)
{
// X轴
for
(
int
y
=
10
;
y
<=
23
;
y
++)
{
// X轴
//高德地图(6:影像,7:矢量,8:影像路网)
//高德地图(6:影像,7:矢量,8:影像路网)
String
imgUrl
=
CLStringUtil
.
getImgUrl
(
z
,
x
,
y
);
String
imgUrl
=
CLStringUtil
.
getImgUrl
(
z
,
x
,
y
);
File
file
=
CLStringUtil
.
getFullFile
(
z
,
x
,
y
);
File
file
=
CLStringUtil
.
getFullFile
NotExist
(
z
,
x
,
y
);
System
.
out
.
println
(
imgUrl
);
System
.
out
.
println
(
imgUrl
);
// 开始下载地图
// 开始下载地图
try
{
if
(
file
!=
null
)
{
HttpUtil
.
downImageByGet
(
imgUrl
,
file
);
try
{
}
catch
(
Exception
e
)
{
HttpUtil
.
downImageByGet
(
imgUrl
,
file
);
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
}
}
...
...
src/main/java/com/comleader/ldmapdownload/service/DownMapLv6.java
浏览文件 @
f9255149
...
@@ -17,8 +17,8 @@ public class DownMapLv6 {
...
@@ -17,8 +17,8 @@ public class DownMapLv6 {
private
static
int
z
=
6
;
private
static
int
z
=
6
;
/**
/**
* @description: 下载第四级的Map
* @param
* @param
* @description: 下载第四级的Map
* @return: void
* @return: void
* @author: zhanghang
* @author: zhanghang
* @date: 2020/4/3
* @date: 2020/4/3
...
@@ -29,14 +29,16 @@ public class DownMapLv6 {
...
@@ -29,14 +29,16 @@ public class DownMapLv6 {
for
(
int
y
=
20
;
y
<=
28
;
y
++)
{
// X轴
for
(
int
y
=
20
;
y
<=
28
;
y
++)
{
// X轴
//高德地图(6:影像,7:矢量,8:影像路网)
//高德地图(6:影像,7:矢量,8:影像路网)
String
imgUrl
=
CLStringUtil
.
getImgUrl
(
z
,
x
,
y
);
String
imgUrl
=
CLStringUtil
.
getImgUrl
(
z
,
x
,
y
);
File
file
=
CLStringUtil
.
getFullFile
(
z
,
x
,
y
);
File
file
=
CLStringUtil
.
getFullFile
NotExist
(
z
,
x
,
y
);
System
.
out
.
println
(
imgUrl
);
System
.
out
.
println
(
imgUrl
);
// 开始下载地图
// 开始下载地图
try
{
if
(
file
!=
null
)
{
HttpUtil
.
downImageByGet
(
imgUrl
,
file
);
try
{
}
catch
(
Exception
e
)
{
HttpUtil
.
downImageByGet
(
imgUrl
,
file
);
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
}
}
...
...
src/main/java/com/comleader/ldmapdownload/service/DownMapLv6Runner.java
浏览文件 @
f9255149
...
@@ -36,6 +36,5 @@ public class DownMapLv6Runner implements ApplicationRunner {
...
@@ -36,6 +36,5 @@ public class DownMapLv6Runner implements ApplicationRunner {
DownMapLv4
.
downLoad
();
DownMapLv4
.
downLoad
();
DownMapLv5
.
downLoad
();
DownMapLv5
.
downLoad
();
DownMapLv6
.
downLoad
();
DownMapLv6
.
downLoad
();
}
}
}
}
src/main/resources/config/download-map.properties
浏览文件 @
f9255149
# 下载地图的保存路径
# 下载地图的保存路径
file.basepath
=
E:/em-downloadmap
file.basepath
=
E:/em-downloadmap
# 项目的发布地址
file.mapImgPath
=
E:/em-downloadmap
# 下载地图的地址
# 下载地图的地址
#天地图服务器t0-t8间选一个
#天地图服务器t0-t8间选一个
...
@@ -25,7 +27,7 @@ map.maxLv=15
...
@@ -25,7 +27,7 @@ map.maxLv=15
map.threadNum
=
2000
map.threadNum
=
2000
# 是否下载前6级(不能与其余的同时进行)
# 是否下载前6级(不能与其余的同时进行)
map.Lv6.flag
=
fals
e
map.Lv6.flag
=
tru
e
# 是否覆盖已有
# 是否覆盖已有
map.download.append
=
false
map.download.append
=
false
...
...
src/main/resources/static/index.html
浏览文件 @
f9255149
...
@@ -197,7 +197,7 @@
...
@@ -197,7 +197,7 @@
// 校验信息
// 校验信息
if
(
verifyParam
())
{
if
(
verifyParam
())
{
// 开始建立连接
// 开始建立连接
$
(
"#filePath"
).
val
(
$
(
"#filePath"
).
val
());
//
$("#filePath").val($("#filePath").val());
sendReady
();
sendReady
();
}
}
}
}
...
...
src/main/resources/static/run.png
0 → 100644
浏览文件 @
f9255149
1.1 KB
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论