-
Notifications
You must be signed in to change notification settings - Fork 6
[Fix] #262 - 사용자 경험 개선을 위한 네이버맵 수정 #264
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
The head ref may contain hidden characters: "#262---\uB124\uC774\uBC84\uB9F5-\uC218\uC815"
Conversation
513sojin
left a comment
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.
문구 변경, 네이버지도 사용자 경험 개선, 코드 정렬 확인했습니다 !
궁금한거 코멘트 달아뒀는데 시간 여유로울때 답변 주시면 감사하겠습니다 후후
|
|
||
| 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 |
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.
문구 변경 확인했습니다 ~
| 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() | ||
| } | ||
| } | ||
| } |
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.
이 함수는 positionMode에 변경이 생기면 자동으로 호출되는 함수이고
변경된 positionMode에 따라서 setNormalModeLocationOverLay() 혹은 setDirectionModeLocationOverlay()를 호출하는 것으로 이해하면 될까요 ?!
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.
네 맞습니다! 아래 observePositionModeChanges() 함수 부분 설명도 들어주시면 감사할 것 같아요!
| } | ||
|
|
||
| private func observePositionModeChanges() { | ||
| map.mapView.addObserver(self, forKeyPath: "positionMode", options: [.new, .old], context: nil) |
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.
addObserver로 이벤트 전달을 위에 override 한 observeValue 함수로 전달하는 거예요!
observePositionModeChanges() 함수에서 keyPath "positionMode"를 해놓아서 저게 관찰이 될 때, observeValue() 함수가 호출되는 구조에요!
이 부분 참고하면 많은 도움이 될 것 같아요!
https://github.com/navermaps/ios-map-sdk/blob/117017002b9a25d39bcfc2084843ee523e4bb2d9/NaverMapDemo/LocationTrackingViewController.swift#L31
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.
확인했습니다 ~~ 답장이 늦었지만 감사합니다 명진센세 !!!
🌱 작업한 내용
📸 스크린샷
커서 모드 변경
문구 변경
📮 관련 이슈
🥕 Reference
https://github.com/navermaps/ios-map-sdk/blob/117017002b9a25d39bcfc2084843ee523e4bb2d9/NaverMapDemo/LocationTrackingViewController.swift#L31