A React Native Expo app demonstrating how to display a map with user location and markers using react-native-maps
and expo-location
.
- 🗺️ Displays a map centered on Colombo, Sri Lanka.
- 📍 Shows the user's current location on the map.
- 📌 Includes predefined markers with titles and descriptions.
- 🧭 Supports zooming and panning.
- 💬 Opens a modal with marker details on press.
- 🧭 Navigate to marker location from the modal via external map.
-
Clone the repository:
git clone https://github.com/SasadaSaumya/React-Native-Expo-Maps.git cd React-Native-Expo-Maps
-
Install dependencies:
npm install # or yarn install
-
Install Expo CLI globally if you haven't already:
npm install -g expo-cli
Start the Expo development server:
expo start
You can then run the app on an emulator or your physical device using the Expo Go app.
- react-native-maps – For rendering the map.
- expo-location – To access the device location.
- react-native-modal – (if used) For enhanced modal functionality.
- Linking API – To open external map apps like Google Maps.
- The app requests foreground location permission at launch.
- The initial map region centers around Colombo with custom markers.
- Marker click opens a styled modal with title, description, and a button to open external maps for directions.
Feel free to contribute, suggest improvements, or raise issues!
Author: Sasanda Saumya
GitHub: https://github.com/SasadaSaumya