This project is a web-based application for exploring hiking trails like the Cascade Head Trail. It provides detailed trail information, interactive maps, elevation charts, weather data, and images of the trail.
- Displays key trail details such as:
- Name, length, elevation, and location.
- Difficulty level, seasons, and hike type.
- Comprehensive description of the trail.
- Mapbox integration for visualizing the trail.
- Features include:
- Hillshading and terrain view.
- Interactive popups displaying distance and elevation.
- Hover effects to highlight specific trail points.
- Chart.js integration to display elevation profiles.
- Interactive chart synced with the map to show corresponding points.
- Fetches real-time weather data based on the trail's location.
- Displays current temperature, weather conditions, and more.
- Gallery of trail images organized in rows for easy viewing.
- Responsive design to adapt to different screen sizes.
/src
├── assets
│ └── images
│ └── cascadeHead
├── components
│ ├── Cards.jsx
│ ├── Dashboard.jsx
│ ├── Footer.jsx
│ ├── Header.jsx
│ ├── StaticMap.jsx
│ ├── ElevationChart.jsx
│ ├── Weather.jsx
│ └── Images.jsx
├── data
│ ├── cardLinks.js
│ ├── links.js
│ └── trails.js
├── utils
│ └── parseTCX.js
├── App.jsx
├── main.jsx
└── styles.css
Create a .env
file in the root directory and add the following:
VITE_APP_MAPBOX_ACCESS_TOKEN=your_mapbox_token
VITE_APP_WEATHER_API_KEY=your_openweathermap_api_key
Replace your_mapbox_token
and your_openweathermap_api_key
with your actual API keys.
npm run dev
- Start the development server.npm run build
- Build the application for production.npm run preview
- Preview the production build locally.
- React: Frontend framework.
- Vite: Fast build tool.
- Mapbox GL JS: Interactive map integration.
- Chart.js: Elevation chart.
- OpenWeatherMap API: Real-time weather data.
- CSS: Custom styles with responsiveness.
-
Build the application:
npm run build
-
Deploy the contents of the
dist
folder to a hosting platform like Netlify, Vercel, or GitHub Pages.
Trail.mp4
Happy Hiking! 🌲🏔️