Files
WebETA/src/components/directionsRender.js
2023-12-09 19:58:37 -06:00

43 lines
1.0 KiB
JavaScript

// import { MapElementFactory } from "vue2-google-map";
// export default MapElementFactory({
// name: "directionsRenderer",
// ctr() {
// return google.maps.DirectionsRenderer;
// },
// events: [],
// mappedProps: {},
// props: {
// origin: { type: Object },
// destination: { type: Object },
// travelMode: { type: String }
// },
// afterCreate(directionsRenderer) {
// let directionsService = new google.maps.DirectionsService();
// this.$watch(
// () => [this.origin, this.destination, this.travelMode],
// () => {
// let { origin, destination, travelMode } = this;
// if (!origin || !destination || !travelMode) return;
// directionsService.route(
// {
// origin,
// destination,
// travelMode
// },
// (response, status) => {
// if (status !== "OK") return;
// directionsRenderer.setDirections(response);
// }
// );
// }
// );
// }
// });