import request from '@/utils/request.js'
import {
	mapBaseUrl,
	mapKey,
	coordtype
} from '@/config.js'
import { tansParams } from '@/utils/common.js'
// 所有服务均基于 百度地图
/**
 * 逆地理位置编码
 */
export const reverseGeocoding = ({
	params
}) => {
	const urlParams = tansParams(params)
	return request({
		baseUrl: mapBaseUrl + `/reverse_geocoding/v3/?ak=${mapKey}&output=json&coordtype=${coordtype}&${urlParams}`
	})
}