ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

amap-jsapi-skill

高德地图 JSAPI v2.0 (WebGL) 开发技能。涵盖地图生命周期管理、强制安全配置、3D 视图控制、覆盖物绘制及 LBS 服务集成。

Why use this skill?

Easily integrate AMap JSAPI v2.0 with this OpenClaw skill. Features include 3D map controls, LBS services, custom layers, and secure, high-performance spatial rendering.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/duxiaohuidxh/amap-jsapi-skill
Or

What This Skill Does

The amap-jsapi-skill provides a comprehensive interface for integrating the AutoNavi (Amap) JSAPI v2.0 into your web applications. This skill acts as a bridge, allowing OpenClaw agents to programmatically handle map initialization, lifecycle management, and complex visualization tasks. It supports advanced WebGL rendering, enabling the creation of 3D map views, custom vector graphics, and interactive spatial data layers. Whether you are building a fleet management system, a real estate portal, or a city-wide analytical dashboard, this skill provides the abstraction layer needed to interact with high-performance mapping services efficiently.

Installation

To integrate this skill, use the ClawHub command-line interface. Open your terminal and execute: clawhub install openclaw/skills/skills/duxiaohuidxh/amap-jsapi-skill Ensure you have configured your environment variables to include your AMap Web Developer Key and the mandatory security JS code. These should be defined in your project's configuration before invoking any map-related tasks.

Use Cases

  1. Dynamic Dashboard Creation: Automatically instantiate maps with specific zoom levels and center coordinates to display real-time asset locations.
  2. Spatial Data Analysis: Utilize layers like HeatMap or MassMarks to visualize thousands of data points, performing LBS (Location Based Services) operations like reverse geocoding.
  3. Navigation & Logistics: Implement complex routing, including driving, walking, or bus transit paths, and display them on a 3D interface for user-friendly navigation assistance.
  4. Geo-Fencing Applications: Use Polygon and Circle drawing tools to define custom boundary areas and trigger events when markers cross these defined regions.

Example Prompts

  1. "Initialize a 3D map centered on Shanghai with a zoom level of 14, and add a custom marker at the coordinates [121.47, 31.23] with an information window displaying 'Office Location'."
  2. "Perform a batch reverse geocoding operation on these 50 coordinates and visualize the results using the MassMarks layer to avoid performance lag."
  3. "Calculate the driving route from my current location to the nearest subway station and display the polyline with a customized blue color and a line width of 6 pixels."

Tips & Limitations

  • Security Configuration: Always set the window._AMapSecurityConfig variable before initializing the map. For production, utilize a backend proxy for serviceHost to keep your securityJsCode confidential.
  • Performance: Use LabelMarker for large datasets rather than standard Marker objects to leverage WebGL-based collision detection and better rendering performance.
  • Resource Management: Always call map.destroy() when the map container is removed from the DOM to prevent memory leaks associated with the WebGL context.
  • Plugin Loading: Follow the 'best practices' principle: load only necessary plugins via the AMapLoader configuration to keep initial bundle sizes minimal and improve page load speed.

Metadata

Stars2387
Views1
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-duxiaohuidxh-amap-jsapi-skill": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#amap#map#geospatial#webgl#lbs
Safety Score: 4/5

Flags: external-api, code-execution