Skip to content

[refactor] #65 네컷지도 관련 로직 개선#68

Merged
Ojongseok merged 12 commits into
feat/#52-map-apifrom
refactor/#65-map-refactor
Jan 29, 2026
Merged

[refactor] #65 네컷지도 관련 로직 개선#68
Ojongseok merged 12 commits into
feat/#52-map-apifrom
refactor/#65-map-refactor

Conversation

@Ojongseok

@Ojongseok Ojongseok commented Jan 28, 2026

Copy link
Copy Markdown
Member

🔗 관련 이슈

📙 작업 설명

  • 위치 권한 허용 시 한 번만 현재 위치를 가져오도록 변경(FusedLocationProviderClient.getCurrentLocation())
  • LocationTrackingMode.NoFollow 모드만 사용하도록 단순화
  • 브랜드 이미지 캐싱 로직을 rememberCachedBrandImage에서 뷰모델에서 브랜드 조회 후 바로 비트맵으로 변환 후 MapState에서 유지. 이후 ComposableMarker에서 MapState에 참조하여 사용하도록 변경했습니다.
  • getFusedLocationProviderClient()를 통해 위치를 1회 조회하는 LocationHelper 오브젝트를 추가했습니다.

📸 스크린샷 또는 시연 영상 (선택)

기능 미리보기 기능 미리보기
권한 O
KakaoTalk_Video_2026-01-28-21-41-56.mp4

💬 추가 설명 or 리뷰 포인트 (선택)

  • 카톡에서 나눈 이야기와 다르게 FusedLocationProviderClient.getCurrentLocation() 해당 함수로 위치를 한 번만 쉽게 읽어들일 수는 없더라구요! 해당 함수는 비동기로 위치를 조회하여 위치 조회가 완료되는 시점은 리스너 구현 없이는 알 수 없었습니다. 그래서 콜백 형태로 MapViewModel에서 구현하여 1회 조회 시 바로 콜백을 취소해주었습니다.
    • Follow or NoFollow 모드로 위치를 조회하는 것 보다FusedLocationProviderClient로 위치를 조회하여 카메라를 이동시키는 방법이 첨부된 영상처럼 현위치를 조회하는데에 훨씬 빨랐습니다.

-> 이전 PR 코멘트에 대한 답변입니다.

#60 (comment)

혹시 MapLoaded 되고 데이터를 호출하고 권한을 체크하는 것 대신 EnterMapScreen 에서 하는 건 어떨까요??
이렇게 된다면은 MapLoading 이 실패했을 때 데이터를 가져오는 불필요함이 존재하지만,
MapLoading이 성공했을 때는 조금 더 빠른 적용이 가능할 것 같습니다.

-> 이번 PR에서 onMapLoaded = { onIntent(MapIntent.RequestLocationPermission) } 네이버지도를 로드하면 권한을 요청하여 권한 확인 이후의 플로우를 진행합니다.
말씀하신대로 EnterMapScreen에서 호출하여 확인해보니 네트워크 상태가 느리거나 특히 지하철에서 지도가 로드되기 전 회색 배경에서 현위치로 이동한다거나 회색 배경인 상태에서 권한을 요청한다거나 오히려 어색해 보이는 현상이 있었습니다.
그래서 권한 플로우가 과도하게 빠르지 않게 지도가 로드된 시점에 진행하도록 구현했습니다.

권한 및 카메라 이동 플로우 변경

네이버 지도 로드 -> 일단 권한 요청(onIntent(MapIntent.RequestLocationPermission)) ->

val locationPermissionLauncher = rememberLauncherForActivityResult(
        contract = ActivityResultContracts.RequestMultiplePermissions(),
    ) { permissions -> } 

위 블럭에서 권한 분기 이후의 프로세스 진행(최초 위치 조회 및 카메라 이동, 사각형 포토부스 조회 등)

Summary by CodeRabbit

새로운 기능

  • 위치 기반 기능 강화

    • 위치 권한 처리 개선으로 현재 위치 기반 카메라 추적 기능 추가
    • 지도 제스처 상호작용 인식 기능 추가
  • 성능 최적화

    • 브랜드 이미지 캐싱 최적화로 로딩 성능 개선
  • 개선 사항

    • 위치 권한 요청 흐름 단순화

✏️ Tip: You can customize this high-level summary in your review settings.

@Ojongseok Ojongseok requested a review from ikseong00 January 28, 2026 13:39
@Ojongseok Ojongseok self-assigned this Jan 28, 2026
@coderabbitai

coderabbitai Bot commented Jan 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

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 and usage tips.

@Ojongseok Ojongseok changed the title [refactor] #65 [refactor] #65 네컷지도 관련 로직 개선 Jan 28, 2026

@ikseong00 ikseong00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ApplicationContext 를 주입받고 코드 자체는 깔끔해진 것 같습니다.
추후 2차 MVP 이후 리팩 우선순위로 두면 좋을 것 같습니다!

Screen_recording_20260128_234543.mp4

현재 위치에서 재검색 후, 칩이 계속 뜨는 현상이 있습니다!

Comment thread feature/map/impl/src/main/java/com/neki/android/feature/map/impl/MapViewModel.kt Outdated
@Ojongseok Ojongseok merged commit 7460bd7 into feat/#52-map-api Jan 29, 2026
1 check passed
@Ojongseok Ojongseok deleted the refactor/#65-map-refactor branch January 29, 2026 10:46
Ojongseok added a commit that referenced this pull request May 25, 2026
[refactor] #65 네컷지도 관련 로직 개선
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