Actions16
Overview
This node integrates with the 高德地图 (Amap) API to generate static map images based on specified parameters. It is useful for scenarios where you want to embed or display a map snapshot centered on a particular location, with customizable zoom levels, markers, and additional visual options such as traffic overlays and image quality.
Practical examples include:
- Generating a static map image showing a store location for an email newsletter.
- Creating map thumbnails for real estate listings.
- Displaying route start/end points or points of interest on a static map in reports or dashboards.
Properties
| Name | Meaning |
|---|---|
| 地图中心点 | The center point of the map, specified as longitude and latitude separated by a comma. Coordinates must have up to 6 decimal places. |
| 地图级别 | Zoom level of the map, ranging from 1 (world view) to 17 (street level). |
| 选项 | Additional optional settings: |
| - 地图大小 | Size of the map image in pixels, formatted as widthheight (e.g., "400400"). Maximum allowed is 1024*1024. |
| - 图片质量 | Image quality option: 普通图 (normal quality) or 高清图 (high definition). |
| - 交通路况标识 | Whether to show real-time traffic conditions on the base map: 不展现 (do not show) or 展现 (show). |
| - Markers | Multiple markers can be added to the map, each with: |
| Size | Marker size: 小 (small), 中 (medium), 大 (large). |
| Color | Marker color options including Black, Blue, Gray, Green, Orange, Purple, Red, White, Yellow. |
| Label | Optional label text displayed on the marker. |
| Location | Marker position specified as longitude and latitude separated by a comma. |
Output
The node outputs JSON data containing the response from the Amap static map API. This typically includes a URL or binary data representing the generated static map image.
If the node supports binary output, it will contain the actual image file data corresponding to the requested static map, which can be used directly in workflows that handle images.
Dependencies
- Requires an API key credential for the 高德地图 (Amap) service.
- The node expects the base URL for the API to be configured via credentials.
- Network access to the Amap API endpoints is necessary.
Troubleshooting
- Invalid coordinates: Ensure the center point and marker locations are valid longitude and latitude values with no more than 6 decimal places.
- Zoom level out of range: The zoom level must be between 1 and 17 inclusive.
- Image size too large: The maximum allowed image size is 1024x1024 pixels.
- API authentication errors: Verify that the API key credential is correctly set and has permissions for static map requests.
- Traffic overlay not showing: Confirm that the traffic option is enabled and that the API plan supports real-time traffic data.
- Markers not appearing: Check marker formatting, especially the location string and ensure it is properly comma-separated longitude and latitude.