Hackpads are smart collaborative documents. Join Hackpad Now.

Ming Tsay

39 days ago
Unfiled. Edited by Ming Tsay 39 days ago
Ming T
  • 初嘗試抓取 PTX 並輸出 GeoJSON (with PHP)
  • PTX 整合 OSM (with JavaScript)
  • 心得:將 Geometry 由 SQL Server 的字串格式轉成 GeoJSON 支援的物件格式後就舒爽很多,剩下就只差 API 整合對應而已。上面的程式碼可以直接抓取所有路線清單及站牌名,並顯示路徑於 OSM 地圖中。也可複製 GeoJSON 到其他客戶端來執行繪製觀看其他客戶端呈現的不同效果。
  • PTX範例
  • 查字串包含
  • 查詢條件:contains(StopName/Zh_tw,'鹽水')
  • 查字串相等
  • 查詢條件:RouteName/Zh_tw eq '藍2'

Contact Support

Please check out our How-to Guide and FAQ first to see if your question is already answered! :)

If you have a feature request, please add it to this pad. Thanks!

Log in / Sign up