Added map screen + other stuff

This commit is contained in:
Alexis Leboeuf
2025-11-06 16:38:35 +01:00
parent 132c70e711
commit 6e2860318f
7 changed files with 103 additions and 29 deletions

41
app/(tabs)/mapScreen.tsx Normal file
View File

@@ -0,0 +1,41 @@
// MapScreen.tsx
import React from 'react';
import { StyleSheet, View, Dimensions } from 'react-native';
import MapView, { Marker, PROVIDER_DEFAULT } from 'react-native-maps';
const MapScreen: React.FC = () => {
const region = {
latitude: 48.8566,
longitude: 2.3522,
latitudeDelta: 0.05,
longitudeDelta: 0.05,
};
return (
<View style={styles.container}>
<MapView
provider={PROVIDER_DEFAULT} // OpenStreetMap
style={styles.map}
region={region}
>
<Marker
coordinate={{ latitude: 48.8566, longitude: 2.3522 }}
title="Paris"
description="Capitale de la France"
/>
</MapView>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
map: {
width: Dimensions.get('window').width,
height: Dimensions.get('window').height,
},
});
export default MapScreen;