Skip to content

A Flutter-based mobile application designed to help users navigate around campus with interactive maps, real-time location tracking, and route planning.

License

Notifications You must be signed in to change notification settings

AparAgarwal/campus-navigator

Repository files navigation

Campus Navigator

A Flutter-based mobile application designed to help users navigate around campus with interactive maps, real-time location tracking, and route planning.

Features

  • Interactive Google Maps Integration: Navigate across campus using Google Maps API
  • Real-time Location Tracking: Track your current position with custom user markers
  • Multiple Transportation Modes: Choose between walking, cycling, car, or bus routes
  • Campus Landmark Search: Search for classrooms, labs, buildings, and other important campus locations
  • Turn-by-turn Navigation: Get detailed directions with distance and estimated time
  • Route Optimization: Find the most efficient paths between locations
  • Indoor Navigation Support: Seamless transition to indoor mapping via WebView for building interiors

Screenshots

Main Map Interface Search Functionality Navigation View Route Planning

Getting Started

Prerequisites

  • Flutter SDK (^3.6.0)
  • Dart SDK
  • Android Studio / Visual Studio Code
  • Google Maps API Key
  • OpenRouteService API Key

API Keys Setup

This app requires two API keys to function properly:

  1. Google Maps API Key

    • Create a project in the Google Cloud Console
    • Enable the Google Maps API for Android/iOS
    • Generate an API key from the Credentials page
    • Add the key to android/app/src/main/AndroidManifest.xml:
      <meta-data
          android:name="com.google.android.geo.API_KEY"
          android:value="YOUR_GOOGLE_MAPS_API_KEY" />
    • For iOS, follow the instructions at Google Maps iOS SDK Guide
  2. OpenRouteService API Key

    • Create a free account at OpenRouteService
    • Generate an API key in your dashboard
    • Add the key to lib/routes.dart:
      final String apiKey = 'YOUR_OPENROUTESERVICE_API_KEY';

⚠️ Important: Never commit your actual API keys to a public repository. Use environment variables or a secure method to store sensitive keys.

Installation

  1. Clone this repository:

    git clone https://github.com/aparagarwal/campus-navigator.git
  2. Navigate to the project directory:

    cd campus-navigator
  3. Install dependencies:

    flutter pub get
  4. Set up your Google Maps API key:

    • Add your API key in android/app/src/main/AndroidManifest.xml
    • Add your API key in appropriate iOS configuration if needed
  5. Run the app:

    flutter run

Dependencies

Architecture

The app follows a simple, modular architecture:

  • Main App: Entry point setting up the theme and home page
  • Map Page: Main interface with search, map controls, and route options
  • Navigation Page: Turn-by-turn navigation with real-time updates
  • Custom Locations: Repository of campus locations and search functionality
  • Route Service: API integration for route calculation and optimization
  • WebView: Indoor mapping for building interiors

API Usage

The app uses OpenRouteService for route calculation:

  • GET /v2/directions/{profile}: Used for calculating routes between two points
  • Documentation can be found here

About

A Flutter-based mobile application designed to help users navigate around campus with interactive maps, real-time location tracking, and route planning.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published