地图工具

index.js - HTTP API文档

生成时间: 2026-01-29T15:08:18.600Z 源文件: index.js API端点数量: 4

HTTP API 文档分析

路由分组

所有API端点都属于 /rtmap 前缀下的地图工具服务。

API端点表格

HTTP方法 路由路径 描述 请求参数 响应格式 状态码
ALL /rtmap/tool/call 调用地图工具 Body参数:
- tool_name: 工具名称(必填)
- 其他参数根据具体工具而定
{ret: boolean, msg: string, data: object} 200
ALL /rtmap/tool/list 获取所有可用的地图工具列表 {ret: boolean, msg: string, tools: array, tools_md: string} 200

中间件使用情况

  1. urlParser: URL解析中间件
  2. session_filter: 会话过滤中间件

业务数据存储文档

地图工具数据结构

代码中定义了12种地图工具,每种工具包含以下结构:

{
  "name": "工具名称",
  "description": "工具描述",
  "inputSchema": {
    "type": "object",
    "properties": {
      "参数名": {
        "type": "string",
        "description": "参数描述"
      }
    },
    "required": ["必填参数"]
  }
}

可用工具列表

1. 逆地理编码

  • 名称: maps_regeocode
  • 描述: 将一个高德经纬度坐标转换为行政区划地址信息
  • 必需参数: location (经纬度)

2. 地理编码

  • 名称: maps_geo
  • 描述: 将详细的结构化地址转换为经纬度坐标
  • 必需参数: address (结构化地址)
  • 可选参数: city (指定查询的城市)

3. IP定位

  • 名称: maps_ip_location
  • 描述: 根据IP地址定位所在位置
  • 必需参数: ip (IP地址)

4. 天气查询

  • 名称: maps_weather
  • 描述: 查询指定城市的天气
  • 必需参数: city (城市名称或adcode)

5. POI详情查询

  • 名称: maps_search_detail
  • 描述: 查询POI的详细信息
  • 必需参数: id (POI ID)

6. 骑行路径规划

  • 名称: maps_bicycling
  • 描述: 规划骑行通勤方案
  • 必需参数: origin, destination (经纬度坐标)

7. 步行路径规划

  • 名称: maps_direction_walking
  • 描述: 规划步行通勤方案
  • 必需参数: origin, destination (经纬度坐标)

8. 驾车路径规划

  • 名称: maps_direction_driving
  • 描述: 规划驾车通勤方案
  • 必需参数: origin, destination (经纬度坐标)

9. 公共交通路径规划

  • 名称: maps_direction_transit_integrated
  • 描述: 规划综合公共交通方案
  • 必需参数: origin, destination, city, cityd

10. 距离测量

  • 名称: maps_distance
  • 描述: 测量两个经纬度坐标之间的距离
  • 必需参数: origins, destination
  • 可选参数: type (距离测量类型)

11. 关键词搜索

  • 名称: maps_text_search
  • 描述: 根据关键词搜索相关POI
  • 必需参数: keywords
  • 可选参数: city, types

12. 周边搜索

  • 名称: maps_around_search
  • 描述: 搜索指定半径范围内的POI
  • 必需参数: location
  • 可选参数: radius, keywords

响应数据格式

所有API调用返回统一格式:

{
  "ret": true/false,
  "msg": "成功或错误信息",
  "data": { /* 具体工具返回的数据 */ }
}

工具列表接口额外返回:

{
  "ret": true,
  "msg": "success",
  "tools": [ /* 工具数组 */ ],
  "tools_md": "Markdown格式的工具文档"
}

检测到的API端点

HTTP方法 路由路径 处理函数 源代码位置
ALL /rtmap/tool/call anonymous 第24行
ALL /rtmap/tool/list anonymous 第25行
ALL /rtmap/tool/call anonymous 第24行
ALL /rtmap/tool/list anonymous 第25行

元数据

{
  "sourceFile": "index.js",
  "generatedAt": "2026-01-29T15:08:18.600Z",
  "endpointCount": 4,
  "hasHttpApis": true
}

本文档由HTTP API文档生成Agent自动生成