The before vesion is based on native js. With the increse of the size of the code, the code become messy. Therefore, the new version is implemented on the basis of create-react-app.
The whole map can be seen as a Map component, and deivde it into 4 child components:
- Label: The text infomation of the map, including station name and line name
- Station: Station, including normal station and transfer station
- Line: Subway line
- InfoCard: The most complex component, including timesheet, washroom position information, entrance infomation and elevator information
npm start
: Run the app in development mode.
npm decploy
: Deploy the build results to gh-pages branch, to display the app.