Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jonexist/react-webmap
https://github.com/jonexist/react-webmap
mapbox-geocoding-api mapbox-gl-js
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/jonexist/react-webmap
- Owner: jonexist
- Created: 2024-02-10T04:31:11.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-02-20T04:54:00.000Z (12 months ago)
- Last Synced: 2024-02-21T03:38:40.814Z (12 months ago)
- Topics: mapbox-geocoding-api, mapbox-gl-js
- Language: JavaScript
- Homepage: https://react-webmap-mapbox.onrender.com/
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mapbox GL Project
This project is a web application built with React and Vite that uses Mapbox GL for interactive maps.
## Features
- 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## Setup
1. Clone the repository:
```bash
git clone https://github.com/jonexist/react-webmap.git```
2. Navigate into the project directory:
```bash
cd react-webmap```
3. Install the dependencies
```bash
npm install```
4. Set up the environment variables:
Create a .env file in the root of your project and add the following variables:
```bash
VITE_MAPBOX_ACCESS_TOKEN=your_mapbox_access_token
```Replace your_mapbox_access_token with your actual Mapbox access token.
5. Start the development server:
```bash
npm run dev
```