From eb4265702da585dce86ac2c5506c691cd0e449d3 Mon Sep 17 00:00:00 2001 From: Krishna Gupta Date: Wed, 3 Jul 2024 05:01:39 +0530 Subject: [PATCH 1/4] fix: iOS - Distance - Center icon overlaps with compass icon. Signed-off-by: Krishna Gupta --- src/components/MapView/MapView.tsx | 4 +++- src/styles/utils/positioning.ts | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/MapView/MapView.tsx b/src/components/MapView/MapView.tsx index 283f7c396edb..f4475c83d75b 100644 --- a/src/components/MapView/MapView.tsx +++ b/src/components/MapView/MapView.tsx @@ -207,7 +207,9 @@ const MapView = forwardRef( onTouchStart={() => setUserInteractedWithMap(true)} pitchEnabled={pitchEnabled} attributionPosition={{...styles.r2, ...styles.b2}} - scaleBarEnabled={false} + scaleBarEnabled + compassEnabled + compassPosition={{...styles.l2, ...styles.t8}} logoPosition={{...styles.l2, ...styles.b2}} // eslint-disable-next-line react/jsx-props-no-spreading {...responder.panHandlers} diff --git a/src/styles/utils/positioning.ts b/src/styles/utils/positioning.ts index 5e0169990499..6731b0ebc58f 100644 --- a/src/styles/utils/positioning.ts +++ b/src/styles/utils/positioning.ts @@ -22,6 +22,9 @@ export default { t0: { top: 0, }, + t8: { + top: 32, + }, tn4: { top: -16, }, From 7010100f69259dcf17c4e57e50cc708c0df0212e Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Mon, 15 Jul 2024 02:54:07 +0530 Subject: [PATCH 2/4] remove scale bar. Signed-off-by: krishna2323 --- src/components/MapView/MapView.tsx | 5 +++-- src/styles/utils/positioning.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/MapView/MapView.tsx b/src/components/MapView/MapView.tsx index b42714a7f2f0..5adbf1933008 100644 --- a/src/components/MapView/MapView.tsx +++ b/src/components/MapView/MapView.tsx @@ -213,9 +213,10 @@ const MapView = forwardRef( onTouchStart={() => setUserInteractedWithMap(true)} pitchEnabled={pitchEnabled} attributionPosition={{...styles.r2, ...styles.b2}} - scaleBarEnabled + scaleBarEnabled={false} + scaleBarPosition={{...styles.tn8, left: 0}} compassEnabled - compassPosition={{...styles.l2, ...styles.t8}} + compassPosition={{...styles.l2, ...styles.t5}} logoPosition={{...styles.l2, ...styles.b2}} // eslint-disable-next-line react/jsx-props-no-spreading {...responder.panHandlers} diff --git a/src/styles/utils/positioning.ts b/src/styles/utils/positioning.ts index 6731b0ebc58f..c266a7469bc2 100644 --- a/src/styles/utils/positioning.ts +++ b/src/styles/utils/positioning.ts @@ -22,8 +22,8 @@ export default { t0: { top: 0, }, - t8: { - top: 32, + t5: { + top: 20, }, tn4: { top: -16, From d43f443e864705f4dc0a557a3b2df7985f94d6e0 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Mon, 15 Jul 2024 02:55:53 +0530 Subject: [PATCH 3/4] add comment. Signed-off-by: krishna2323 --- src/components/MapView/MapView.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/MapView/MapView.tsx b/src/components/MapView/MapView.tsx index 5adbf1933008..dd74f91f6ee9 100644 --- a/src/components/MapView/MapView.tsx +++ b/src/components/MapView/MapView.tsx @@ -214,6 +214,7 @@ const MapView = forwardRef( pitchEnabled={pitchEnabled} attributionPosition={{...styles.r2, ...styles.b2}} scaleBarEnabled={false} + // scaleBarEnabled={false} will not work on iOS, top: -32 is to hide the scale bar on iOS scaleBarPosition={{...styles.tn8, left: 0}} compassEnabled compassPosition={{...styles.l2, ...styles.t5}} From 9b5c74d74b6d5f8a4fbbd769d820f568732c85c1 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Tue, 16 Jul 2024 18:34:09 +0530 Subject: [PATCH 4/4] minor update. Signed-off-by: krishna2323 --- src/components/MapView/MapView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MapView/MapView.tsx b/src/components/MapView/MapView.tsx index dd74f91f6ee9..59102e55c930 100644 --- a/src/components/MapView/MapView.tsx +++ b/src/components/MapView/MapView.tsx @@ -214,7 +214,7 @@ const MapView = forwardRef( pitchEnabled={pitchEnabled} attributionPosition={{...styles.r2, ...styles.b2}} scaleBarEnabled={false} - // scaleBarEnabled={false} will not work on iOS, top: -32 is to hide the scale bar on iOS + // We use scaleBarPosition with top: -32 to hide the scale bar on iOS because scaleBarEnabled={false} not work on iOS scaleBarPosition={{...styles.tn8, left: 0}} compassEnabled compassPosition={{...styles.l2, ...styles.t5}}