Skip to content

Commit

Permalink
0.9.4 waiting for iOS code update
Browse files Browse the repository at this point in the history
  • Loading branch information
curtspec committed Feb 26, 2021
1 parent 4a67a2f commit 0a06047
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public class NaverMapController implements
private boolean disposed = false;
private MethodChannel.Result mapReadyResult;
private int locationTrackingMode;
private List<Double> paddingData;

private final Float density;

Expand Down Expand Up @@ -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);

// 맵 완전히 만들어진 이후에 오버레이 추가.
// - 패스
Expand Down Expand Up @@ -574,7 +577,11 @@ public void setLocationButtonEnable(boolean locationButtonEnable) {

@Override
public void setContentPadding(List<Double> 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);
Expand Down
1 change: 1 addition & 0 deletions example/lib/padding_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class _PaddingTestState extends State<PaddingTest> {
onMapCreated: _onMapCreated,
initLocationTrackingMode: LocationTrackingMode.Follow,
locationButtonEnable: true,
contentPadding: EdgeInsets.only(left: 150),
),
Align(
alignment: Alignment.bottomCenter,
Expand Down

0 comments on commit 0a06047

Please sign in to comment.