# DataSource

The DataSource object is used to specify additional GTFS (opens new window) (General Transit Feed Specification) and GTFS Realtime data sources, set as an array in the Map constructor option dataSources.

WARNING

Note that this is an experimental feature which is under development and is prone to change.

Currently, you must specify both a GTFS dataset and a GTFS Realtime feed to view vehicles moving along routes. Also, vehicles will not be displayed when Playback Mode is on.

Type Object (opens new window)

# Properties

# color (string (opens new window))

A color used to display routes and vehicles. It is specified by a hexadecimal color code starting with #.

# gtfsUrl (string (opens new window))

Specifies the URL of a GTFS dataset zip file (opens new window). A GTFS dataset must contain at least the following files.

  • agency.txt
  • stops.txt
  • routes.txt
  • trips.txt
  • stop_times.txt
  • calendar.txt
  • calendar_dates.txt
  • shapes.txt
  • translations.txt
  • feed_info.txt

# vehiclePositionUrl (string (opens new window))

Specifies the URL for a GTFS Realtime VehiclePosition feed (opens new window).

Last Updated: 1/4/2025, 11:43:24 PM