A sample web application demonstrating how to integrate Googleβs Gemini generative AI with the Google Maps Platform (Maps JavaScript API) using TypeScript and Vite.
- Features
- Prerequisites
- Getting Started
- Environment Variables
- Folder Structure
- Usage
- Contributing
- License
- Multimodal Place Recognition: Upload an image and ask the Gemini API βWhere can I see this?β
- Text Prompt Refinement: Use the Gemini API to enhance and refine user-generated review text.
- Photorealistic 3D Map (Experimental): Render a tiltβandβheading controlled 3D map view.
- Geocoding: Convert AIβgenerated place names into latitude/longitude coordinates.
- Nearby Lodging Search: Retrieve and display lodging options around the identified location.
- Split-Layout UI: Display interactive map and place overview cards in a responsive split layout using Googleβs Extended Component Library.
- Node.js (v16+)
- npm or yarn
- A Google Cloud project with:
- Gemini AI enabled
- Maps JavaScript API enabled
- Clone the repository
git clone https://github.com/CodeRTX/GeoAI-Navigator.git
cd GeoAI-Navigator
- Install dependencies
npm install
# or
yarn install
- Setup environment variables (see Environment Variables)
- Start the development server
npm run dev
# or
yarn devVisit
http://localhost:5173
in your browser.
Create a file named .env.local
in the project root with the following keys:
VITE_GEMINI_API_KEY=YOUR_GEMINI_API_KEY
VITE_MAPS_API_KEY=YOUR_GOOGLE_MAPS_API_KEY
Note: The
.local
suffix prevents accidental commits of sensitive keys to source control.
GeoAI-Navigator/
βββ public/ # Static assets (index.html, favicon)
βββ src/ # Application source code
β βββ main.ts # Entry point
β βββ style.css # Basic styles
βββ .env.local # Environment variables (not shown)
βββ .gitignore
βββ package.json
βββ tsconfig.json
βββ vite.config.js
βββ README.md
Contributions are welcome! Please open an issue or submit a pull request with a clear description of your changes.
This project is licensed under the Apache License 2.0.
- Photorealistic 3D map (Experimental) in the Maps JavaScript API
- Geocoding Service, Maps JavaScript API
- Nearby Search (New) in the Places Library, Maps JavaScript API
- Extended Component Library (beta) for the Maps JavaScript API providing the split layout and the Place Overview components.