Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
feat: busRouteSheet, busRoute
Browse files Browse the repository at this point in the history
  • Loading branch information
choisihun committed Aug 26, 2024
1 parent 20eafca commit 2bda8ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
13 changes: 9 additions & 4 deletions canbus-web/busRoute/busRoute.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
crossorigin
href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css"
/>

<style>
body {
font-family: Arial, sans-serif;
Expand Down Expand Up @@ -216,9 +217,13 @@
crossorigin="anonymous"
></script>

<script src="https://dapi.kakao.com/v2/maps/sdk.js?appkey=6098f40a4999ebee23fff0c4d3eb2fe4&libraries=services"></script>

<script>
Kakao.init("6098f40a4999ebee23fff0c4d3eb2fe4"); // 사용하려는 앱의 JavaScript 키 입력

var geocoder = new kakao.maps.services.Geocoder();

const schedules = [
{
duration: "1시간 30분",
Expand Down Expand Up @@ -273,18 +278,18 @@
container.innerHTML += scheduleHTML;
});
const naviBtn = document.getElementById("naviBtn");
var geocoder = new kakao.maps.services.Geocoder();

function startNavigation() {
geocoder.addressSearch(
schedules[0].stations[0].name,
function (result, status) {
if (status === kakao.maps.services.Status.OK) {

const coords = new kakao.maps.LatLng(result[0].y, result[0].x);

Kakao.Navi.share({
name: schedules[0].stations[0].name,
x: result[0].x,
y: result[0].y,
x: coords.getLng(),
y: coords.getLat(),
coordType: "wgs84",
});
}
Expand Down
2 changes: 1 addition & 1 deletion canbus-web/busRoute/busRouteSheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
width: 100%;
background-color: white;
padding: 0;
height: 160px;
height: 200px;
border-radius: 28px 28px 0 0;
position: relative;
transform: translateY(0);
Expand Down

0 comments on commit 2bda8ad

Please sign in to comment.