This commit is contained in:
2025-10-30 15:30:14 +08:00
parent fbf1804998
commit 0f69b41c1d
21 changed files with 1046 additions and 62 deletions

View File

@ -171,7 +171,6 @@ public class GraphHopperController {
// 用新实例计算路径
GHResponse response = currentHopper.route(ghRequest);
// 处理错误
if (response.hasErrors()) {
// 检查是否有超出范围的错误
@ -219,7 +218,6 @@ public class GraphHopperController {
// 配置基础参数
hopper.setOSMFile(osmFilePath);
hopper.setGraphHopperLocation(graphHopperProperties.getGraphLocation());
// 配置交通方式 + 权重策略
List<Profile> profileList = new ArrayList<>();
for (String profileName : graphHopperProperties.getProfiles()) {
@ -261,7 +259,7 @@ public class GraphHopperController {
System.out.println("删除旧地图目录: " + graphDir.getAbsolutePath() + "" + (dirDeleted ? "成功" : "失败"));
}
// 重载: 递归删除子目录
// 重载:递归删除子目录
private void deleteOldGraphDir(File subDir) {
File[] files = subDir.listFiles();
if (files != null) {