Live demo: https://imagewize.github.io/id-mrt-map/ (GitHub Pages, served from this repo) · Repo: https://github.com/imagewize/id-mrt-map
An interactive, open-source map of all 13 stations of the Jakarta MRT North–South Line (M1) — from Bundaran HI in Central Jakarta to Lebak Bulus in South Jakarta (15.9 km, opened 24 March 2019).
The map is built with OpenLayers (vendored locally, MIT) on top of OpenStreetMap base tiles. The MRT track alignment and station positions come straight from OpenStreetMap data via the Overpass API, so the line you see is the real rail alignment, not straight lines between stations.
- Full North–South Line (M1) drawn in the official MRT red (
#CE0037) with the real track geometry from OSM - All 13 operating stations as spot markers with labels, in line order
- Under-construction Phase 2A extension (Bundaran HI – Kota, 7 stations) shown as a dashed red line with lighter, hollow station markers — trial runs from June 2027, full opening targeted 2028–29
- Planned East–West Line (Tomang – Medan Satria) shown as a dash-dot yellow line with a dark casing, so it stays visible on OSM's yellow roads and is distinguishable from the dashed red Phase 2A without relying on colour alone (OSM has its track geometry but no station nodes yet, so no markers) — main construction from 2026 (international tender awarded 2026), opening targeted 2031; legend rows carry these target dates (as of Nov 2026)
- Line switcher (top centre) to isolate one line — All / M1 / 2A / East–West; deep-linkable via
#line=eastwest - Legend in the side panel explaining solid vs dashed/dash-dot lines and markers
- Station list panel — click a station to fly to it; hover to highlight it on the map
- Click any station marker for a popup with the official (sponsored) station name, station code, status, coordinates and a link to the OSM node
- Three keyless OpenStreetMap-based base styles: OSM Standard (default), HOT (light humanitarian style), OpenTopoMap
- Scale bar, zoom controls, ESC or click-away to close the popup
- No build step and no runtime dependencies to install — the OpenLayers library is vendored in
vendor/, soindex.htmlworks when opened directly (file://) or from any static host
Serve the folder with any static file server, then open it in a browser:
# PHP (built in)
php -S 127.0.0.1:8000
# or Python (built in)
python3 -m http.server 8000
# or Node
npx serve .Then visit http://127.0.0.1:8000.
Tip: prefer serving over HTTP rather than opening
index.htmlviafile://. OpenStreetMap's tile usage policy blocks requests that send noRefererheader (which is whatfile://pages do), so the background map tiles may show "Access blocked" when opened directly from disk. Station data and the MRT line are local and always render. Once published on GitHub Pages (or any real domain) tiles load fine.
Base map tiles are loaded from the network (OpenStreetMap tile servers), so an internet connection is needed for the background map; the station data itself is local. No API key is required — OSM tiles are free with attribution.
- Stations as spots (dots) — the default. In
js/app.jsthe marker style usesnew ol.style.Circle({ radius, fill, stroke }). - Stations as squares — swap that for
new ol.style.RegularShape({ points: 4, radius, angle: Math.PI / 4, fill, stroke })(there is a commented example right above the circle injs/app.js). - Change the line colour via
line.colorinjs/stations.js(official MRT red is#CE0037), or restyle the line injs/app.js(lineCasing/lineCorelayers).
id-mrt-map/
├── index.html # the map page
├── css/style.css # poster-style theme (cream paper, ink, MRT red)
├── js/
│ ├── app.js # map logic (OpenLayers)
│ ├── stations.js # the 13 stations: names, codes, coordinates, OSM node ids
│ └── track.js # MRT track geometry from OSM (array of [lon, lat] segments)
├── data/
│ ├── stations.geojson # all 20 stations (13 operating + 7 under construction) as GeoJSON
│ └── mrt-lines.geojson # all mapped MRT lines (M1, Phase 2A, East–West) as MultiLineStrings
├── vendor/openlayers/ # OpenLayers v10.6.1 (ol.js + ol.css), MIT
└── README.md
data/*.geojson is handy if you want to reuse the stations/line in QGIS, geojson.io, another map library, etc.
Station coordinates and the track geometry were pulled from OpenStreetMap (© OpenStreetMap contributors, ODbL) with the Overpass API on 2026-11-28:
# operating stations (operator "MRT Jakarta", railway=station, station=subway)
node["railway"="station"]["station"="subway"]["operator"~"MRT"](-6.33,106.68,-6.15,106.88);
out center tags;
# under-construction Phase 2A stations (station=subway, operator MRT, not yet railway=station)
node["station"="subway"]["operator"~"MRT"](-6.45,106.55,-5.95,107.05);
out center tags;
# track geometry, all MRT ways (operating / construction / proposed)
way["name"~"MRT Jakarta"](-6.45,106.55,-5.95,107.05);
out geom tags;
To refresh the data, re-run those queries against https://overpass-api.de/ and regenerate js/stations.js, js/track.js and data/*.geojson. Line colours come from the OSM route relations (#CE0037 North–South, #FFC000 East–West).
- Station/track data: © OpenStreetMap contributors (ODbL)
- Base map tiles: © OpenStreetMap contributors (standard tiles, HOT style via tile.openstreetmap.fr, OpenTopoMap)
- Map library: OpenLayers v10.6.1 (MIT), vendored in
vendor/openlayers/ - Visual inspiration: Imam Hambali's Day 24 "Network" map for #30DayMapChallenge (also OpenStreetMap-based)
Code in this repository is MIT licensed. Map data remains © OpenStreetMap contributors under ODbL — keep the attribution when you reuse it.
