[BUG]: isZoomGesturesEnabled, isShowZoomControls 항상 true
Is there an existing issue for this?
- [x] I have searched the existing issues
Version of @mj-studio/react-native-naver-map
2.2.0
Version of react-native
0.76.7
What os are you seeing the problem on?
iOS
What device types are you seeing the problem on?
Simulator
What architecture types of react native are you seeing the problem on?
New Architecture(Fabric)
Version of device(android API, iOS OS version, etc...)
18.2
Expo App
- [ ] I am using Expo
What happened?
isShowZoomControls를 false로 해도 항상 보입니다.
Relevant a package.json.
Relevant log output
Reproducible Sample Repository
https://github.com/mym0404/react-native-naver-map
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
네이버맵 sdk에서는 기본값이 Yes로 되어있는데 이 라이브러리에선 기본값을 No라고 생각하고 있었어서 발생한 이슈로 보입니다. 해당부분 네이티브 코드를 확인해보시면 될 것 같습니다. @soo9028
@mj-studio+react-native-naver-map+2.3.0.patch
첫번째 비교 연산을 예외처리하면 될거 같습니다.
diff --git a/node_modules/@mj-studio/react-native-naver-map/ios/RNCNaverMapView.mm b/node_modules/@mj-studio/react-native-naver-map/ios/RNCNaverMapView.mm
index a90790f..63f3b13 100644
--- a/node_modules/@mj-studio/react-native-naver-map/ios/RNCNaverMapView.mm
+++ b/node_modules/@mj-studio/react-native-naver-map/ios/RNCNaverMapView.mm
@@ -157,8 +157,14 @@ using namespace facebook::react;
[_view setShowLocationButton:next.isShowLocationButton];
if (prev.isShowScaleBar != next.isShowScaleBar)
[_view setShowScaleBar:next.isShowScaleBar];
- if (prev.isShowZoomControls != next.isShowZoomControls)
+
+ // https://github.com/mym0404/react-native-naver-map/issues/119 이슈로 인한 임시대응
+ static BOOL isFirstZoomControlsSet = YES;
+
+ if (isFirstZoomControlsSet || prev.isShowZoomControls != next.isShowZoomControls) {
[_view setShowZoomControls:next.isShowZoomControls];
+ isFirstZoomControlsSet = NO;
+ }
if (prev.logoAlign != next.logoAlign) {
if (next.logoAlign == RNCNaverMapViewLogoAlign::TopLeft)
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 2 days.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 2 days.