Loading src/components/GMap.vue +18 −15 Original line number Diff line number Diff line Loading @@ -8,8 +8,8 @@ :zoom="19" style="width: 100%; height: 90%" > <Polyline :options="flightPath" /> <Polyline :options="flightPath2" /> <Polyline :options="crossPath1" /> <Polyline :options="crossPath2" /> <Circle :options="circle" /> <Marker :options="markerOptions" /> </GoogleMap> Loading Loading @@ -41,26 +41,29 @@ export default defineComponent({ setup() { const store = useStore(); const result = JSON.parse(JSON.stringify(store.state.data.data1))[0]; const result = JSON.parse(JSON.stringify(store.state.data)); // console.log(result); // console.log(JSON.parse(JSON.stringify(result))) // console.log(result.crossing_point[0]); let data = result[0].data1[0] // let data = result[1].data2[0] // console.log(result.data1[0]) // result = result.data1[0]; let center = result.crossing_point[0]; console.log(center); let center = data.crossing_point[0]; // console.log(center); let flightPlanCoordinates = result.route1; let flightPlanCoordinates2 = result.route2; console.log(flightPlanCoordinates); console.log(flightPlanCoordinates2); let route1 = data.route1; let route2 = data.route2; // console.log(route1); // console.log(route2); const circle = { center: center, radius: 50, radius: 20, strokeColor: "#FF00FF", strokeOpacity: 0.8, strokeWeight: 3, Loading @@ -83,21 +86,21 @@ export default defineComponent({ icon: customIcon, }; const flightPath = { path: flightPlanCoordinates, const crossPath1 = { path: route1, geodesic: true, strokeColor: "#FF0000", strokeOpacity: 0.8, strokeWeight: 5, }; const flightPath2 = { path: flightPlanCoordinates2, const crossPath2 = { path: route2, geodesic: true, strokeColor: "#0000ff", strokeOpacity: 0.8, strokeWeight: 5, }; return { center, flightPath, flightPath2, circle, markerOptions }; return { center, crossPath1, crossPath2, circle, markerOptions }; }, }); </script> No newline at end of file Loading
src/components/GMap.vue +18 −15 Original line number Diff line number Diff line Loading @@ -8,8 +8,8 @@ :zoom="19" style="width: 100%; height: 90%" > <Polyline :options="flightPath" /> <Polyline :options="flightPath2" /> <Polyline :options="crossPath1" /> <Polyline :options="crossPath2" /> <Circle :options="circle" /> <Marker :options="markerOptions" /> </GoogleMap> Loading Loading @@ -41,26 +41,29 @@ export default defineComponent({ setup() { const store = useStore(); const result = JSON.parse(JSON.stringify(store.state.data.data1))[0]; const result = JSON.parse(JSON.stringify(store.state.data)); // console.log(result); // console.log(JSON.parse(JSON.stringify(result))) // console.log(result.crossing_point[0]); let data = result[0].data1[0] // let data = result[1].data2[0] // console.log(result.data1[0]) // result = result.data1[0]; let center = result.crossing_point[0]; console.log(center); let center = data.crossing_point[0]; // console.log(center); let flightPlanCoordinates = result.route1; let flightPlanCoordinates2 = result.route2; console.log(flightPlanCoordinates); console.log(flightPlanCoordinates2); let route1 = data.route1; let route2 = data.route2; // console.log(route1); // console.log(route2); const circle = { center: center, radius: 50, radius: 20, strokeColor: "#FF00FF", strokeOpacity: 0.8, strokeWeight: 3, Loading @@ -83,21 +86,21 @@ export default defineComponent({ icon: customIcon, }; const flightPath = { path: flightPlanCoordinates, const crossPath1 = { path: route1, geodesic: true, strokeColor: "#FF0000", strokeOpacity: 0.8, strokeWeight: 5, }; const flightPath2 = { path: flightPlanCoordinates2, const crossPath2 = { path: route2, geodesic: true, strokeColor: "#0000ff", strokeOpacity: 0.8, strokeWeight: 5, }; return { center, flightPath, flightPath2, circle, markerOptions }; return { center, crossPath1, crossPath2, circle, markerOptions }; }, }); </script> No newline at end of file