<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
|
<% Session.CodePage=65001 %>
|
<% Response.charset = "utf-8" %>
|
<!--#include virtual="/weixin/OAuth2.gds"-->
|
<!--#include virtual="/inc/function.gds"-->
|
|
|
<%
|
Set rs = Server.CreateObject("ADODB.Recordset")
|
<!--这里服务单会调用来计算[预估距离]腾讯的key,更换要统一更换-->
|
lbs_key="FXNBZ-SIW6A-ABHKQ-CM5XY-QQWNV-DFFDY"
|
|
address=trim(Request("address"))
|
|
appUrl = "https://apis.map.qq.com/ws/geocoder/v1/"
|
args1 = "address="&address&"&key="&lbs_key
|
'Response.Write appUrl&"?"&args1 &"<br><br>"
|
'Response.End
|
HTMLCODE= GetBody(appUrl,args1)
|
'Response.Write HTMLCODE &"<br><br>"
|
'Response.End
|
|
str="["&HTMLCODE&"]"
|
set obj = getjson(str)
|
status = obj.get(0).status
|
lbs_from=""
|
lbs_from_j=""
|
webJson=""
|
Dim FormArray()
|
REDIM FormArray(10,10)
|
'表头
|
If status=0 then
|
to_lat = obj.get(0).result.location.lat
|
to_lng = obj.get(0).result.location.lng
|
'Response.Write to_lat&","&to_lng &"<br><br>"
|
'Response.End
|
'webJson="{""method"":""StoreDistance"",""result"":1,""to_lat"":"""&to_lat&""",""to_lng"":"""&to_lng&"""}"
|
webJson=to_lat&"|"&to_lng
|
Else
|
webJson=0
|
End If
|
'Response.End
|
|
Response.Write webJson
|
%>
|