gpx.studio/website/src/lib/docs/zh/toolbar/routing.mdx

84 lines
3.2 KiB
Text

---
title: 规划或编辑路线
---
<script>
import { Pencil, Route, Bike, TriangleAlert, ArrowRightLeft, Home, Repeat, Trash2, CirclePlay, SquareArrowUpLeft } from 'lucide-svelte';
import DocsNote from '$lib/components/docs/DocsNote.svelte';
import Routing from '$lib/components/toolbar/tools/routing/Routing.svelte';
import DocsImage from '$lib/components/docs/DocsImage.svelte';
</script>
# <Pencil size="24" class="inline-block" style="margin-bottom: 5px" /> { title }
使用该工具在地图上添加或移动轨迹点,以创建和编辑路线。
## 设置
常见控制路线行为的设置可见下图,
点击 <button><SquareArrowUpLeft size="16" class="inline-block" style="margin-bottom: 2px" /></button> 使窗口最小化以节省空间。
<div class="flex flex-row justify-center">
<Routing minimizable={false} class="text-foreground p-3 border rounded-md shadow-lg" />
</div>
### <Route size="16" class="inline-block" style="margin-bottom: 2px" /> 路线
启用路线时, 网站将根据 <a href="https://www.openstreetmap.org" target="_blank">OpenStreetMap</a> 路网的计算结果来连接在地图上添加或移动的轨迹点,
禁用则以直线连接。
也可使用 <kbd>F5</kbd> 切换设置。
### <Bike size="16" class="inline-block" style="margin-bottom: 2px" /> 活动
选择活动类型。
### <TriangleAlert size="16" class="inline-block" style="margin-bottom: 2px" /> 允许私有道路
启用后,规划路线时将考虑私有道路。
<DocsNote type="warning">
建议仅当您了解当地情况并有权使用相关道路时才启用此选项。
</DocsNote>
## 绘制和编辑路线
创建新路线或扩展已有路线就像在地图上添加新轨迹点一样简单。
拖动现有轨迹点后,与之相连的前后两个轨迹点所构成的路段将被重新规划。
若要在现有轨迹点之间插入新点,可将鼠标悬停在相关路段上,并将出现的新点拖动到所需位置。
在可触摸设备上,支持点击路段以插入新轨迹点。
<DocsNote>
编辑导入的 GPX 文件时,网站将自动创建一组初始轨迹点。
为了简化编辑过程,地图缩放的等级越大,轨迹点显示得就越多。
这使得路线能够按不同的详细程度进行编辑。
</DocsNote>
最后,若要删除轨迹点,须先选中它们,然后点击菜单中的 <button><Trash2 size="16" class="inline-block" style="margin-bottom: 4px" /> 删除</button> 按钮。
<DocsImage src="tools/routing" alt="轨迹点让路线编辑更轻松" />
## 其他工具
以下工具可自动执行一些常见的路线修改操作。
### 反向
反转路线方向。
### <Home size="16" class="inline-block" style="margin-bottom: 2px" /> 返回起点
使用所选的路线设置将终点和起点连接起来。
### <Repeat size="16" class="inline-block" style="margin-bottom: 2px" /> 往返路线
按原路返回起点。
### <CirclePlay size="16" class="inline-block" style="margin-bottom: 2px" /> 更改环线起点
当路线的起点和终点非常接近时,支持点击任意轨迹点并选择 <button><CirclePlay size="16" class="inline-block" style="margin-bottom: 2px" /> 设为起点 </button> 来改变它。