Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

75 1 add google maps api with library #76

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

Pyotato
Copy link
Collaborator

@Pyotato Pyotato commented Aug 28, 2024

PULL REQUEST TEMPLATE

PR 설명

@appear 구글맵 연동 중!
현재는 좌표를 하드코딩으로 넣어줬지만 데이터 저장한 것에서 가져와서 뿌려줄 거 같습니당.

스크린샷 & URL

image

Copy link

Comment on lines +9 to +17
const locations = [
{ lat: 35.62366, lng: 139.753634 },
{ lat: 35.6612723, lng: 139.7775608 },
{ lat: 35.6539099, lng: 139.7975056 },
{ lat: 35.662761, lng: 139.7991693 },
{ lat: 35.6660912, lng: 139.7876416 },
];

export default function Maps() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!! TODO

프롭스로 좌표받아오기

Comment on lines +83 to +102
// !! 당장은 최소거리 선택할 필요 없음
// !!return (
// !! <div className={cx('directions', 'visible')}>
// !! {/* <div className={cx('directions', selectedDirection === JSON.stringify(location) ? 'visible' : null)}> */}
// !! <h2>{selected.summary}</h2>
// !! <p>{leg.start_address}</p>
// !! <p>distance: {leg.distance?.text}</p>
// !! <p>duration: {leg.duration?.text}</p>

// !! <h2>other routes</h2>
// !! <ul>
// !! {routes.map((route, index) => (
// !! <li key={route.summary}>
// !! <button onClick={() => setRouteIndex(index)}>{route.summary}</button>
// !! </li>
// !! ))}
// !! </ul>
// !! </div>
// !!);
};
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

경로 선택할 수 있도록 하는 기능 꼭 필요하지 않을 수도?

Comment on lines +9 to +20
const Pin = ({ numberOfOrder = 1, variation = 'accommodation', ...props }: PinProps) => {
return (
<ReactGoogleMapsPin
{...props}
background={PIN_VARIATION[variation]['background']}
borderColor={PIN_VARIATION[variation]['borderColor']}
glyphColor={PIN_VARIATION[variation]['glyphColor']}
>
{numberOfOrder}
</ReactGoogleMapsPin>
);
};
Copy link
Collaborator Author

@Pyotato Pyotato Aug 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

마커의 디자인 커스텀
image

Comment on lines +29 to +45
const PIN_VARIATION = {
accommodation: {
background: '#0f6e9d',
borderColor: '#003f64',
glyphColor: '#6096d9',
},
restaurant: {
background: '#9d220f',
borderColor: '#642100',
glyphColor: '#d98860',
},
attraction: {
background: '#4e0074',
borderColor: '#2f0064',
glyphColor: '#9660d9',
},
};
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marker의 pin 종류에 따른 스타일

colorScheme: 'FOLLOW_SYSTEM',
};

const API_KEY = process.env.NEXT_PUBLIC_GOOGLE_MAP_API as string;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 _ 👍

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

로컬에서는 어떻게 하고계셔요 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

엇..지금 pnpm run dev로 로컬로 돌리고 있는데..😅 혹시 제가 이해를 잘못한 걸까요..?

@Pyotato Pyotato merged commit f571d3f into 21-design-system Aug 28, 2024
1 check passed
@Pyotato Pyotato deleted the 75-1-add-google-maps-api-with-library branch September 5, 2024 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants