diff --git a/android/src/main/java/map/naver/plugin/net/lbstech/naver_map_plugin/NaverMapController.java b/android/src/main/java/map/naver/plugin/net/lbstech/naver_map_plugin/NaverMapController.java index 1faa1f8..ea04654 100644 --- a/android/src/main/java/map/naver/plugin/net/lbstech/naver_map_plugin/NaverMapController.java +++ b/android/src/main/java/map/naver/plugin/net/lbstech/naver_map_plugin/NaverMapController.java @@ -64,6 +64,7 @@ public class NaverMapController implements private boolean disposed = false; private MethodChannel.Result mapReadyResult; private int locationTrackingMode; + private List paddingData; private final Float density; @@ -125,8 +126,10 @@ public void onMapReady(@NonNull NaverMap naverMap) { naverMap.addOnCameraChangeListener(listeners); naverMap.addOnCameraIdleListener(listeners); naverMap.setLocationSource(new FusedLocationSource(activity, 0xAAFF)); - setLocationTrackingMode(locationTrackingMode); + /// 초기 설정값 빈영 + setLocationTrackingMode(locationTrackingMode); + setContentPadding(paddingData); // 맵 완전히 만들어진 이후에 오버레이 추가. // - 패스 @@ -574,7 +577,11 @@ public void setLocationButtonEnable(boolean locationButtonEnable) { @Override public void setContentPadding(List paddingData) { - if (naverMap == null || paddingData.size() < 4) return; + if (paddingData == null || paddingData.size() < 4) return; + if (naverMap == null) { + this.paddingData = paddingData; + return; + } int left = Math.round(Convert.toFloat(paddingData.get(0)) * density); int top = Math.round(Convert.toFloat(paddingData.get(1)) * density); int right = Math.round(Convert.toFloat(paddingData.get(2)) * density);