A React application that displays architectural data on an interactive map. Each entry from data.json is shown as a point on the map with detailed information available in popups.
- Interactive map using MapLibre GL and React Map GL
- All architectural locations from
data.jsondisplayed as markers - Clickable markers with popups showing:
- Photo (when available)
- Title
- Author(s)
- City
- Country
- Date
- Automatic map bounds adjustment to show all markers
- Responsive design
- Install dependencies:
npm install-
Make sure
data.jsonis in thepublicfolder (it should already be there) -
Start the development server:
npm run dev- Open your browser to the URL shown in the terminal (usually
http://localhost:5173)
npm run buildThe built files will be in the dist folder.
This project is configured for automatic deployment to GitHub Pages using GitHub Actions.
-
Push your code to GitHub (if you haven't already):
git add . git commit -m "Setup GitHub Pages deployment" git push origin main
-
Enable GitHub Pages:
- Go to your repository on GitHub
- Navigate to Settings → Pages
- Under Source, select GitHub Actions
- Save
-
(Optional) Configure Mapbox Secrets (only if using vector tiles):
- Go to Settings → Secrets and variables → Actions
- Add the following secrets if you want to use Mapbox vector tiles:
VITE_MAPBOX_ACCESS_TOKEN- Your Mapbox access tokenVITE_MAPBOX_TILESET_ID- Your Mapbox tileset IDVITE_MAPBOX_SOURCE_LAYER- Your source layer name (e.g.,data)VITE_USE_VECTOR_TILES- Set totrueto use vector tiles
- If you don't add these secrets, the app will use local GeoJSON mode
-
The workflow will automatically deploy on every push to
mainbranch
Your site will be available at: https://yourusername.github.io/archmap/
(Replace yourusername and archmap with your actual GitHub username and repository name)
archmap/
├── public/
│ └── data.json # Architectural data
├── src/
│ ├── App.jsx # Main app component
│ ├── App.css # App styles
│ ├── Map.jsx # Map component with markers
│ ├── main.jsx # Entry point
│ └── index.css # Global styles
├── index.html # HTML template
├── package.json # Dependencies
└── vite.config.js # Vite configuration
- React 18
- Vite
- React Map GL
- MapLibre GL
- Carto Positron basemap