Mini Tokyo 3D

repository·master·Indexed 26 days ago

https://github.com/nagix/mini-tokyo-3d

A real-time 3D digital map of Tokyo's public transport system, visualizing train locations, station information, and flight data using data from the Public Transportation Open Data Center. The library provides a Map class for controlling the 3D environment, support for GeoJSON layers via deck.gl, and a plugin system for custom extensions. Version 4.0.0-beta.3 requires Mapbox and ODPT access tokens for initialization.

Tokens
16.6K
Snippets
19
Records
114
Agent score
87%

What's inside mini-tokyo-3d

  1. Overview of Mini Tokyo 3D features

    master

    Mini Tokyo 3D is a real-time 3D digital map of Tokyo's public transport system. Key features include:

    • Real-Time Data: Trains and airplanes operate according to actual timetables and real-time delay information.
    • Railroad Map: Uses official line colors with appropriate offsets based on zoom level.
    • Performance: Optimized to run over 2,200 simultaneous train animations smoothly, including on smartphones.
    • Multilingual Support: Supports English, Japanese, French, Chinese (Simplified and Traditional), and Korean.
    • View Modes: Supports switching between overground and underground railway networks.
    • Route Search: Provides real-time route searches that display multiple candidates based on current train delays on a 3D map.
  2. Identify data sources used in Mini Tokyo 3D

    master

    Mini Tokyo 3D utilizes several external data providers for its visualization and functionality. If you are building on top of this project or investigating its data accuracy, note the following sources:

    Important Note on Public Transportation Data: The data is sourced via the Public Transportation Open Data Center. The accuracy and integrity of this data are not guaranteed. Users should not contact public transportation operators directly regarding the content or behavior of this application.

  3. Explore real-time transportation and weather in Mini Tokyo 3D

    master

    Mini Tokyo 3D visualizes real-time data to provide a realistic view of Tokyo:

    • Real-Time Transit: View trains and airplanes based on actual timetables and real-time delay information.
    • Dynamic Scenery: The map's lighting changes according to Tokyo's sunrise and sunset times.
    • Weather Integration: Real-time rain animations are displayed based on current weather information.
  4. Use Playback Mode

    master

    Playback Mode allows you to view historical or scheduled transit operations instead of real-time data.

    Activation: Click or tap the playback icon button (the icon turns light blue when active).

    Functionality:

    • Data Source: In Playback Mode, trains follow timetables and no real-time information (like delays) is reflected. For airplanes, only flights scheduled for the selected day are displayed.
    • Editing Date & Time: Click the Edit date & time button to enter editing mode. Use the + and - buttons located above/below the year, month, day, hour, minute, and second values to adjust the time. Click OK to confirm or Cancel to revert.
    • Adjusting Playback Speed: Use the + and - buttons to the left and right of the speed indicator. Speed ranges from 1x (real-time) up to 600x. The increments are:
      • 1x to 10x in increments of 1
      • 10x to 100x in increments of 10
      • 100x to 600x in increments of 100.

    When OFF: The map displays actual operations at the current time, including real-time location changes due to delays or schedule updates.

  5. Prepare access tokens for Mini Tokyo 3D

    master

    Mini Tokyo 3D requires three specific access tokens at runtime to fetch map tiles and transportation data. Ensure you have obtained these before integration:

    1. Mapbox Access Token: Required for map tiles. Sign up at Mapbox and create a token. It is recommended to use URL restrictions to prevent unauthorized use.
    2. Public Transportation Open Data Center Token (odpt): Required for train and airplane data. Register at the ODPT developer site and select "Access Token for ODPT Center".
    3. Open Data Challenge for Public Transportation 2026 Token (challenge): Required for additional challenge-specific data. Follow the instructions on the ODPT developer site to enter the challenge and select "Access Token for Challenge 2026".
  6. Use the GTFS Plugin

    master

    Displays transit routes and vehicles using GTFS datasets and GTFS Realtime feeds.

    • Interaction:
      • Hover or tap a vehicle to see detailed information.
      • Click or tap a vehicle to toggle tracking mode, which automatically moves the camera to follow the vehicle's movement.
    • Supported Transit: Currently supports Toei Bus, Yokohama Municipal Bus, and Keisei Bus Chiba West.
    • Requirement: This plugin has a heavy load and high memory requirements. Use on a high-performance device is recommended.

    For implementation details, visit the Mini Tokyo 3D GTFS Plugin GitHub Repository.

  7. Download Mini Tokyo 3D source code

    master

    You can obtain the source code either by downloading a ZIP archive from GitHub or by cloning the repository using Git.

    Option 1: Download ZIP Download the master branch, extract it, and rename the resulting directory to mini-tokyo-3d.

    Option 2: Clone with Git Clone the repository directly from GitHub.

    # Option 1: Download and rename
    curl -LO https://github.com/nagix/mini-tokyo-3d/archive/master.zip
    unzip master.zip
    mv mini-tokyo-3d-master mini-tokyo-3d
    
    # Option 2: Clone via Git
    git clone https://github.com/nagix/mini-tokyo-3d.git
  8. Use the Tokyo 2020 Olympics Plugin

    master

    Displays competition schedules and venues for the Tokyo 2020 Olympic Games.

    • Features:
      • Countdown/Status: Displays a countdown to the opening ceremony or the current day of the event below the time display.
      • Venues: Competition pictograms appear at venue locations. Clicking/tapping a pictogram zooms in and shows the venue's competition schedule.
      • 3D Models: Includes an elaborate 3D model of the Olympic Stadium near Kokuritsu-kyogijo station.
    • Note: This plugin is not shown on the main minitokyo3d.com site. It can be viewed on the Mini Tokyo 3D 2021 for Open Data Challenge page.

    For implementation details, visit the Mini Tokyo 3D Tokyo 2020 Olympics Plugin GitHub Repository.

  9. Configure viewpoint via Tracking Mode Settings

    master

    The Tracking Mode Settings panel allows you to change the viewpoint position used when tracking a train or airplane.

    1. Click or tap the camera icon button to open the panel.
    2. Select a tracking mode to change how the camera follows the target.
    3. To close the panel, click the “x” button in the top right corner or click outside the panel.