Skip to content

Commit

Permalink
feat: add map with point of user
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasdelecluse committed Sep 10, 2024
1 parent 200bba5 commit 82e7ef4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 81 deletions.
10 changes: 3 additions & 7 deletions apps/expo/src/pages/MapScreen.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
import { View, StyleSheet, ActivityIndicator, Platform } from 'react-native';
import { View, StyleSheet, ActivityIndicator } from 'react-native';
import MapView, { Marker } from 'react-native-maps';
import * as Location from 'expo-location';

Expand Down Expand Up @@ -56,19 +56,15 @@ const MapScreen = () => {
<View style={styles.container}>
<MapView
style={styles.map}
region={{
...region,
latitudeDelta: 0.05,
longitudeDelta: 0.05,
}}
initialRegion={region}
onRegionChangeComplete={setRegion}
>
{userLocation && (
<Marker
coordinate={userLocation}
title="Votre position actuelle"
description="Vous êtes ici"
pinColor="blue" // Couleur du marqueur
pinColor="blue"
/>
)}
</MapView>
Expand Down
82 changes: 8 additions & 74 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 82e7ef4

Please sign in to comment.