This project is a web application built with React and Vite that uses Mapbox GL for interactive maps.
- Interactive map with Mapbox GL JS
- Geolocation control to track the user's location
- Search functionality with Mapbox Geocoder
- Displays the nearest pharmacy based on the user's current location or a specified location.
- Environment variables with Vite
-
Clone the repository:
git clone https://github.com/jonexist/react-webmap.git
-
Navigate into the project directory:
cd react-webmap
-
Install the dependencies
npm install
-
Set up the environment variables:
Create a .env file in the root of your project and add the following variables:
VITE_MAPBOX_ACCESS_TOKEN=your_mapbox_access_token
Replace your_mapbox_access_token with your actual Mapbox access token.
-
Start the development server:
npm run dev