Glossary :
VMS = Variable Message Sign
Description :
แผนที่อย่างง่ายบอกสภาพการจราจร
API Status:
กำลังปรับปรุง
Source :
traffic.thai.net, กรมการขนส่งทางบก, กรุงเทพมหานคร
URL:
http://api.traffy.in.th/apis/apitraffy.php?format=…&api=…&width=…&height=…&key=…&appid=.. .
Formats:
XML, JSON, CSV, JS, TABLE, JSONN, JSS (JSONN และ JSS จะแสดง Format Json ที่ถูกต้อง)
ประการปรับปรุง
HTTP Method:
GET
Requires Authentication :
true
API rate limited :
ไม่จำกัด
Parameters :
*format = รูปแบบของการแสดงผล (XML, JSON, CSV, JS, JSONN, JSS)
Example: http://api.traffy.in.th/apis/apitraffy.php?format=XML
*api = ประเภทของ api ที่ต้องการ (getVMS)
Example: http://api.traffy.in.th/apis/apitraffy.php?format=XML&api=getVMS
* key = รหัสที่ได้รับจากการลงทะเบียน (ลงทะเบียน)
Example: http://api.traffy.in.th/apis/apitraffy.php?format=XML&api=getVMS&key=(คีย์ ที่ได้รับจากการลงทะเบียน)
*appid = id ที่ได้รับจากการลงทะเบียน (ลงทะเบียน)
Example: http://api.traffy.in.th/apis/apitraffy.php?format=XML&api=getVMS&key=(คีย์ที่ได้รับจากการลงทะเบียน)&appid=(id ที่ได้รับจากการลงทะเบียน)
width = ขนาดความกว้างของรูปที่จะนำมาแสดง
height = ขนาดความสูงของรูปที่จะนำมาแสดง
Example: http://api.traffy.in.th/apis/apitraffy.php?format=XML&api=getVMS&&width=200&height=200&key=(คีย์ที่ได้รับ จากการลงทะเบียน)&appid=(id ที่ได้รับจากการลงทะเบียน)
Required *
Response :
XML format:
<info>
<vms no=”ID” name=”English name” name_th=”Thai
name”>
<point lat=”Latitude point” lng=”Longitude point”/>
<url>Image</url>
<pstop>Congestion rate in guide post</pstop>
</vms>
</info>
XML example:
<info>
<vms no=”1″ name=”Saphan Khwai” name_th=”สะพานควาย”>
<point lat=”13.79747″ lng=”100.550832″/>
<url>
http://api.traffy.in.th/apis/services/weerapat/imagevms.php?key=(คีย์ที่ได้รับ จากการลงทะเบียน)
&appid=(id ที่ได้รับ จากการลงทะเบียน)&id=1
</url>
<pstop>46</pstop>
</vms>
</info>
[{Sequence number:{“name”:”English name”,“name_th”:”Thai name”,“point” :{“lat”:Latitude point,”lng”“pstop”: Congestion rate in guide“url”:”Image”},…]
JSON example:
[{1:
{“name”:”Saphan Khwai”,
“name_th”:”สะพานควาย”,
“point”:{“lat”:13.79747,”lng”:100.55.0.832},
“pstop”:6,
“url”:”http://api.traffy.in.th/apis/services/weerapat/imagevms.php?key=(คีย์ที่ได้รับจากการลงทะเบียน)&appid=(id ที่ได้รับจากการลงทะเบียน)&id=3”},…
]
CSV format:
Sequence number, English name, Thai name, Latitude point, Longitude point, Congestion rate in guide post, Image,…
CSV example:
1,Saphan Khwai,สะพานควาย,13.79747,100.550832,6,http://www.traffy.in.th/~nectec /JTraffy/JTraffy.php?mapnum=1&mapwidth=320&mapheight=240,…
JS example:
function name(
{Sequence number:
{“name”:”English name”,
“name_th”:”Thai name”,
“point”:{“lat”:Latitude point,”lng”:Longitude point}
“pstop”:Congestion rate in guidepost,
“url”:”Image”},…)
JS example:
function name(
{1:
{“name”:”Saphan Khwai”,
“name_th”:”สะพานควาย”,
“point”:{“lat”:13.79747,”lng”:100.55.0.832},
“pstop”:6,
“url”:”http://api.traffy.in.th/apis/services/weerapat/imagevms.php?key=(คีย์ที่ได้รับจากการลงทะเบียน)&appid=(id ที่ได้รับจากการลงทะเบียน)&id=3”},…)