wip: working on trips
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<mgl-geo-json-source source-id="lines" :data="routeWithLine.line">
|
||||
<mgl-geo-json-source source-id="lines" :data="line">
|
||||
<mgl-line-layer layer-id="line" :paint="paint" :layout="layout" />
|
||||
</mgl-geo-json-source>
|
||||
<mgl-geo-json-source source-id="lines_border" :data="routeWithLine.line">
|
||||
<mgl-geo-json-source source-id="lines_border" :data="line">
|
||||
<mgl-line-layer
|
||||
layer-id="line_border"
|
||||
:paint="offset_paint"
|
||||
@@ -12,14 +12,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { Feature, MultiLineString } from "geojson";
|
||||
import type { Feature, LineString, MultiLineString } from "geojson";
|
||||
|
||||
const { routeWithLine } = defineProps<{
|
||||
routeWithLine: { route: Route; line: Feature<MultiLineString> };
|
||||
const { line } = defineProps<{
|
||||
line: Feature<MultiLineString | LineString, LineProperties>;
|
||||
}>();
|
||||
|
||||
const paint = computed(() => ({
|
||||
"line-color": "#" + routeWithLine.route.color,
|
||||
"line-color": "#" + line.properties?.route?.color,
|
||||
"line-width": 4,
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user