From 6acaa7377767d7e6777e5e0de1348f72ce000fef Mon Sep 17 00:00:00 2001 From: Ota Prokopec Date: Thu, 3 Nov 2022 19:13:01 +0100 Subject: [PATCH] map fixed --- src/lib/Components/game/Map/Circle.svelte | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/Components/game/Map/Circle.svelte b/src/lib/Components/game/Map/Circle.svelte index acb51e4..6876053 100644 --- a/src/lib/Components/game/Map/Circle.svelte +++ b/src/lib/Components/game/Map/Circle.svelte @@ -4,13 +4,14 @@ export let lat = null export let lng = null - export let round = (1 / 110.574 / 1000) * 12 * 5222525 //cca 12m nutno pozměnit!!!!!!!!!! tento komentář nemazat + export let round = (1 / 110.574 / 1000) * 12 //cca 12m nutno pozměnit!!!!!!!!!! tento komentář nemazat + console.log({ round, lat, lng }) export let user = { lat: 0, lng: 0 } const dispatch = createEventDispatcher() - let Mlat = [lat - round, lat + round] - let Mlng = [lng - round, lng + round] + const Mlat = [lat - round, lat + round] + const Mlng = [lng - round, lng + round] $: isIn = user ? user.lat > Mlat[0] && user.lat < Mlat[1] && user.lng > Mlng[0] && user.lng < Mlng[1] : null