A modern React application that extracts GPS coordinates from image EXIF data (JPEG, HEIC, HEIF) and visualizes them as an interactive heatmap on Google Maps.
- 📸 Image Processing: Upload multiple images (JPEG, HEIC, HEIF) with GPS EXIF data
- 🗺️ Interactive Heatmap: Visualize location data on Google Maps with heatmap overlay
- 🎯 Smart Centering: Automatically centers and zooms map based on data points
- 📊 Data Management: View processed images, coordinates, and manage your dataset
- 🚫 Error Handling: Comprehensive error reporting for failed uploads
- 📱 Responsive Design: Works seamlessly on desktop and mobile devices
- ⚡ Modern Performance: Built with React 19, TypeScript, and Vite for optimal speed
- Frontend: React 19 with TypeScript
- Build Tool: Vite
- Maps: Google Maps JavaScript API with @vis.gl/react-google-maps
- Image Processing: ExifReader for GPS coordinate extraction (supports JPEG, HEIC, HEIF)
- Testing: Vitest + React Testing Library
- Styling: Modern CSS with responsive design
- Code Quality: ESLint, Prettier, TypeScript strict mode
- Node.js 18+ and npm
- Google Maps JavaScript API key with Visualization library enabled
-
Clone the repository
git clone <repository-url> cd heatmap
-
Install dependencies
npm install
-
Set up Google Maps API key
cp .env.example .env.local # Edit .env.local and add your Google Maps API key -
Start development server
npm run dev
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run test- Run testsnpm run test:ui- Run tests with UInpm run test:coverage- Run tests with coveragenpm run lint- Lint codenpm run lint:fix- Fix linting issuesnpm run format- Format code with Prettiernpm run type-check- Check TypeScript types
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable the Maps JavaScript API
- Create credentials (API Key)
- Restrict the API key to your domain
- Add the key to
.env.local:VITE_GOOGLE_MAPS_API_KEY=your_api_key_here
- Upload Images: Drag and drop or click to select JPEG images with GPS data
- View Processing: Monitor upload progress and see any errors
- Explore Map: Interactive heatmap shows your location data
- Manage Data: Remove individual images or clear all data
- Export: View coordinates and file information in the data summary
src/ ├── components/ # React components │ ├── Map.tsx # Google Maps integration │ ├── HeatmapLayer.tsx # Heatmap visualization │ ├── FileUpload.tsx # File upload with drag-drop │ ├── DataSummary.tsx # Data management │ └── ErrorBoundary.tsx # Error handling ├── hooks/ # Custom React hooks │ ├── useFileProcessor.ts # File processing logic │ └── useAppState.ts # Application state ├── utils/ # Utility functions │ ├── coordinates.ts # GPS coordinate utilities │ └── exif.ts # EXIF data processing └── types/ # TypeScript definitions - Custom Hooks: State management with React 19 hooks instead of Redux
- TypeScript: Full type safety throughout the application
- Modern Testing: Vitest + React Testing Library for fast, reliable tests
- Error Boundaries: Graceful error handling and recovery
- Responsive Design: Mobile-first CSS with flexible layouts
The application includes comprehensive tests:
# Run all tests npm run test # Run tests with coverage npm run test:coverage # Run tests in watch mode npm run test:watchTest coverage includes:
- Utility functions (coordinate conversion, validation)
- Component rendering and interaction
- Custom hooks behavior
- Error handling scenarios
- JPEG/JPG: Images with EXIF GPS data
- GPS Requirements: Latitude and longitude coordinates in EXIF data
- Multiple Files: Batch upload and processing
The application provides detailed error feedback for:
- Missing GPS data in images
- Invalid coordinate values
- Unsupported file formats
- Network or processing errors
- Application crashes (Error Boundary)
- Fast Development: Vite's esbuild for instant hot reload
- Optimized Builds: Tree shaking and code splitting
- Efficient Processing: Concurrent image processing with limits
- Memory Management: Proper cleanup of map layers and event listeners
ISC License
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run linting and tests
- Submit a pull request
For issues and questions, please check the error messages in the application or review the browser console for detailed debugging information.