GTFS Feed 集成
您可以使用 GTFS 在 Google 地图中显示开放式横幅,以及在公交中显示 Google 地图
收据。
在 Google 地图中显示开放式横幅
Google 钱包和 Google 地图使用 GTFS Feed 来识别在 Google 中显示的路线
地图。要实现此功能,公交公司必须执行以下操作:
- 公交公司必须发布至少包含以下字段的 GTFS Feed:
<ph type="x-smartling-placeholder">
- Feed 必须准确反映支持开放式循环的路线和经停点。
- GTFS Feed 不包含不受支持的车站、经停点或路线。这是
以确保系统不会向不支持的路由上的用户显示横幅。
- 目前不支持部分发布。代理机构必须完成针对
完整的 GTFS Feed 或创建新的 GTFS Feed。
在公交收据中显示地图
您可以使用 GTFS 在固定和移动终端的公交收据中显示地图。
固定式终端
如需在 Google 钱包中显示 Google 地图,请提供 Google 链接以关联车站
以及用户的在终端上点按一下为此,请提供
商家名称标记和相应的 GTFS Feed,如以下示例所示:
STOPS.txt: field(stop_id)
您还必须完成
开放式公交表单。
移动终端
对于移动终端(例如公交车上的终端),您可以动态地更新商家名称
或提供终端上的点按与 GTFS 之间的关系
路由 Feed。在后一种情况下,系统只会向用户显示路线,而不会显示停靠站。请参阅以下内容
示例:
ROUTES.txt field(route_id)
您还必须完成
开放式公交表单。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-29。
[null,null,["最后更新时间 (UTC):2024-08-29。"],[[["Transit agencies can leverage GTFS feeds to display an open loop banner in Google Maps, indicating routes that support open loop payments, by ensuring their feed accurately represents these routes and stops."],["GTFS feeds can be used to integrate Google Maps into transit receipts for both stationary and mobile terminals, providing users with visual location information."],["For stationary terminals, linking station stops with user taps requires providing the relationship between the Merchant Name tag and the corresponding GTFS feed, along with completing an onboarding form."],["Mobile terminals can either dynamically update the Merchant Name or link taps to a GTFS route feed, displaying the route to the user, and also require completion of the onboarding form."]]],["Transit agencies use GTFS feeds to display open loop banners and maps in Google Maps and transit receipts. To show banners, agencies must publish a complete GTFS feed (agency, stops, routes) accurately representing supported routes. To show maps in stationary terminal receipts, link the Merchant Name tag to the `STOPS.txt` stop ID field. For mobile terminals, link the Merchant Name or terminal taps to the `ROUTES.txt` route ID field. Submitting the open loop transit form is mandatory.\n"]]