如何使用Javascript在Google Map v3中使用GTFS提要? [英] How to consume GTFS feed in Google Map v3 using Javascript?

查看:92
本文介绍了如何使用Javascript在Google Map v3中使用GTFS提要?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我第一次尝试根据Google开发人员页面在Google Maps中使用GTFS(通用公交Feed规范),我了解.txt文件的概念,该文件用作Feed并用于制作演示,我下载了公交Google开发人员页面上的zip文件.但我不了解如何使用这些运输文件在地图上显示信息.我试图在教程中搜索相同内容,但找不到任何有用的东西.我需要解析所有这些文件以显示在地图中还是有一些不同的实现.

I'm first time trying to use GTFS(General Transit Feed Specification) with Google Maps as per the Google developers page i have understood the concept of .txt files which are used as feed and for making a demo i downloaded a transit zip files from Google developers page. but I'm not getting how to use those transit files to show information on map. I tried to search tutorial for the same but could not find anything useful. Do i need to parse all those files to show in map or there is something different implementation.

我很困惑.

请让我对GTFS缺乏知识.

Please bear me with my lack of knowledge regarding GTFS.

推荐答案

据我所知,GTFS尚未即插即用"-没有简单的方法来加载GTFS数据集并对其进行处理,或者使用Google的Web界面或Javascript库在Google Maps上查询它.

As far as I know, GTFS is not yet "plug and play" ready - there's no simple way to just load up a GTFS dataset and work with it or query it on Google Maps, using either Google's web interface or their Javascript libraries.

要使其正常工作,需要:

Getting this working requires:

  1. 设置一个(SQL)数据库并将GTFS数据集导入该数据库.
  2. 设置查询系统以从SQL数据库中获取所需的信息(例如,查询数据库后端的Web前端).

可以随时查看网络上的一些示例:

Feel free to look at some examples from around the web:

  • Broader GTFS discussion, and a link to a PostgreSQL + R solution from James Wong
  • MongoDB + node.js from Brendan Nee

这篇关于如何使用Javascript在Google Map v3中使用GTFS提要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆