-
Notifications
You must be signed in to change notification settings - Fork 0
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
75 1 add google maps api with library #76
Conversation
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() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!! TODO
프롭스로 좌표받아오기
// !! 당장은 최소거리 선택할 필요 없음 | ||
// !!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> | ||
// !!); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
경로 선택할 수 있도록 하는 기능 꼭 필요하지 않을 수도?
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> | ||
); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const PIN_VARIATION = { | ||
accommodation: { | ||
background: '#0f6e9d', | ||
borderColor: '#003f64', | ||
glyphColor: '#6096d9', | ||
}, | ||
restaurant: { | ||
background: '#9d220f', | ||
borderColor: '#642100', | ||
glyphColor: '#d98860', | ||
}, | ||
attraction: { | ||
background: '#4e0074', | ||
borderColor: '#2f0064', | ||
glyphColor: '#9660d9', | ||
}, | ||
}; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 _ 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로컬에서는 어떻게 하고계셔요 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엇..지금 pnpm run dev
로 로컬로 돌리고 있는데..😅 혹시 제가 이해를 잘못한 걸까요..?
PULL REQUEST TEMPLATE
PR 설명
@appear 구글맵 연동 중!
현재는 좌표를 하드코딩으로 넣어줬지만 데이터 저장한 것에서 가져와서 뿌려줄 거 같습니당.
스크린샷 & URL