A dynamic world map that displays random cat photos as animated popups across major cities around the world.
- Interactive Map: Built with MapLibre GL JS for smooth vector tile rendering
- Random Cat Photos: Uses the cataas.com API for diverse cat images
- Animated Popups: Cat photos appear with a falling animation and fade effects
- Geographic Variety: Covers 40+ major cities across Europe and the US
- Realistic Positioning: Small coordinate variations make photos appear from different locations within each city
- Camera-like Aspect Ratios: Images use realistic portrait, landscape, and square formats
- Clone or download this repository
- Open
index.html
in a web browser - Watch as cat photos randomly appear and disappear across the map
index.html
- Main HTML file with MapLibre GL JS setupscript.js
- JavaScript logic for map initialization and cat popup systemstyle.css
- Styling for the map and popup animations
The application:
- Initializes a MapLibre GL JS map with a dark theme
- Randomly selects cities from a predefined list
- Adds small coordinate variations for realistic positioning
- Preloads cat images before showing popups
- Animates popups with fade-in and falling effects
- Automatically removes popups after a random duration
- Cities: Add or modify city coordinates in the
cities
array inscript.js
- Animation: Adjust timing and effects in
style.css
- Images: Replace the cat image service with any other image API
- Frequency: Modify the interval timing in the
setInterval
call
- MapLibre GL JS - Open-source mapping library
- cataas.com - Cat-as-a-Service API for placeholder images
- Vanilla JavaScript and CSS
This project is open source and available under the MIT License.