Google Map location plugin for GUI Chat applications. Display locations on an interactive map.
- Show any location by name or address
- Google Maps embed integration
- Fallback link to open in Google Maps
- Support for coordinates (lat/lng)
yarn add @gui-chat-plugin/map// In src/tools/index.ts
import MapPlugin from "@gui-chat-plugin/map/vue";
const pluginList = [
// ... other plugins
MapPlugin,
];
// In src/main.ts
import "@gui-chat-plugin/map/style.css";import { executeMap, TOOL_DEFINITION } from "@gui-chat-plugin/map";
// Show a location
const result = await executeMap(context, {
location: "Tokyo Tower, Japan",
});interface MapArgs {
location: string; // Location name, address, or coordinates
}interface MapToolData {
location: string | { lat: number; lng: number };
}The plugin requires a Google Maps API key to display embedded maps. Pass it via the googleMapKey prop to the view component, or configure it in your app's start response.
# Install dependencies
yarn install
# Run demo
yarn dev
# Build
yarn build
# Lint
yarn lintTry these prompts to test the plugin:
- "Show me the Eiffel Tower on the map"
- "Where is the Sydney Opera House located?"
- "Display Tokyo Station on the map"
MIT