An interactive Old School RuneScape world map built with Next.js, React-Leaflet, and TypeScript. Explore the world of Gielinor with authentic map tiles generated from the actual game cache.
- 🗺️ Interactive Map: Fully interactive map with zoom, pan, and click coordinates
- 🎯 Accurate Coordinates: Proper OSRS coordinate transformations (Leaflet ↔ Region ↔ Tile)
- 🎨 Authentic Rendering: Real OSRS tiles generated from actual game cache data
- 🏗️ Multiple Planes: Support for surface, underground, and sky levels
- 📱 Responsive Design: Modern, mobile-friendly UI built with Tailwind CSS
- ⚡ Fast Performance: Optimized tile serving with Next.js API routes
- Node.js 18+
- npm or yarn
- Docker (for tile generation)
- Clone and install:
git clone https://github.com/yourusername/osrs-world-map.git
cd osrs-world-map
npm install- Run development server:
npm run dev- Open in browser: http://localhost:3000
The easiest way to deploy is using Vercel:
Or manually:
npm run build
# Deploy the .next folder to your hosting providerTo use actual OSRS map data instead of placeholder tiles:
- Prerequisites: Docker and Python 3 installed
- Clean build (recommended):
npm run clean
npm run build:with-tilesOr generate tiles only:
./scripts/generate-tiles.shNote: This downloads the latest OSRS cache (~500MB) and generates tiles for all planes. The process can take 1-3 hours depending on your system.
The application handles three coordinate systems:
- Leaflet Coordinates (lng, lat): Map library coordinates
- OSRS Region Coordinates (regionX, regionY): Each region is 64x64 game tiles
- OSRS Tile Coordinates: Individual tiles with region + local position (0-63)
- OSRSMap: Main map component using React-Leaflet
- Coordinate Utilities: Transform between different coordinate systems
- Cache Colors: Handle OSRS HSL to RGB color conversion
- Tile API: Custom API route for generating map tiles
src/
├── app/
│ ├── api/tiles/[z]/[x]/[y]/route.ts # Tile serving API
│ ├── globals.css # Global styles
│ ├── layout.tsx # Root layout
│ └── page.tsx # Main page
├── components/
│ ├── OSRSMap.tsx # Map component
│ └── MapSidebar.tsx # Interactive sidebar
└── lib/
├── coordinates.ts # Coordinate transformations
└── cacheColors.ts # OSRS color utilities
tile_generator/
├── src/
│ └── tile_generator.py # Python tile generator
├── java/
│ └── src/main/java/org/explv/mapimage/
│ └── Main.java # Java map image generator
├── Dockerfile # Docker container config
└── requirements.txt # Python dependencies
scripts/
└── generate-tiles.sh # Tile generation script
The map supports standard interactions:
- Zoom: Mouse wheel or zoom controls
- Pan: Click and drag
- Click: Click anywhere to see coordinates
When you click on the map, you'll see:
- Leaflet coordinates (map library coordinates)
- OSRS Region coordinates
- OSRS Tile coordinates (region + local tile position)
- Custom Overlays: Add markers, shapes, or other overlays using React-Leaflet components
- Real Cache Data: Replace the placeholder tile generation with actual OSRS cache data using
osrscachereader - Map Layers: Add different map layers (surface, underground, etc.)
The current tile generation is a placeholder. For production use:
- Use
osrscachereaderto load actual OSRS cache data - Implement proper underlay/overlay rendering
- Add height-based shading and textures
- Cache generated tiles for performance
- Next.js 14: React framework with App Router
- React-Leaflet: React components for Leaflet maps
- TypeScript: Type-safe JavaScript
- Tailwind CSS: Utility-first CSS framework
- Leaflet: Interactive map library
- RuneLite Cache: OSRS cache reading and tile generation
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is for educational purposes. RuneScape is a trademark of Jagex Ltd.
- RuneLite: MapImageDumper implementation
- OSRS Wiki: Coordinate system documentation
- Explv's Map: Tile generation inspiration
- OpenRS2: OSRS cache archive
Add screenshots of your map in action here
Disclaimer: This project is not affiliated with or endorsed by Jagex Ltd. RuneScape is a trademark of Jagex Ltd.