Siirry sisältöön

Ero sivun ”ITSFactory siriaccess developerguide” versioiden välillä

1 167 merkkiä lisätty ,  14. syyskuuta 2013 kello 17.36
Ei muokkausyhteenvetoa
Rivi 54: Rivi 54:


==== Responses ====
==== Responses ====
Following response is an example of data collected from vehicle (bus) TKL_248 operating on line 30. The response follows SIRI standards, so you can get the whole picture from there, however here we explain few key fields:
* LineRef specifies the line where the bus is currently operating.
* DirectionRef sepecifies the direction the bus is travelling on the line. 1 = from origin stop to destination stop, 2= from destination stop back to origin stop.
* DataFrameRef specifies the date when the vehicle started from the origin or destination stop (depending on the DirectionRef)
* DatedVehicleJorneyRef specifies the time when the vehicle started from the origin or destination stop (depending on the DirectionRef)
* OriginName specifies the name of the stop where the vehicle started
* DestinationName specifies the name of the stop where the bus is heading to
* Latitude and Longitude specifies the map position of the vehicle at the time of the response
* Bearing specifies the direction the vehicle is travelling
* Delay specifies the relative time the vehicle is behind or ahead of its planned schedule
* VehicleRef uniquely identifies the monitored vehicle
<pre>
<pre>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
Rivi 93: Rivi 105:
</Siri>
</Siri>
</pre>
</pre>
=== SIRI JSON documents over HTTP GET ===
=== SIRI JSON documents over HTTP GET ===
Rest access responds to HTTP GET requests and returns JSON formatted textual data. The data itself is structured and named like standard SIRI XML responses (it is just converted from SIRI XML to JSON notation). This allows the client avoid XML request parsing which is typically cumbersome for example to JavaScript clients.
Rest access responds to HTTP GET requests and returns JSON formatted textual data. The data itself is structured and named like standard SIRI XML responses (it is just converted from SIRI XML to JSON notation). This allows the client avoid XML request parsing which is typically cumbersome for example to JavaScript clients.
0

muokkausta