AI Agent Hub
Back to skills
Tencent Map Assistant icon

Tencent Map Assistant

Life Service Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow the installation guide at https://skillhub.cn/install/skillhub.md to install @tencent-adm/tencentmap-map-assistant.

About this skill

Specific Problems Addressed

When developing or using map-based applications, developers often face issues like fragmented APIs, inconsistent coordinate systems, and complex visualization generation. For instance, creating a travel guide requires integrating location search, route planning, and itinerary organization; directly using GPS raw coordinates in map services can cause tens of meters of offset; and displaying multiple POI results as a map involves base map compatibility and mini-program integration. The Tencent Map Assistant Skill tackles these pain points by encapsulating Tencent Location Services' WebService APIs, providing an end-to-end workflow from natural language input to structured output and visualization rendering.

Core Capabilities and Key Steps

The skill's core capabilities are aligned with Tencent Location Services' official APIs, mainly including:

  • AI Travel Guide (travel_guide): Generates multi-day itineraries via natural language queries (e.g., "5-day Wuhan tour"), returning structured data and an output_markdown file containing mini-program QR codes.
  • Personal Map Guide (generate_map_guide): Saves a list of locations (requiring prior poi_search calls to obtain real poi_id and coordinates) as a personal map in the Tencent Maps mini-program, generating QR codes for mobile viewing.
  • Location Search and Resolution: Includes poi_search (city/area or nearby search), poi_detail (POI details), geocoder/regeocoder (address-coordinate conversion), and coord_translate (batch coordinate system conversion, e.g., GPS(WGS-84) to GCJ-02).
  • Routing and Distance: direction plans routes for driving, walking, transit, or cycling, while distance_matrix calculates distance and time between two points.
  • Other Tools: weather for weather queries, ip_location for IP-based positioning, and district_list for administrative district queries.

Key usage steps:
1. Key Configuration: The skill automatically retrieves keys from TmapClient or saved ones; if unavailable, it guides users to apply for a temporary key. Users can fix a key via save_key_to_dotenv.
2. Coordinate System Handling: If input coordinates are in GPS or other formats, call coord_translate(type=1) first to convert to GCJ-02 before passing to interfaces like regeocoder or poi_nearby to avoid offsets.
3. Generation and Visualization: Call travel_guide or generate_map_guide to get output_markdown, and output the Markdown content directly. For multi-POI or route displays, HTML web maps can be rendered using structured data with Tencent Map JSAPI GL as the base map.
4. Error Handling: When API calls fail, TmapClient automatically cycles through available keys, and users are directed to error-codes.md for correction methods.

Applicability and Considerations

  • Coordinate System Strictness: All internal interfaces exclusively use GCJ-02 coordinates; external coordinate sources (e.g., phone GPS, GPX tracks) must be converted first to prevent offsets.
  • Key Security: After generating HTML containing Tencent Map JSAPI GL, check for plaintext key leaks and follow specifications to use proxy solutions.
  • Map Compliance: Maps displayed within China must use Tencent Map JSAPI, not unlicensed overseas services, to meet national surveying requirements.
  • Data Privacy: travel_guide and generate_map_guide send user data to Tencent servers, adhering to Tencent Location Services' privacy policy.
  • API Limits: coord_translate handles up to 100 points per call; travel_guide may take 30-50 seconds per invocation, requiring synchronous waits.

Use Cases

  • When a travel blogger needs to generate a 3-day Chengdu food tour guide for followers, call `travel_guide` to get a structured itinerary and a shareable QR code.
  • Before organizing a hiking trip, an outdoor team uses `poi_search` to search for campsite details and then `direction` to plan a walking route and estimate travel time.
  • A developer integrating map functionality needs to convert GPS raw coordinates from users' phones to GCJ-02 format via `coord_translate` before passing to `regeocoder` for address resolution.
  • A travel planner wants to save multiple attractions as a personal map guide, calling `generate_map_guide` to generate a mini-program QR code for clients to view and navigate on mobile.

Best For

  • Travel content creators: Need to quickly generate multi-day travel guides and embed mini-program QR codes to interact with readers and share itineraries.
  • Outdoor event organizers: Planning team trips requires searching for nearby facilities, routing, and calculating distance and time for different transportation modes.
  • Location service developers: Integrate address parsing, coordinate conversion, and POI search features into applications to ensure map data accuracy and compatibility.
  • Travel planners: Provide personalized itineraries for clients, needing to consolidate multiple attractions into a dedicated map and share QR codes for easy mobile viewing.