From 4fa760a6c59cb98f27777208edc8f2334b19874c Mon Sep 17 00:00:00 2001 From: GabrielTrettel Date: Mon, 8 Mar 2021 18:39:54 -0300 Subject: [PATCH] Map focus in Brasil while loading user location --- src/app/screens/MapFeedScreen.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/app/screens/MapFeedScreen.js b/src/app/screens/MapFeedScreen.js index ce8e42d..409c94e 100644 --- a/src/app/screens/MapFeedScreen.js +++ b/src/app/screens/MapFeedScreen.js @@ -11,16 +11,19 @@ import attachFocusToQuery from "../hooks/useFocus"; import { CurrentLocationContext } from "../context/CurrentLocationContext"; function MapFeedScreen(props) { - const context = useContext(CurrentLocationContext); const location = context.currentCoordinates; - //const context = useContext(CurrentLocationContext) - const hasToQuery = attachFocusToQuery(); const markers = useMarkers(hasToQuery); - // console.log(markers); + const default_location = { + latitude: -12.901799, + longitude: -51.692116, + latitudeDelta: 70, + longitudeDelta: 70 * (screen_width / screen_height), + }; + const map_scale = 0.003; const lat_long_delta = { latitudeDelta: map_scale, @@ -32,11 +35,7 @@ function MapFeedScreen(props) {