From 3a6813ca148143e7fe9d9394ca240befa192d811 Mon Sep 17 00:00:00 2001 From: sujal-into Date: Tue, 19 Nov 2024 14:37:33 +0545 Subject: [PATCH 1/5] fix: setting zoom level when location not provided --- packages/components/socialFeed/Map/Map.web.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/components/socialFeed/Map/Map.web.tsx b/packages/components/socialFeed/Map/Map.web.tsx index e1ef7c6534..b54174d7af 100644 --- a/packages/components/socialFeed/Map/Map.web.tsx +++ b/packages/components/socialFeed/Map/Map.web.tsx @@ -197,6 +197,7 @@ export const Map: FC = ({ width: "100%", height: "100%", alignSelf: "center", + borderRadius: 20, }, style, ]} @@ -205,8 +206,9 @@ export const Map: FC = ({ center={ consultedPostLocation || creatingPostLocation || DEFAULT_MAP_POSITION } - zoom={12} + zoom={!consultedPostLocation && !creatingPostLocation ? 3 : 12} attributionControl={false} + minZoom={3} > {/*----Loads and displays tiles on the map*/} From 5a6ad3d40aba91346ca2d97d80cc78f10112e285 Mon Sep 17 00:00:00 2001 From: sujal-into Date: Tue, 19 Nov 2024 14:41:08 +0545 Subject: [PATCH 2/5] fix: zoom level set to 2 --- packages/components/socialFeed/Map/Map.web.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/socialFeed/Map/Map.web.tsx b/packages/components/socialFeed/Map/Map.web.tsx index b54174d7af..a38026da8b 100644 --- a/packages/components/socialFeed/Map/Map.web.tsx +++ b/packages/components/socialFeed/Map/Map.web.tsx @@ -206,9 +206,9 @@ export const Map: FC = ({ center={ consultedPostLocation || creatingPostLocation || DEFAULT_MAP_POSITION } - zoom={!consultedPostLocation && !creatingPostLocation ? 3 : 12} + zoom={!consultedPostLocation && !creatingPostLocation ? 2 : 12} attributionControl={false} - minZoom={3} + minZoom={2} > {/*----Loads and displays tiles on the map*/} From 0f43ffe73bf7b1b545cbb19c9de15f3b4e097e96 Mon Sep 17 00:00:00 2001 From: sujal-into Date: Tue, 19 Nov 2024 14:41:37 +0545 Subject: [PATCH 3/5] fix: default map position altered to show the center of the map --- packages/utils/feed/map.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utils/feed/map.ts b/packages/utils/feed/map.ts index f0e5669464..a4c0a5e7e2 100644 --- a/packages/utils/feed/map.ts +++ b/packages/utils/feed/map.ts @@ -13,7 +13,7 @@ import { CustomLatLngExpression, PostCategory } from "@/utils/types/feed"; export const MAP_LAYER_URL = `https://{s}.tile.jawg.io/jawg-dark/{z}/{x}/{y}{r}.png?access-token=${process.env.EXPO_PUBLIC_LEAFLET_MAP_TOKEN}`; // Paris baguette -export const DEFAULT_MAP_POSITION: CustomLatLngExpression = [48.8566, 2.3522]; +export const DEFAULT_MAP_POSITION: CustomLatLngExpression = [20, 0]; const musicPostSvgString = ` From 24266c9da5836cf1a65f58d78c6b1892f66121b0 Mon Sep 17 00:00:00 2001 From: sujal-into Date: Wed, 20 Nov 2024 10:13:52 +0545 Subject: [PATCH 4/5] fix: removed border radius with no incidence --- packages/components/socialFeed/Map/Map.web.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/components/socialFeed/Map/Map.web.tsx b/packages/components/socialFeed/Map/Map.web.tsx index a38026da8b..88b4514813 100644 --- a/packages/components/socialFeed/Map/Map.web.tsx +++ b/packages/components/socialFeed/Map/Map.web.tsx @@ -197,7 +197,6 @@ export const Map: FC = ({ width: "100%", height: "100%", alignSelf: "center", - borderRadius: 20, }, style, ]} From 13a2ed42422e9ff3b5c3e04c41d8b2bd7bf8012f Mon Sep 17 00:00:00 2001 From: sujal-into Date: Wed, 20 Nov 2024 14:03:46 +0545 Subject: [PATCH 5/5] fix: updating the value of default map posiiton --- packages/utils/feed/map.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/utils/feed/map.ts b/packages/utils/feed/map.ts index a4c0a5e7e2..b4642b1909 100644 --- a/packages/utils/feed/map.ts +++ b/packages/utils/feed/map.ts @@ -12,8 +12,8 @@ import { CustomLatLngExpression, PostCategory } from "@/utils/types/feed"; export const MAP_LAYER_URL = `https://{s}.tile.jawg.io/jawg-dark/{z}/{x}/{y}{r}.png?access-token=${process.env.EXPO_PUBLIC_LEAFLET_MAP_TOKEN}`; -// Paris baguette -export const DEFAULT_MAP_POSITION: CustomLatLngExpression = [20, 0]; +// center of the map +export const DEFAULT_MAP_POSITION: CustomLatLngExpression = [0, 0]; const musicPostSvgString = `