|
@@ -123,27 +123,25 @@
|
|
|
@click="(step as any).open=true"
|
|
@click="(step as any).open=true"
|
|
|
/>
|
|
/>
|
|
|
</FlexRow>
|
|
</FlexRow>
|
|
|
- <CollapseBox :open="(step as any).open || step.lines?.length == 1">
|
|
|
|
|
- <FlexCol v-for="(line, lineIdx) in step.lines" :key="lineIdx" :gap="10">
|
|
|
|
|
- <FlexRow :gap="8" align="center">
|
|
|
|
|
- <template v-if="line.vehicle === 'BUS'">
|
|
|
|
|
- <Icon v-if="line.vehicle === 'BUS'" icon="bus" :size="40" />
|
|
|
|
|
- <Text color="text.second">公交</Text>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template v-else-if="line.vehicle === 'SUBWAY'">
|
|
|
|
|
- <Icon icon="subway" :size="40" />
|
|
|
|
|
- <Text color="text.second">地铁</Text>
|
|
|
|
|
- </template>
|
|
|
|
|
- <template v-else-if="line.vehicle === 'RAIL'">
|
|
|
|
|
- <Icon icon="rail" :size="40" />
|
|
|
|
|
- <Text color="text.second">火车</Text>
|
|
|
|
|
- </template>
|
|
|
|
|
- <Text bold :color="(line as any).line_color || '#000'">{{ line.title }}</Text>
|
|
|
|
|
- <Text color="text.second" :margin="[0,0,0,8]">{{ line.geton?.title }} → {{ line.getoff?.title }}</Text>
|
|
|
|
|
- </FlexRow>
|
|
|
|
|
- <Text color="text.second">约 {{ formatDuration(line.duration) }} · {{ line.station_count || 0 }} 站</Text>
|
|
|
|
|
- </FlexCol>
|
|
|
|
|
- </CollapseBox>
|
|
|
|
|
|
|
+ <FlexCol v-for="(line, lineIdx) in step.lines" :key="lineIdx" :gap="10" :padding="[0,0,0,50]">
|
|
|
|
|
+ <FlexRow :gap="8" align="center">
|
|
|
|
|
+ <template v-if="line.vehicle === 'BUS'">
|
|
|
|
|
+ <Icon v-if="line.vehicle === 'BUS'" icon="bus" :size="40" />
|
|
|
|
|
+ <Text color="text.second">公交</Text>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else-if="line.vehicle === 'SUBWAY'">
|
|
|
|
|
+ <Icon icon="subway" :size="40" />
|
|
|
|
|
+ <Text color="text.second">地铁</Text>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else-if="line.vehicle === 'RAIL'">
|
|
|
|
|
+ <Icon icon="rail" :size="40" />
|
|
|
|
|
+ <Text color="text.second">火车</Text>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <Text bold :color="(line as any).line_color || '#000'">{{ line.title }}</Text>
|
|
|
|
|
+ <Text color="text.second" :margin="[0,0,0,8]">{{ line.geton?.title }} → {{ line.getoff?.title }}</Text>
|
|
|
|
|
+ </FlexRow>
|
|
|
|
|
+ <Text color="text.second">约 {{ formatDuration(line.duration) }} · {{ line.station_count || 0 }} 站</Text>
|
|
|
|
|
+ </FlexCol>
|
|
|
</template>
|
|
</template>
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
|
</FlexCol>
|
|
</FlexCol>
|
|
@@ -332,7 +330,14 @@ function buildPolylineFromRouteInfo(info: RouteInfo) {
|
|
|
const points = polylineToPoints(polylines[k]);
|
|
const points = polylineToPoints(polylines[k]);
|
|
|
if (points.length < 2) continue;
|
|
if (points.length < 2) continue;
|
|
|
const segmentTexts = k === 0 ? [{ name: label, startIndex: 0, endIndex: points.length - 1 }] : undefined;
|
|
const segmentTexts = k === 0 ? [{ name: label, startIndex: 0, endIndex: points.length - 1 }] : undefined;
|
|
|
- segments.push({ points, color, width, level: 'aboveroads', segmentTexts, textStyle: segmentTexts ? textStyle : undefined });
|
|
|
|
|
|
|
+ segments.push({
|
|
|
|
|
+ points,
|
|
|
|
|
+ color,
|
|
|
|
|
+ width,
|
|
|
|
|
+ level: 'aboveroads',
|
|
|
|
|
+ segmentTexts,
|
|
|
|
|
+ textStyle: segmentTexts ? textStyle : undefined
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
const encoded = (routeData as { polyline?: number[]; duration?: number })?.polyline;
|
|
const encoded = (routeData as { polyline?: number[]; duration?: number })?.polyline;
|