mym0404/react-native-naver-map

[BUG]: setLocationTrackingMode 작동안하는 현상

goldenwalnut opened this issue · 2 comments

Is there an existing issue for this?

  • I have searched the existing issues

Version of @mj-studio/react-native-naver-map

1.5.10

Version of react-native

0.75.2

What os are you seeing the problem on?

Android

What device types are you seeing the problem on?

Physcial Device

What architecture types of react native are you seeing the problem on?

Old Architecture(Bridge)

Version of device(android API, iOS OS version, etc...)

No response

Expo App

  • I am using Expo

What happened?

안녕하세요~!
ref.current?.setLocationTrackingMode('None' | 'NoFollow' | 'Follow' | 'Face');

트래킹 모드 작동하지 않습니다~!

Relevant a package.json.

No response

Relevant log output

No response

Reproducible Sample Repository

아직 없습니다

Code of Conduct

  • I agree to follow this project's Code of Conduct

#54

동일한 이슈같네요.

setupLocationSource를 setIsShowLocationbutton에서 호출하기 때문에 isShowLocationButton={true} 로 해야 동작할 듯 싶습니다.

@goldenwalnut RNCNaverMapViewManager.kt 파일에 있는 setLocationTrackingMode 함수 부분을 아래 코드로 교체 해 주시면 작동합니다.

override fun setLocationTrackingMode(
    view: RNCNaverMapViewWrapper?,
    mode: String?,
  ) = view.withMapView {
    mapView -> mapView.setupLocationSource()
    mapView.withMap {
      it.locationTrackingMode =
        when (mode) {
          "NoFollow" -> LocationTrackingMode.NoFollow
          "Follow" -> LocationTrackingMode.Follow
          "Face" -> LocationTrackingMode.Face
          else -> LocationTrackingMode.None
        }
    }
  }