From eb25480919c73af5c02771c6124494f415f7a063 Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Sat, 1 Apr 2023 17:44:58 +0200 Subject: Working app --- modules/Map.js | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 modules/Map.js (limited to 'modules/Map.js') diff --git a/modules/Map.js b/modules/Map.js new file mode 100644 index 0000000..a979424 --- /dev/null +++ b/modules/Map.js @@ -0,0 +1,49 @@ +import MapView, { Marker } from 'react-native-maps' +import * as React from 'react'; +import { View, Text, StyleSheet, TouchableOpacity } from 'react-native'; +import AsyncStorage from "@react-native-async-storage/async-storage"; + +const L_KEY = 'locs_key' + +export default function Home(props) { + const [markers, setMarkers] = React.useState([]) + const startFn = async () => { + setMarkers(JSON.parse(await AsyncStorage.getItem(L_KEY))) + }; + React.useEffect(() => {startFn()}, []) + return ( + + {markers.filter(m => m.c).map(m => { + return + })} + + ) +} + +const styles = StyleSheet.create({ + cont: { + flexDirection: "column", + marginTop: 10, + paddingTop: 10, + backgroundColor: "#3D54BB", + justifyContent: "center", + alignItems: "center", + height: "100%", + }, +}) -- cgit v1.3.1