From 1cf724e933b6b758618c3dcb11be50c0ce30655a Mon Sep 17 00:00:00 2001 From: chillwafflez Date: Sat, 23 Mar 2024 00:38:44 -0700 Subject: [PATCH] added Coordinate component to display coordinate in Vehicle Status component --- src/components/VehicleStatus/Coordinate.vue | 38 +++++++++++++++ src/components/VehicleStatusComponent.vue | 19 +++++--- src/testDisplayComponents.vue | 26 ++++------- src/testMapScreen.vue | 52 --------------------- src/views/testMapScreen.vue | 52 +++++++++++++++++++++ 5 files changed, 111 insertions(+), 76 deletions(-) create mode 100644 src/components/VehicleStatus/Coordinate.vue delete mode 100644 src/testMapScreen.vue create mode 100644 src/views/testMapScreen.vue diff --git a/src/components/VehicleStatus/Coordinate.vue b/src/components/VehicleStatus/Coordinate.vue new file mode 100644 index 0000000..3a2efa2 --- /dev/null +++ b/src/components/VehicleStatus/Coordinate.vue @@ -0,0 +1,38 @@ + + + + + + \ No newline at end of file diff --git a/src/components/VehicleStatusComponent.vue b/src/components/VehicleStatusComponent.vue index 98fed8c..2446fc2 100644 --- a/src/components/VehicleStatusComponent.vue +++ b/src/components/VehicleStatusComponent.vue @@ -4,25 +4,24 @@ import VehicleTitle from './VehicleStatus/VehicleTitle.vue'; import EmergencyStop from './VehicleStatus/EmergencyStop.vue'; import Open from './VehicleStatus/Open.vue'; + import Coordinate from './VehicleStatus/Coordinate.vue'; export default { props: { vehicleName: { required: true, type: String}, vehicleStatus: { required: true, type: String}, batteryPct: {required: true, type: Number}, + latency: { required: true, type: Number }, + coordinates: { required: true, type: Object } }, components: { VehicleTitle, Battery, Connection, EmergencyStop, - Open + Open, + Coordinate }, - // computed: { - // batteryPercentage(): number { - // return this.batteryPct; - // } - // }, }; @@ -33,11 +32,12 @@
- +
+
@@ -99,5 +99,10 @@ margin-top: 4%; margin-left: 60%; } + + .adjust-coordinates { + margin-top: 10%; + margin-left: 20%; + } \ No newline at end of file diff --git a/src/testDisplayComponents.vue b/src/testDisplayComponents.vue index ffe9f06..75c4f9e 100644 --- a/src/testDisplayComponents.vue +++ b/src/testDisplayComponents.vue @@ -5,29 +5,21 @@ import Battery from './components/VehicleStatus/Battery.vue'; import Connection from './components/VehicleStatus/Connection.vue'; import Status from "./components/VehicleStatusComponent.vue"; import yuh from "./components/VehicleStatus/VehicleTitle.vue" +import Coordinate from './components/VehicleStatus/Coordinate.vue' + + +let testObject = { + longitude: -177.9325790, + latitude: 33.9325790 + } diff --git a/src/views/testMapScreen.vue b/src/views/testMapScreen.vue new file mode 100644 index 0000000..9f888cd --- /dev/null +++ b/src/views/testMapScreen.vue @@ -0,0 +1,52 @@ + + + + +