import request from "@/router/axios";
import axios from 'axios';
/*逆地址解析*/
export const getcoder = (location, key, get_poi) => {
  return request({
    url: "/qq/map/ws/geocoder/v1",
    method: "get",
    params: {
      location,
      key,
      get_poi
    }
  });
};

/*关键词输入提示*/
export const querySearch = (keyword, key) => {
  return request({
    url: "/qq/map/ws/place/v1/suggestion",
    method: "get",
    params: {
      keyword,
      key
    }
  });
};
export const tiandituQuerySearch = (params, baseUrl) => {
  return axios({
    method: 'get',
    url: baseUrl + '/tianditu/v2/search',
    params: params,
  })
};

export const tiandituGeocoder = (params, baseUrl) => {
  return axios({
    method: 'get',
    url: baseUrl + '/tianditu/geocoder',
    params: params,
  })
};

