Skip to content

Latest commit

 

History

History
329 lines (225 loc) · 8.09 KB

File metadata and controls

329 lines (225 loc) · 8.09 KB

Features Documentation

Detailed documentation of all features in the Life in Between XR application.

Table of Contents

Search with Autocomplete

Overview

The search feature provides intelligent, context-aware search functionality focused on public transportation. It uses Google Maps API to gather results and filters them by proximity to subway/bus stops.

Key Features

  • Autocomplete Suggestions: Real-time suggestions as you type
  • Location Filtering: Results filtered by proximity to transit stops
  • Route-Aware Search: Only shows locations along your selected route
  • Fast Performance: Optimized search with caching

How It Works

  1. User selects a transit line
  2. User types in search field
  3. System queries Google Maps API
  4. Results filtered by:
    • Proximity to selected line's stops
    • Relevance to search query
  5. Results displayed with autocomplete suggestions

Implementation

Component: Rotary Heart AutoCompletePopup

Location: Assets/Rotary Heart/AutoCompletePopup/

Integration:

  • Connected to Google Maps API
  • Integrated with LineSelector for route filtering
  • Managed by UIManager for UI coordination

Usage Example

// Search is handled by AutoCompleteTextField component
// Configured via Unity Inspector
// Results automatically filtered by selected line

Benefits

  • Community Support: Helps smaller businesses get discovered
  • Convenience: Ensures detours are always along your route
  • Efficiency: Saves time by showing only relevant results

Line Selection

Overview

The line selection system allows users to choose and filter by specific transit lines (subway/bus lines).

Key Features

  • Visual Selection: Color-coded line buttons
  • Single Selection: Only one line selected at a time
  • State Management: Tracks selected state across the app
  • UI Integration: Automatically updates UI based on selection

How It Works

  1. User sees list of available transit lines
  2. Each line has:
    • Name (e.g., "Red Line", "Blue Line")
    • Color representation
    • Associated button
  3. User clicks a line button
  4. LineSelector.SelectLine() is called
  5. Selected line's selected property set to true
  6. All other lines' selected property set to false
  7. UI updates to reflect selection

Implementation

Components:

  • Line.cs: Data structure
  • LineSelector.cs: Selection logic

Location: Assets/Scripts/

Usage Example

// In Unity Inspector, assign lines to LineSelector
LineSelector selector = GetComponent<LineSelector>();

// Programmatically select a line
selector.SelectLine("Red Line");

// Check which line is selected
foreach (Line line in selector.LinesList) {
    if (line.selected) {
        Debug.Log($"Selected: {line.name}");
    }
}

Benefits

  • Clear Organization: Easy to see and select lines
  • Consistent State: Single source of truth for selection
  • User-Friendly: Intuitive visual interface

3D Map Visualization

Overview

The 3D map feature provides real-time 3D visualization of urban environments using ArcGIS and local 3D models.

Key Features

  • 3D Building Rendering: Realistic 3D representation of buildings
  • Spatial Context: Shows buildings relative to transit routes
  • Interactive Exploration: Explore areas above your subway line
  • Offline Support: Local 3D models for offline viewing

How It Works

  1. System loads 3D map data (ArcGIS or local models)
  2. Buildings rendered in 3D space
  3. Transit routes overlaid on map
  4. User can explore 3D environment
  5. Buildings positioned relative to transit stops

Implementation

Data Sources:

  • ArcGIS SDK for live data
  • Local OBJ files for offline support

Models:

  • Assets/3D Map/Boston.obj: Main 3D map model
  • Assets/3D Map/Boston.mtl: Material definitions

Building Data:

  • Assets/Map Info/MITBuildings.csv: Building information

Usage

The 3D map is displayed in the main AR view, showing buildings and transit routes in real-time as the user moves through the city.

Benefits

  • Spatial Understanding: Better understanding of city layout
  • Context: See what's above your subway line
  • Exploration: Discover new areas visually

Bookmarks & Offline Suggestions

Overview

The bookmarks feature allows users to save favorite locations and receive offline suggestions for places along their route.

Key Features

  • Bookmark Management: Save favorite places
  • Offline Suggestions: Pre-loaded suggestions for your route
  • 3D Representation: See bookmarked places in 3D
  • Route Integration: Suggestions filtered by current line

How It Works

  1. System loads offline suggestions for selected line
  2. Suggestions include:
    • Cafes near stops
    • Gyms near stops
    • Other amenities
  3. User can bookmark locations
  4. Bookmarks saved locally
  5. Bookmarked places shown in 3D view

Current Limitations

  • Limited to cafes and gyms near subway stops
  • Suggestions are pre-loaded (not dynamic)

Future Enhancements

  • More location types
  • Dynamic suggestions based on time/weather
  • Social sharing of bookmarks

Transit Stop Management

Overview

The stop management system tracks and manages transit stops with color coding and categorization.

Key Features

  • Stop Data Structure: Stop class with name and color
  • Color Classification: Stops categorized by color (red, blue, green, yellow)
  • Integration: Works with line selection system

Implementation

Component: Stop.cs

Location: Assets/Scripts/Stop.cs

Data Structure

public class Stop {
    public string name;
    public enum color {
        red, blue, green, yellow
    }
}

Usage

Stops are associated with transit lines and used for:

  • Location filtering in search
  • Route visualization
  • Proximity calculations

UI Management

Overview

The UI management system coordinates UI elements to ensure proper visibility and user experience.

Key Features

  • Smart Visibility: Automatically shows/hides UI elements
  • Context Awareness: UI adapts to user actions
  • No Overlap: Ensures only relevant UI is visible

How It Works

  1. UIManager monitors UI element states
  2. When search dropdown is active:
    • Selector bar is hidden
  3. When search dropdown is inactive:
    • Selector bar is shown
  4. Updates every frame for responsiveness

Implementation

Component: UIManager.cs

Location: Assets/Scripts/UIManager.cs

Usage Example

// Assign UI elements via Inspector
UIManager uiManager = GetComponent<UIManager>();
uiManager.searchDropdown = searchDropdownGameObject;
uiManager.selectorBar = selectorBarGameObject;

// UIManager automatically manages visibility

Benefits

  • Clean Interface: No UI clutter
  • User-Friendly: Intuitive UI behavior
  • Maintainable: Centralized UI logic

Feature Integration

How Features Work Together

  1. User selects a lineLineSelector updates
  2. User searches → Results filtered by selected line
  3. 3D map displays → Shows buildings along selected route
  4. Bookmarks shown → Filtered by current line
  5. UI adaptsUIManager coordinates visibility

Data Flow

User Input
    ↓
Line Selection → Filter Search Results
    ↓
Search Results → Filter by Proximity to Stops
    ↓
3D Map Display → Show Buildings Along Route
    ↓
UI Updates → UIManager Coordinates Visibility

Future Features

Potential enhancements:

  1. Real-Time Updates: Live transit information
  2. Social Features: Share locations with friends
  3. Accessibility: Enhanced accessibility options
  4. Multi-Platform: iOS support
  5. Advanced Filtering: More search filters
  6. AR Navigation: AR-guided navigation to locations

Last Updated: 2024