WS_Market
Click here for a complete list of operations.
getStationsByLoc
取得附近站點
傳入參數
參數名稱 | 參數型態 | 參數說明 |
nCategoryID | int | 交通工具代號 取全部:-1 市區公車:0x1 捷運:0x2 長途客運:0x4 火車:0x8 高鐵:0x16 飛機:0x32 船舶:0x64 |
nCityID | short | 勤崴縣市ID |
strKeyword | string | 關鍵字 |
dLat | int | Lat經緯度(緯度X1000000,經度 X1000000) |
dLon | int | Lon經緯度(緯度X1000000,經度 X1000000) |
參數輸入範例
參數 | 值 |
nCategoryID | 4 |
nCityID | 1 |
strKeyword | 客運 |
dLat | 25047924 |
dLon | 121517081 |
回傳格式
回傳值 | 說明 |
name | 站點名稱 |
id | 站點ID(相當於POIID) |
Lat | 站點的緯度 |
Lon | 站點的經度 |
Region | 站點所在的行政區 |
CategoryID | 交通工具類別 |
回傳範例
[{"DataTable_BusStopsByCity":[{"name":"日統客運台北站","id":511355,"Lat":25048351,"Lon":121509468,"Region":5,"CategoryID":1103},{"name":"豐榮客運捷運忠孝復興站","id":512704,"Lat":25041501,"Lon":121542846,"Region":2,"CategoryID":1103},{"name":"尊龍客運忠孝復興站","id":509007,"Lat":25040899,"Lon":121543571,"Region":2,"CategoryID":1103},{"name":"統聯客運松山站","id":511054,"Lat":25046081,"Lon":121577583,"Region":12,"CategoryID":1103},{"name":"統聯客運景美站","id":511055,"Lat":24992456,"Lon":121540412,"Region":7,"CategoryID":1103}]}]
Test
The test form is only available for requests from the local machine.SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /WS_Market.asmx HTTP/1.1 Host: transittw.localking.com.tw Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://www.gotcha.com.tw/WS_Transit/getStationsByLoc" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <AuthHeaderMarket xmlns="http://www.gotcha.com.tw/WS_Transit"> <Username>string</Username> <HashKey>string</HashKey> <Password>string</Password> </AuthHeaderMarket> </soap:Header> <soap:Body> <getStationsByLoc xmlns="http://www.gotcha.com.tw/WS_Transit"> <nCategoryID>int</nCategoryID> <nCityID>short</nCityID> <strKeyword>string</strKeyword> <dLat>int</dLat> <dLon>int</dLon> </getStationsByLoc> </soap:Body> </soap:Envelope>
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <getStationsByLocResponse xmlns="http://www.gotcha.com.tw/WS_Transit"> <getStationsByLocResult>string</getStationsByLocResult> </getStationsByLocResponse> </soap:Body> </soap:Envelope>
SOAP 1.2
The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.
POST /WS_Market.asmx HTTP/1.1 Host: transittw.localking.com.tw Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Header> <AuthHeaderMarket xmlns="http://www.gotcha.com.tw/WS_Transit"> <Username>string</Username> <HashKey>string</HashKey> <Password>string</Password> </AuthHeaderMarket> </soap12:Header> <soap12:Body> <getStationsByLoc xmlns="http://www.gotcha.com.tw/WS_Transit"> <nCategoryID>int</nCategoryID> <nCityID>short</nCityID> <strKeyword>string</strKeyword> <dLat>int</dLat> <dLon>int</dLon> </getStationsByLoc> </soap12:Body> </soap12:Envelope>
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <getStationsByLocResponse xmlns="http://www.gotcha.com.tw/WS_Transit"> <getStationsByLocResult>string</getStationsByLocResult> </getStationsByLocResponse> </soap12:Body> </soap12:Envelope>