My Octopress Blog

A blogging framework for hackers.

มาดูป้ายจราจรอัจฉริยะทั่วกรุงเทพและลองใช้ API ดึงข้อมูลกันดีกว่า

วันนี้ขี้เกียจอธิบายครับ ดูภาพน่าจะเข้าใจเลย source code อยู่ด้านล่างครับ

[RAW] <div class=’vms-jsonp-example’> <button type=’button’ id=’show-vms-button’>reload ป้ายจราจรอัจฉริยะ</button> <div class=’vms-jsonp-example-output’></div> </div>

[/RAW]

CODE

ภาพตัวอย่าง

vms-using-traffy-api-wrapper

ปล.

  • มี cache 5 นาทีด้วยครับ
  • คำอธิบายอื่นๆ ดูที่เรื่องที่เกี่ยวข้องนะจ๊ะ
  • การใช้ api แบบละเอียดหน่อยจะอยู่ที่ blog ตอน Traffy API Wrapper นะครับ