Repository navigation
Conversation
There was a problem hiding this comment.
🤖 AI 코드 리뷰 - 아키텍처 관점
참여자 마커 클러스터링 기능을 추가하는 PR이다. moveCamera 중복 구현을 NMFNaverMapView+Camera.swift 익스텐션으로 추출한 것은 적절하다. 클러스터링 관련 타입(ParticipantClusterer, ClusterMarkerView)이 별도 파일로 분리된 점도 긍정적이다. 다만, 클러스터링 로직과 마커 렌더링 상태 관리, CADisplayLink 전환 처리가 모두 AppointmentRouteMapView 안에 집중되어 있어 단일 뷰 클래스의 책임이 크게 늘어났고, 클러스터 회전/전환 타이머 관리 코드가 뷰 계층에 직접 포함되는 구조적 문제가 있다. ParticipantClusterer의 greedy 클러스터링 알고리즘은 리더 마커에만 의존하는 구조로 확장 시 교체가 어렵지 않지만, 현재 구현이 AppointmentRouteMapView에 알고리즘 변경 영향이 직접 미치도록 결합되어 있다.
sangYuLv
approved these changes
Oct 9, 2026
sangYuLv
left a comment
Collaborator
There was a problem hiding this comment.
고생 많으셨습니다!!
늦은 리뷰 죄송합니다 😢
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA
📝 작업 내용
📌 요약
홍길동 외 N명클러스터 마커 하나로 묶어 표시🔍 상세
[1] 경로 화면 초기 카메라 로직
NMFNaverMapView+Camera.swift신규 구현MapZoom: 화면 성격별 기본 줌 (여러 지점을 보는 화면 15, 단일 장소 16)moveCamera(to:zoomLevel:): 세 지도 뷰에 각각 있던 동일 구현을NMFNaverMapViewextension 한 곳으로 이동fitCamera(to:padding:maxZoom:): 여러 좌표가 모두 보이도록 카메라 이동fitCamera실행[2] 클러스터 마커 표시
ClusterMarkerView: 클러스터 마커 이미지를 그리는 렌더링 전용 뷰 (프로필 원 +닉네임 외 N명)ClusterMarkerController: 클러스터 마커의 수명주기와 순환/전환 애니메이션을 관리NMFMarker를 표시하고, 멤버 구성이 같은 클러스터는 마커를 재사용 (지도를 움직여도 순환 상태 유지)CADisplayLink로 약 0.35초 슬라이드 전환.AppointmentRouteMapViewmapViewCameraIdle)와 참여자 마커 로딩 직후 클러스터를 다시 계산hidden처리하고, 클러스터 마커 표시는ClusterMarkerController에 위임.💬 리뷰 노트
[1] 클러스터링 구현 방법 후보와 선택한 이유
NMCClusterer)클러스터 마커와 개별 마커의 모양은 업데이터(
NMCClusterMarkerUpdater,NMCLeafMarkerUpdater)에서 지정(업데이터는 클러스터 정보가 바뀔 때만 호출되고 마커 객체는 SDK 풀에서 재사용되는 구조라서,
2초마다 멤버를 순환하고 슬라이드 전환을 하려면 현재 노출 중인 클러스터 마커를 별도로 추적/관리해야 함)
멤버 좌표의 평균으로 잡는 클러스터 위치가 실제 멤버 위치와 크게 달라질 수 있음
이미 만들어진 클러스터의 첫 마커(기준 마커)와 화면에서 겹치면 그 클러스터에 넣고,
겹치는 곳이 없으면 새 클러스터를 시작
기준 마커와는 안 겹치고 다른 멤버와만 겹치는 마커는 별도 클러스터가 되어 클러스터 마커끼리 겹쳐 보일 수 있음
멤버 순환/슬라이드를 마커 풀 구조 위에서 구동하는 복잡도와 묶임 기준의 차이 때문에 채택하지 않고,
마커를 직접 소유하고 제어하는 방식으로 구현함
[2] 클러스터 표현 정보들
홍길동 외 N명외 N명은 항상 보이도록 라벨을 분리NMFMarker+ 렌더링 이미지 방식projection)로 판정 (줌아웃하면 묶이고 줌인하면 풀림)가로 < 마커 폭(44pt) && 세로 < 마커 높이(70pt)이면 겹친 것으로 판정목적지에 가려지면 가장 궁금한 정보가 사라짐
📸 영상 / 이미지
build.mp4