Skip to content

Conversation

@thingineeer
Copy link
Collaborator

@thingineeer thingineeer commented Mar 15, 2024

🌱 작업한 내용

  • 현재 지정된 주소를 알 수 없을 때 문구를 수정하였습니다.
  • 커서의 방향이 있음에도 Direction 모드가 되지 않아서, 사용자의 혼란이 있을 가능성이 있어 해결하고자 했습니다.
    • 하지만 기술적으로 해결이 불가능하여 다른 관점으로 해결하였습니다. < 네이버 플랫폼에 문의 받은 결과 불가능 >
    • 드래그 하면 커스텀 커서가 풀리는 부분도 해결 하였습니다.
  • 2.0.2 버전 배포

📸 스크린샷

커서 모드 변경

normal Mode direction Mode

문구 변경

아래 문구로 변경

📮 관련 이슈

🥕 Reference

https://github.com/navermaps/ios-map-sdk/blob/117017002b9a25d39bcfc2084843ee523e4bb2d9/NaverMapDemo/LocationTrackingViewController.swift#L31

Copy link
Collaborator

@513sojin 513sojin left a comment

Choose a reason for hiding this comment

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

문구 변경, 네이버지도 사용자 경험 개선, 코드 정렬 확인했습니다 !
궁금한거 코멘트 달아뒀는데 시간 여유로울때 답변 주시면 감사하겠습니다 후후


func toDepartureLocationModel(latitude: Double, longitude: Double) -> DepartureLocationModel {
let buildingName = self.addressInfo.buildingName.isEmpty ? "내가 설정한 출발지" : self.addressInfo.buildingName
let buildingName = self.addressInfo.buildingName.isEmpty ? "주소를 알 수 없는 출발지" : self.addressInfo.buildingName
Copy link
Collaborator

Choose a reason for hiding this comment

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

문구 변경 확인했습니다 ~

Comment on lines +355 to +362
override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
// positionMode가 변경될 때 호출됩니다.
if keyPath == "positionMode", object is NMFMapView {
DispatchQueue.main.async { [weak self] in
self?.updateStateName()
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

이 함수는 positionMode에 변경이 생기면 자동으로 호출되는 함수이고
변경된 positionMode에 따라서 setNormalModeLocationOverLay() 혹은 setDirectionModeLocationOverlay()를 호출하는 것으로 이해하면 될까요 ?!

Copy link
Collaborator Author

@thingineeer thingineeer Mar 18, 2024

Choose a reason for hiding this comment

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

네 맞습니다! 아래 observePositionModeChanges() 함수 부분 설명도 들어주시면 감사할 것 같아요!

}

private func observePositionModeChanges() {
map.mapView.addObserver(self, forKeyPath: "positionMode", options: [.new, .old], context: nil)
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

@thingineeer thingineeer Mar 18, 2024

Choose a reason for hiding this comment

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

addObserver로 이벤트 전달을 위에 override 한 observeValue 함수로 전달하는 거예요!
observePositionModeChanges() 함수에서 keyPath "positionMode"를 해놓아서 저게 관찰이 될 때, observeValue() 함수가 호출되는 구조에요!

이 부분 참고하면 많은 도움이 될 것 같아요!
https://github.com/navermaps/ios-map-sdk/blob/117017002b9a25d39bcfc2084843ee523e4bb2d9/NaverMapDemo/LocationTrackingViewController.swift#L31

Copy link
Collaborator

Choose a reason for hiding this comment

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

확인했습니다 ~~ 답장이 늦었지만 감사합니다 명진센세 !!!

@thingineeer thingineeer merged commit cb6292a into Runnect:develop Mar 19, 2024
@thingineeer thingineeer deleted the #262---네이버맵-수정 branch March 19, 2024 15:07
@thingineeer thingineeer added the UX label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fix] #262 - NMaps 유저 편의성을 위한 기능 구현

2 participants