A Progressive Web App for creating map animations and exporting them as videos.
npm install- Sign up for a free MapTiler account at https://www.maptiler.com/
- Get your API key from the MapTiler dashboard
- Copy
.env.exampleto.env.local:cp .env.example .env.local
- Edit
.env.localand replaceyour_api_key_herewith your actual MapTiler API key:VITE_MAPTILER_API_KEY=your_actual_api_key_here
npm run devOpen http://localhost:5173 in your browser.
- Add Locations: Click anywhere on the map to add numbered markers
- Drag Markers: Click and drag markers to reposition them
- Delete Markers: Click the × button next to a location in the list
- View Country Names: Markers are automatically reverse-geocoded to show country names
- Continue: Click "Next: Preview Animation" when you have at least 2 locations
- Preview: Click "Play" to see the animation
- Animation starts from the opposite hemisphere
- Flies to each country in sequence
- Highlights each country with orange fill
- Ends with a zoom-out showing all countries
- Stop: Click "Stop" to halt the animation mid-sequence
- Export Video: Click "Export Video" to record and download the animation as a
.webmfile
- 📍 Interactive map with click-to-add markers
- 🎯 Numbered, draggable markers with sequential ordering
- 🌍 Automatic reverse geocoding to country names
- 🎬 Smooth camera animations with country highlighting
- 📹 Client-side video export (no server required)
- 📱 Mobile-first, responsive design
- ⚡ Fast and lightweight (~1.2MB bundle)
- React 19 - UI framework
- TypeScript - Type safety
- Vite 7 - Build tool and dev server
- MapLibre GL JS - Map rendering
- MapTiler - Map tiles and geocoding API
- Zustand - State management
- MediaRecorder API - Video export
src/
├── components/
│ ├── map/ # Map-related components
│ │ ├── MapContainer.tsx
│ │ ├── MarkerManager.tsx
│ │ ├── CountryLayer.tsx
│ │ └── AnimationController.tsx
│ └── ui/ # UI components
│ ├── Button.tsx
│ ├── MarkerList.tsx
│ └── ProgressBar.tsx
├── screens/ # Main app screens
│ ├── LocationSelectionScreen.tsx
│ └── AnimationPreviewScreen.tsx
├── hooks/ # Custom React hooks
│ ├── useCountryGeocoding.ts
│ └── useVideoExport.ts
├── store/ # Zustand state stores
│ ├── useMarkerStore.ts
│ └── useAnimationStore.ts
├── services/ # External services
│ ├── maptiler.ts
│ ├── geocoding.ts
│ └── videoExport.ts
├── utils/ # Helper functions
│ └── animationHelpers.ts
├── types/ # TypeScript types
│ ├── marker.types.ts
│ ├── country.types.ts
│ └── animation.types.ts
└── assets/
└── data/
└── countries-110m.geojson # Country boundaries
# Start dev server with HMR
npm run dev
# Type-check and build for production
npm run build
# Preview production build
npm run preview
# Run linter
npm run lint- Chrome/Edge 80+
- Firefox 75+
- Safari 13+
Note: Video export requires MediaRecorder API support. On Safari, you may need to use Safari 14.1+ for WebM video recording.
The app currently includes one animation template:
- Flies to each selected country in sequence
- Highlights each country with semi-transparent orange fill
- Starts from the opposite hemisphere of the first marker
- Ends with a zoom-out showing all selected countries
- Additional animation templates (city spotlight, route animation, etc.)
- PWA offline support with service worker
- Custom animation timing controls
- Multiple video format export options (MP4, GIF)
- Sharing capabilities
MIT