Tencent Map Assistant
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 anoutput_markdownfile containing mini-program QR codes. - Personal Map Guide (
generate_map_guide): Saves a list of locations (requiring priorpoi_searchcalls to obtain realpoi_idand 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), andcoord_translate(batch coordinate system conversion, e.g., GPS(WGS-84) to GCJ-02). - Routing and Distance:
directionplans routes for driving, walking, transit, or cycling, whiledistance_matrixcalculates distance and time between two points. - Other Tools:
weatherfor weather queries,ip_locationfor IP-based positioning, anddistrict_listfor 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_guideandgenerate_map_guidesend user data to Tencent servers, adhering to Tencent Location Services' privacy policy. - API Limits:
coord_translatehandles up to 100 points per call;travel_guidemay 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.
Related Skills
Offline 15-question self-assessment for evaluating economic stress levels and coping abilities, providing five-dimensional analysis and advice without login.
Generates an offline HTML test page to assess spending tendencies and financial judgment in romantic relationships.
Transforms todos into focus units, tracks focus sessions, and generates visual reports to manage attention flow.
Comprehensively migrate all personal assets of the domestic version of WorkBuddy from an old computer to a new one, with separated packages, automatic path mapping, and visible conflict control.