2016년 11월 11일 금요일

2. 구글 지도 API로 가까운 매장 찾기 구현

이하 거리 구하기 서버 측 코드

asp + Msxml2.ServerXMLHTTP.6.0 사용 함.

의외로 간단~

<%
Session.CodePage = 65001
Response.ContentType = "application/json"
Response.Charset = "utf-8"


Dim callUrl 
Dim HttpReq
Dim params
origins = Request.QueryString("origins")
destinations = Request.QueryString("destinations")

callUrl = "https://maps.googleapis.com/maps/api/distancematrix/json?origins="&origins&"&destinations="&destinations&"&mode=transit&language=ko-KO&key=구글API키"
Set HttpReq = Server.CreateObject("Msxml2.ServerXMLHTTP.6.0")

HttpReq.open "GET", callUrl, False
HttpReq.send

Response.Write HttpReq.responseText
%>

댓글 없음:

댓글 쓰기

[낯선] 2025.02.22 우대락 공연

2025.02.22 우대락 공연 Set List 1. Black Pumas - Colors Covered By 낯선 2. Gate Flowers - 예비역 Covered By 낯선 3. 하동균 - From Mark Covered By 낯선 4. 낯선 ...