/mrt_map

An interactive transport map (based on Singapore MRT map) that utilises shortest path algorithm

Primary LanguageJavaScript

Create an interactive transport system map with shortest path algorithm

This repository contains python and JavaScript codes for demonstrating on how to create an interactive transport system map with shortest path algorithm. This particular repo use Singapore MRT system map as an example. The python codes are responsible for calculate the shortest path between two stations the user chosen (by clicking on the map), and return the calculated result back to browser. The JavaScript generates the map and handle the user interaction.

For more details about the codes, refer to my blog post How to create an interactive transport system map with shortest path algorithm.

How to use it

Run the python script to create a python internal build-in web server:

$ python app.py
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

Point the browser to http://127.0.0.1:5000.

Live Demonstration

A live demonstration is hosted at SMRT Interactive Map.