A React-based benchmarking application for comparing different 3D mapping libraries with Google Photorealistic 3D Tiles integration.
Map Bench allows you to compare the performance and rendering quality of four major mapping libraries, all displaying the same Google Photorealistic 3D Tiles. It also features a data layer system to visualize geospatial information like power lines and religious buildings on top of the 3D terrain.
| Library | Description |
|---|---|
| Mapbox GL JS | Industry-leading WebGL map library with terrain support |
| MapLibre GL | Open-source fork of Mapbox GL JS |
| ArcGIS (ESRI) | Enterprise-grade 3D SceneView with IntegratedMesh3DTilesLayer |
| CesiumJS | High-precision 3D globe for geospatial visualization |
| Leaflet | Lightweight open-source JavaScript library for mobile-friendly interactive maps |
| MapCore | Elbit's MapCore's JavaScript library for geospatial visualization |
Want to add another map provider? Check out our guide on adding new map components.
- ๐ Seamless Map Switching - Switch between mapping libraries while preserving camera position
- ๐ Google 3D Tiles - Photorealistic 3D buildings and terrain from Google Maps Platform
- ๐ Data Layers - Toggleable overlays for geospatial data visualization
- ๐๏ธ 2D/3D Toggle - Switch between flat map view and 3D perspective
- ๐ Location Selector - Pre-configured locations across 4 continents with quality ratings
- ๐ Tile Counter - Real-time display of loaded 3D tiles
- ๐จ Modern UI - Sleek dark theme with smooth animations
The application includes a Layers Panel to visualize additional data sets:
| Layer | Icon | Description | Source |
|---|---|---|---|
| High Voltage Power Lines | โก | Displayed at 15m height to visualize building clearance | OpenStreetMap |
| Religious Buildings | ๐ | Points of interest including Synagogues, Churches, and Mosques | OpenStreetMap |
| Flight Tracking | Real-time aircraft positions with altitude and velocity | OpenSky Network |
The app includes curated locations organized by continent:
- New York (Manhattan, Central Park)
- San Francisco (Golden Gate Bridge, Alcatraz)
- Las Vegas (The Strip)
- Los Angeles (Hollywood, Santa Monica)
- Tel Aviv (Azrieli Towers)
- Jerusalem (Old City, Western Wall)
- Haifa (Bahรก'รญ Gardens)
- Netanya (Beach, Marina)
- London (Big Ben, Tower Bridge)
- Paris (Eiffel Tower, Champs-รlysรฉes)
- Rome (Colosseum, Vatican)
- Barcelona (Sagrada Famรญlia)
- Tokyo (Shinjuku, Tokyo Tower)
- Dubai (Burj Khalifa, Palm)
- Singapore (Marina Bay Sands)
- Hong Kong (Victoria Harbour)
- Node.js 18+
- npm or yarn
- API keys (see below)
-
Clone the repository
git clone https://github.com/moshew/map-bench.git cd map-bench -
Install dependencies
npm install
-
Configure API keys
Copy the example environment file:
cp .env.example .env
Edit
.envand add your API keys:VITE_MAPBOX_TOKEN=your_mapbox_token_here VITE_GOOGLE_API_KEY=your_google_api_key_here VITE_CESIUM_TOKEN=your_cesium_token_here VITE_MAPTILER_KEY=your_maptiler_k VITE_MAPCORE_SERVER_URL=development (http://localhost:5173) or production mapcore server's file VITE_GOOGLE_3D_TILES_URL=https://tile.googleapis.com/v1/3dtiles/root.json VITE_WAYBACK_MAPTILES_WMTS_URL=https://wayback.maptiles.arcgis.com/arcgis/rest/services/world_imagery/mapserver/wmts/1.0.0/wmtscapabilities.xml
-
Run the development server
npm run dev
-
Open in browser
Navigate to
http://localhost:5173
| Service | Required | Get Your Key |
|---|---|---|
| Mapbox | โ Yes | account.mapbox.com |
| Google Maps | โ Yes | console.cloud.google.com |
| Cesium Ion | Optional | cesium.com/ion/tokens |
| MapTiler | Optional | maptiler.com/cloud |
To use Google Photorealistic 3D Tiles, enable these APIs in Google Cloud Console:
- Map Tiles API
- Maps JavaScript API
map-bench/
โโโ src/
โ โโโ App.jsx # Main application component
โ โโโ main.jsx # React entry point
โ โโโ index.css # Global styles
โ โโโ components/
โ โ โโโ LayersPanel.jsx # Data layers control panel
โ โ โโโ LocationSelector.jsx # Location selection sidebar
โ โ โโโ MapToggle.jsx # Map library switcher
โ โ โโโ StatusBar.jsx # Status bar (tile count, etc.)
โ โ โโโ ViewModeToggle.jsx # 2D/3D toggle
โ โโโ dynamic-layers/
โ | โโโ flightTracker.js # Flight tracking dynamic layer
โ โโโ lib/mapcore
| | โโโ mc-api.tsx # MapCore's base component plugin for JavaScript/TypeScript
| | โโโ mc-callbacks.ts # MapCore's base asynchronous plugin
| | โโโ MyEditModeCallback.ts # MapCore's Object world editor logic
| | โโโ utils.ts # MapCore's additional utility functions
โ โโโ maps/
โ โ โโโ MapBox.jsx # Mapbox GL JS implementation
โ โ โโโ MapLibre.jsx # MapLibre GL implementation
โ โ โโโ MapESRI.jsx # ArcGIS/ESRI implementation
โ โ โโโ MapLeaflet.jsx # Leaflet implementation
โ โ โโโ MapCore.jsx # MapCore implementation
โ โ โโโ MapCesium.jsx # CesiumJS implementation
| โโโ types/
| | โโโ MapCore.d.ts # MapCore's API typescript interfaces
โ โโโ utils/
โ โโโ esriStyleConverter.js # Utilities for ESRI styles
โ โโโ mapStyleConfig.js # Map style configurations
โโโ public/
โ โโโ data/ # GeoJSON data files
โ โโโ package/
โ | โโโ MapCore.js # MapCore API JavaScrip library
| | โโโ MapCore.wasm # MapCore API Web Assembly
| | โโโ MapCore.js.symbols # MapCore API Symbols
| | โโโ MapCore.wasm.map # MapCore API Symbol Mapper
| | โโโ MapCoreSymbology*.zip # Uses for NATO 2525 and US DOD App6D Symbyology standards
โ โโโ sprites/ # Map sprites
โ โโโ map-style.json # Custom map style definition
โ โโโ favicon.svg
โโโ scripts/
โ โโโ fetch-power-lines.js # Script to fetch power lines data
โ โโโ fetch-religious-buildings.js # Script to fetch religious buildings data
โโโ index.html
โโโ package.json
โโโ vite.config.js
โโโ .env.example # Environment variables template
โโโ .gitignore
- React 18 - UI framework
- Vite 6 - Build tool and dev server
- Mapbox GL JS 3.8 - WebGL maps
- MapLibre GL 4.7 - Open-source WebGL maps
- ArcGIS JS SDK 4.34 - ESRI mapping platform
- CesiumJS 1.129 - 3D globe visualization
- MapCore 4.12.0-MapBench-beta2 - MapCore API version
- deck.gl 9.1 - Large-scale data visualization
- loaders.gl 4.3 - 3D Tiles and glTF loading
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build- Select a map library using the toggle bar at the top center
- Choose 2D or 3D mode with the button in the top-left corner
- Pick a location from the sidebar on the right
- Navigate the map using mouse/touch controls:
- Left-click + drag: Pan/Rotate
- Right-click + drag: Tilt (pitch)
- Scroll wheel: Zoom
- Shift - Accelerate x10 (In MapCore)
When switching between map libraries, the camera position is preserved:
- Center coordinates (longitude, latitude)
- Zoom level
- Pitch (tilt angle)
- Bearing (rotation)
This allows for direct visual comparison between renderers.
MIT License - feel free to use this project for learning and benchmarking purposes.
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Add new locations
- Improve performance
Created by @moshew
Note: This project is for benchmarking and educational purposes. Make sure to comply with the terms of service of each mapping provider.