You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
577B

  1. import{N as a}from"./index.47ab9a02.js";function p(t){const r=`http://api.tianditu.gov.cn/v2/search?postStr={"keyWord":"${t}","level":12,"mapBound":"-180,-90,180,90","queryType":7,"start":0,"count":10}&type=query`;return s("/api/v1/order/retransmissionUrl",r)}function u(t,r){const o="/api/v1/order/retransmissionUrl",e=`http://api.tianditu.gov.cn/geocoder?postStr={'lon':${t},'lat':${r},'ver':1}&type=geocode`;return s(o,e)}function s(t,r){return new Promise((o,e)=>{a.post(t,{url:r}).then(n=>{o({code:200,data:JSON.parse(n.data)})}).catch(n=>{e(n)})})}export{u as g,p as s};