Tencent Maps Mini Program Development
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md and install @tencent-adm/tencentmap-miniprogram-skill.
About this skill
Problem
WeChat Mini Program map work often stalls around component attributes, MapContext behavior, location permissions, Tencent Location Services keys, and visualization layer setup. When documentation is scattered, developers may guess marker, polyline, clustering, coordinate conversion, search, or routing behavior, and miss prerequisites such as subkey, layerId, and APPID authorization.
How it works
This skill targets WeChat Mini Program maps and provides API references for map components, MapContext, location services, and LBS backend services. It routes requests to the relevant references/ documents and checks assets/examples/ projects such as minicode-location, minicode-marker, and minicode-markerCluster.
- Map features: covers
longitude,latitude,scale,rotate,skew,marker,polyline,polygon,circle, clustering, custom callouts, collision detection, and map controls. - MapContext: covers creating context, moving the view, reading region and scale, restricting boundaries, including points, marker animation, trajectory playback, overlays, custom layers, and coordinate conversion.
- Location services: covers
wx.getLocation, fuzzy location,chooseLocation,choosePoi,openLocation, foreground/background location updates, and error listeners. - LBS backend: covers POI search, input suggestions, geocoding, reverse geocoding, direction planning, distance calculation, and administrative areas.
The workflow first identifies the feature type, then decides whether Tencent Location Services APIs are needed. When backend keys are required, it handles user-provided keys, saved keys, and temporary keys in order. For visual layers, it asks for a real layerId and confirms subkey binding and Mini Program APPID authorization.
Boundaries
It fits WeChat Mini Program map display, location, markers, routing, search, and map control. Coordinates use GCJ-02, so WGS-84 points need conversion. Location APIs require permission declarations, and wx.getLocation has frequency limits. Commercial use may require authorization.
Use Cases
- Integrate a map component in a WeChat Mini Program and configure coordinates, scale, and markers.
- Use MapContext to move the viewport, limit boundaries, and include multiple coordinate points.
- Call Tencent Location Services APIs for nearby POI search, direction planning, and geocoding.
- Find examples for location, markers, and marker clustering, then handle keys and permission notes.
Best For
- Frontend engineers owning WeChat Mini Program map pages need to verify MapContext parameters and events.
- Client developers integrating Tencent Location Services need to handle keys, POI search, and routing.
- Product engineers working on location features need to evaluate continuous location, fuzzy location, and permissions.
- Engineers maintaining map sample projects need to reuse location, marker, and clustering examples.
Related Skills
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Supports inline SVG/HTML rendering and Mermaid code output, covering common technical diagram creation like architecture and flow diagrams.
A comprehensive browser automation guide covering navigation, interaction, multi-tab management, and data collection, tailored for domestic web ecosystems and tools like Playwright/Selenium.
Control Windows WeChat through GUI automation to search contacts and send text, images, or files without official APIs.