Page 1 of 1

public transport destination doesn't work

Posted: Friday 28 August 2020 16:50
by NilsNijenhuis
I want to display the train deventer colmschate -> Deventer
if i remove the line destination i get al te trains in both directions.
if i use destination it is blanc, what am i doing wrong?

Code: Select all

var publictransport = {}

publictransport.ovinfotrain_deventer= {
  station: 'station-deventer-colmschate',
  destination: 'station-deventer',
  title:'Colmschate -> Deventer',
  show_via: 'true',
  show_lastupdate:true,
  provider: '9292-train',
  icon: 'fas fa-train',
  results: 5
};
http://api.9292.nl/0.1/locations?lang=nl-NL&q=deventer
gives me :
{
"locations": [
{
"id": "station-deventer",
"type": "station",
"stationId": "dv",
"stationType": "Station",
"name": "Deventer",
"place": {
"name": "Deventer",
"regionCode": "OV",
"regionName": "Overijssel",
"showRegion": false,
"countryCode": "NL",
"countryName": "Nederland",
"showCountry": false
},
"latLong": {
"lat": 52.257079,
"long": 6.160821
},
"urls": {
"nl-NL": "/station-deventer",
"en-GB": "/en/station-deventer"
}
},

Re: public transport destination doesn't work

Posted: Friday 28 August 2020 18:15
by HansieNL
Look like stations-deventer is not a valid id. Can you try with station-deventer as destination?

Re: public transport destination doesn't work

Posted: Friday 28 August 2020 18:20
by NilsNijenhuis
i tried everything below and nothing works
station-deventer
stations-deventer
station deventer

Re: public transport destination doesn't work

Posted: Sunday 30 August 2020 21:17
by BoelShit
I think I recall destination is set by using the name tag. So try 'Deventer'.

Re: public transport destination doesn't work

Posted: Wednesday 02 September 2020 13:41
by NilsNijenhuis
nope, also the name tag "deventer' doesn't work… :(

does anyone know how to retrieve the correct destination name?

Re: public transport destination doesn't work

Posted: Wednesday 02 September 2020 22:42
by Jimster
The destination name needs to be exact the name as shown in Dashticz. So it should be destination: 'Deventer',
I tried it and it works.

Re: public transport destination doesn't work

Posted: Saturday 28 November 2020 1:40
by lholwerda
var publictransport = {}
publictransport.ovinfo = {
show_via: true,
station: 'berkel-en-rodenrijs/metrostation-berkel-westpolder',
destination:'rotterdam',
title:'metro berkel',
provider: '9292-metro',
show_lastupdate:true,
icon: 'fas fa-subway',
width:12,
results: 4
};

I have excactly the sam issue. anybody know the answer?

Re: public transport destination doesn't work

Posted: Saturday 28 November 2020 16:26
by BoelShit
Looking at the data (http://api.9292.nl/0.1/locations/berkel ... lang=nl-NL), the destination 'rotterdam' can't be found.
Try 'Slinge' or 'Den Haag Centraal'.

A generic tip for everyone for public transport, the destination is in 99% cases, the destinationname shown on the bus/tram/metro.

Re: public transport destination doesn't work

Posted: Wednesday 17 March 2021 22:04
by NilsNijenhuis
Jimster wrote: Wednesday 02 September 2020 22:42 The destination name needs to be exact the name as shown in Dashticz. So it should be destination: 'Deventer',
I tried it and it works.
Thanks!!!! so a capitole D makes the difference :o