vue-tianditu2
Version:
93 lines (92 loc) • 2.3 kB
JavaScript
import { defineComponent as a, h as r } from "vue";
import { TdtMarker as n } from "../../../overlay/marker/index.mjs";
import { TdtPolyline as e } from "../../../overlay/polyline/index.mjs";
import { useState as m } from "../use/state.mjs";
import p from "../styles/start.png.mjs";
import l from "../styles/end.png.mjs";
import s from "../styles/map_bus.png.mjs";
import d from "../styles/map_metro.png.mjs";
const A = a({
setup() {
const o = m();
return () => {
var t, c;
return r("span", null, [
// 起点
(t = o.startMarker) != null && t.length ? r(n, {
position: o.startMarker,
icon: {
iconUrl: p,
iconSize: [44, 34],
iconAnchor: [12, 31]
}
}) : "",
// 终点
(c = o.endMarker) != null && c.length ? r(n, {
position: o.endMarker,
icon: {
iconUrl: l,
iconSize: [44, 34],
iconAnchor: [12, 31]
}
}) : "",
// 驾车线
o.drivingLines.map(
(i) => r(e, {
path: i,
color: "#2C64A7",
lineStyle: "solid",
weight: 5,
opacity: 1
})
),
// 步行及换乘线
o.walkLines.map(
(i) => r(e, {
path: i,
color: "#2E9531",
lineStyle: "dashed",
weight: 4,
opacity: 1
})
),
//公交及地铁线
o.busLines.map(
(i) => r(e, {
path: i,
color: "#2C64A7",
lineStyle: "solid",
weight: 4,
opacity: 1
})
),
// 公交站点
o.busMarkers.map(
(i) => r(n, {
position: i,
icon: {
iconUrl: s,
iconSize: [23, 23],
iconAnchor: [12, 12]
}
})
),
// 地铁站点
o.metroMarkers.map(
(i) => r(n, {
position: i,
icon: {
iconUrl: d,
iconSize: [23, 23],
iconAnchor: [12, 12]
}
})
)
]);
};
}
});
export {
A as RouteMapView
};
//# sourceMappingURL=RouteMapView.mjs.map