import axios from 'axios';
import { RequestBase } from './base';
export class AMapGeoRequest extends RequestBase {
  ecodeAddress(params) {
    throw new Error('Method not implemented.');
  }
  async decodeAddress(params) {
    try {
      const requestParams = {
        ...params,
        location: params.location.join(',')
      };
      const {
        data
      } = await axios.get(`${this.serverHost}/geocode/regeo`, {
        params: requestParams
      });
      const {
        status,
        ...others
      } = data;
      return {
        status: Number(status),
        ...others
      };
    } catch (err) {
      return {
        status: 0,
        info: err.toString()
      };
    }
  }
}
//# sourceMappingURL=geo.js.map