开发 Maps JavaScript API Reference Manual Service Category WebService

WebService 最后更新时间: 2026年07月02日

AMap.WebService

Used to call the Web service API, directly passing through query conditions and returning results, providing both GET and POST request methods. For specific request interfaces and return results, please refer to https://lbs.amap.com/api/web-service/overview

Static method

get(path, params, callback, opts)

Request the specified Web service API interface using the GET method

Parameter:

path (string) Interface path of the Web service API

params (object) Query parameters of the Web service API

callback (WebServiceCallback) Query callback function

opts (HttpOptions = {}) HTTP request parameter configuration

Demo:

AMap.WebService.get("https://restapi.amap.com/v3/place/text",
  {
    keywords: "food",
    city: "840380000",
    types: "博物馆",
  },
  function (error, result) {
    console.log(error, result);
  }
);

post(path, params, callback)

Request the specified Web service API endpoint using the POST method

Parameter:

path (string) Endpoint path of the Web service API

params (any) Query parameters of the Web service API

callback (WebServiceCallback) Query callback function

返回顶部 示例中心 常见问题 智能客服 公众号
二维码