Skip to content

feat: 지도에 mock 핀 표시 및 선택 상태 구현 - #76

Merged
L0521 merged 6 commits into
developfrom
feat/24-map-pin-display
Jul 24, 2026
Merged

L0521 merged 6 commits into
developfrom
feat/24-map-pin-display

Conversation

@L0521

@L0521 L0521 commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor
  • OverlayView 기반으로 mock 핀을 지도에 렌더링하고, 선택 시 확대 하이라이트되도록 구현
  • 현재 위치 방향 마커가 실제 방향 값 수신 전에도 기본값(0도, 북쪽)으로 항상 표시되도록 수정

변경 내용

지도 축척과 무관하게 mock 핀 데이터를 OverlayView 기반으로 지도에 표시하고, 선택 시 확대 하이라이트되도록 구현했습니다. 겸사겸사 현재 위치 방향 마커가 실제 방향 값이 들어오기 전에도 기본값(북쪽)으로 항상 표시되도록 수정했습니다.
gestureHandling greedy 옵션 추가했습니다.(7/24)

관련 이슈

Closes #24

변경 사항

  • 새로운 기능 추가
  • 버그 수정
  • UI/UX 개선
  • 리팩토링
  • 문서 업데이트

테스트

  • 브라우저에서 정상 동작 확인
  • 기존 기능에 영향 없음 확인

스크린샷 (UI 변경시)

체크리스트

  • 코드가 정상적으로 동작합니다
  • 새로운 에러나 경고가 없습니다
  • 필요시 문서를 업데이트했습니다
  • 코드 포맷팅을 실행했습니다 (pnpm format)
  • ESLint 검사를 통과했습니다 (pnpm lint:fix)

코드 품질 확인
PR 제출 전에 다음 명령어를 실행하여 코드 품질을 확인해주세요:

pnpm lint:fix
pnpm format

Summary by CodeRabbit

  • 새로운 기능
    • 지도에 핀 오버레이를 표시하고, 핀을 선택하면 해당 핀을 시각적으로 강조합니다.
    • 핀 선택 상태가 유지되며 선택 관련 이벤트가 동작합니다.
  • 개선 사항
    • 현재 위치 마커의 방향 표시가 기본 각도부터 즉시 표시됩니다.
    • 나침반(방향 추적) 관련 업데이트가 위치 추적과 더 자연스럽게 연동됩니다.

- OverlayView 기반으로 mock 핀을 지도에 렌더링하고, 선택 시 확대 하이라이트되도록 구현
- 현재 위치 방향 마커가 실제 방향 값 수신 전에도 기본값(0도, 북쪽)으로 항상 표시되도록 수정
@coderabbitai

coderabbitai Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@L0521, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 79748216-261a-445d-8557-c446f7e8342a

📥 Commits

Reviewing files that changed from the base of the PR and between 805788f and 1a14935.

📒 Files selected for processing (2)
  • src/features/map/components/MapViewer.tsx
  • src/pages/MapPage.tsx
📝 Walkthrough

Walkthrough

MapPage가 mock 지도 핀과 선택 상태를 MapViewer에 전달합니다. MapViewer는 핀 OverlayView를 생성하고 클릭·선택 상태를 반영하며, 현재 위치 마커 초기화 시 방향 쐐기와 나침반 추적을 설정합니다.

Changes

지도 핀 오버레이

Layer / File(s) Summary
지도 핀 계약과 상태 배선
src/features/map/components/MapViewer.tsx, src/pages/MapPage.tsx
mapPins, selectedMapPinId, onSelectMapPin props와 선택 상태 ref를 추가하고 MapPage에서 핀 목록 및 선택 이벤트를 연결합니다.
핀 오버레이 생성과 선택 강조
src/features/map/components/MapViewer.tsx
핀별 OverlayView를 생성·부착하고 클릭 이벤트를 전달하며, 선택된 핀의 마커 속성과 zIndex를 갱신합니다.
현재 위치 방향 마커 초기화
src/features/map/components/MapViewer.tsx
현재 위치 마커 생성 시 기본 각도 0도의 방향 쐐기를 생성하고 나침반 활성화 콜백을 위치 추적 효과의 의존성에 추가합니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MapPage
  participant MapViewer
  participant MapPinOverlay
  participant OverlayView
  MapPage->>MapViewer: mapPins와 selectedMapPinId 전달
  MapViewer->>MapPinOverlay: createMapPinOverlay 호출
  MapPinOverlay->>OverlayView: 핀 오버레이 부착
  OverlayView->>MapViewer: 핀 클릭
  MapViewer->>MapPage: onSelectMapPin(pin.id) 호출
  MapPage->>MapViewer: 갱신된 selectedMapPinId 전달
  MapViewer->>MapPinOverlay: 선택 마커와 zIndex 갱신
Loading

Possibly related PRs

Suggested reviewers: kim3360, jeonggyul

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Mock 핀 렌더링과 선택/하이라이트는 구현됐지만, 지도 축척에 따른 표시 상태 전환 로직은 확인되지 않습니다. 줌/축척 값을 기준으로 핀 노출·강조 상태를 분기하고, mock 핀으로 해당 동작을 검증하는 로직을 추가하세요.
✅ Passed checks (3 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed 방향 마커 기본값 수정과 컴퍼스 의존성 보완은 지도 핀 구현과 연관된 범위 내 변경입니다.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 mock 핀 표시와 선택 상태 구현이라는 핵심 변경을 정확하고 간결하게 요약합니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/24-map-pin-display

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@L0521
L0521 requested a review from a team July 20, 2026 17:45
@L0521 L0521 self-assigned this Jul 20, 2026
@L0521 L0521 added the feature Feature implementation label Jul 20, 2026
@github-actions

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/features/map/components/MapViewer.tsx`:
- Around line 505-526: Update the map pin overlay useEffect to return a cleanup
function that disposes every overlay in mapPinOverlaysRef.current via
disposeMapPinOverlay when the component unmounts or the effect is re-run,
ensuring no overlays or resources remain on the map.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d924d068-99ce-4358-b8af-7f31094c5ec6

📥 Commits

Reviewing files that changed from the base of the PR and between 166b37b and 1d552fe.

📒 Files selected for processing (2)
  • src/features/map/components/MapViewer.tsx
  • src/pages/MapPage.tsx

Comment thread src/features/map/components/MapViewer.tsx
useEffect가 cleanup 함수를 반환하지 않아 컴포넌트 언마운트 시 마지막 오버레이 세트가 정리되지 않고 남는 문제 수정. dispose 로직을 effect 본문 앞이 아닌 cleanup 함수로 옮겨 재실행/언마운트 양쪽 모두 처리되도록 함.

CodeRabbit 리뷰 반영
@onebone
onebone requested review from JeongGyul and removed request for a team July 22, 2026 13:06
@github-actions

Copy link
Copy Markdown

https://pr-76.plimap.kr

@JeongGyul JeongGyul left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

수고하셨습니다!

@L0521
L0521 merged commit 170b792 into develop Jul 24, 2026
4 checks passed
@L0521
L0521 temporarily deployed to preview-maintenance July 24, 2026 14:59 — with GitHub Actions Inactive
@L0521
L0521 deleted the feat/24-map-pin-display branch August 4, 2026 15:16

This branch was successfully deployed

1 active and 1 inactive deployments
preview-maintenance — 1a14935b Deployed Jul 24, 2026 by L0521 via cleanup #64
preview — 1a14935b Deployed Jul 24, 2026 by L0521 via deploy #62
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Feature implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

지도 축척별 핀 표시 및 선택 상태 구현

2 participants