tiennm99 c8f1ebc7af Replace Leaflet with MapLibre GL JS for map interface
Migrates the interactive map from Leaflet to MapLibre GL JS for native coordinate synchronization with MapillaryJS, improving precision and performance. Updates dependencies, removes Leaflet imports, refactors GameMap to use MapLibre GL JS, and enhances PanoViewer to extract and propagate precise MapillaryJS coordinates. Updates documentation to reflect the new architecture and rationale for the change.
2025-08-03 02:09:55 +07:00
2025-08-03 00:31:35 +07:00
2025-08-02 16:43:14 +07:00
2025-08-03 00:26:17 +07:00
2025-08-03 00:26:17 +07:00
2025-08-02 16:43:14 +07:00

VIGEOGUESSR

A Next.js-based Vietnamese geography guessing game where players guess the location of panoramic street view images from various Vietnamese cities.

Features

  • 🗺️ Multiple Vietnamese cities: Hanoi, Ho Chi Minh City, Hai Phong, Nam Dinh, Da Lat, and Duc Hoa
  • 📱 Responsive design that works on desktop and mobile
  • 🎯 Interactive map for location guessing
  • 📊 Distance-based scoring system
  • 🖼️ 360° panoramic street view images using Photo Sphere Viewer
  • ⚡ Built with Next.js 14 and JavaScript for performance and simplicity

Tech Stack

  • Framework: Next.js 14 with App Router
  • Language: JavaScript
  • Styling: CSS Modules with custom styling
  • Maps: Leaflet.js
  • 360° Images: Photo Sphere Viewer
  • Image API: Mapillary Graph API

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

  1. Clone the repository:
git clone <repository-url>
cd vigeoguessr
  1. Install dependencies:
npm install
  1. Run the development server:
npm run dev
  1. Open http://localhost:3000 in your browser.

Building for Production

npm run build
npm start

Project Structure

├── app/                    # Next.js app directory
│   ├── game/              # Game page
│   ├── globals.css        # Global styles
│   ├── layout.js          # Root layout
│   └── page.js            # Home page
├── components/            # Reusable React components
│   ├── DonateModal.js
│   ├── GameMap.js
│   ├── Header.js
│   ├── PanoViewer.js
│   └── ResultModal.js
├── lib/                   # Utility functions
│   └── gameUtils.js       # Game logic and API calls
└── public/               # Static assets

Key Improvements from Original

  • Modern Framework: Migrated from vanilla HTML/JS to Next.js with JavaScript
  • Component-Based Architecture: Modular, reusable React components
  • Clean Code: Well-structured JavaScript with proper organization
  • Code Deduplication: Eliminated duplicate code and consolidated utilities
  • Performance: Optimized with Next.js built-in optimizations
  • Maintainability: Cleaner code structure and separation of concerns
  • Responsive Design: Better mobile experience

Credit

S
Description
Guess place on map from street view image
Readme
4.1 MiB
0 Stars 1 Watchers 0 Forks
Languages
CSS 70.3%
HTML 29.7%