Difference between revisions of "Template:GTFS map"

From Transit.Wiki
m (Text replacement - "|format=googlemaps" to "|format=googlemaps|scrollwheelzoom=yes")
m
 
(18 intermediate revisions by the same user not shown)
Line 4: Line 4:
  
 
{{#get_web_data:
 
{{#get_web_data:
url=https://apps.transitunlimited.org/gtfs/?source=https://apps.transitunlimited.org/gtfs/{{{agency}}}gtfs.csv&route_id={{{route|{{#ifeq:{{#show:{{BASEPAGENAME}}| ?rnum}}|0||{{#show:{{BASEPAGENAME}}| ?rnum}}}}{{#ifeq:{{#show:{{BASEPAGENAME}}| ?rlet}}|'||{{#show:{{BASEPAGENAME}}| ?rlet}}}}}}}
+
url=https://apps.transitunlimited.org/gtfs/?source=https://apps.transitunlimited.org/gtfs/{{{agency}}}gtfs.csv&route_id={{{route|{{#show:{{BASEPAGENAME}}|?rvalue}}}}}
 
|format=json
 
|format=json
 
|data=route=route_id,id=stop_code,displayname=stop_name,latitude=stop_lat,longitude=stop_lon,to=dest
 
|data=route=route_id,id=stop_code,displayname=stop_name,latitude=stop_lat,longitude=stop_lon,to=dest
Line 11: Line 11:
 
<div class=bigmap>{{#ask: [[-Place::{{BASEPAGENAME}}]]|?latlong|format=googlemaps|scrollwheelzoom=yes|icon=Mm_20_red.png
 
<div class=bigmap>{{#ask: [[-Place::{{BASEPAGENAME}}]]|?latlong|format=googlemaps|scrollwheelzoom=yes|icon=Mm_20_red.png
 
|locations={{#for_external_table:
 
|locations={{#for_external_table:
{{{latitude}}},{{{longitude}}}~{{{displayname}}}~{{{to}}}<br>Stop id: {{#if:{{{511|}}}|[{{SERVER}}/511_Departure_times?id={{{id}}}&agency=511 {{{id}}} (real time departures)]|{{#ifeq:{{{agency}}}|sacrt|{{{id}}} - [http://bustime.sacrt.com/bustime/eta/eta.jsp?id={{{id}}} Desktop], [http://m.sacrt.com/bdetails.aspx?stpid={{{id}}} Mobile]|{{{id}}}}}}}~File:Bus20.png;
+
{{{latitude}}},{{{longitude}}}~{{{displayname}}}~{{{to}}}<br>Stop id: {{#if:{{{511ag|}}}|[{{SERVER}}/Departure_times?id={{{id}}}&provider={{urlencode:{{#show:{{BASEPAGENAME}}|?provider}}}}&linkfrom={{urlencode:{{BASEPAGENAME}}}} {{{id}}} (real time departures)]|
 +
{{#switch:{{#show:{{BASEPAGENAME}}|?provider}}|MTS|NCTD=[{{SERVER}}/Departure_times_(San_Diego)?id={{{id}}}&provider={{urlencode:{{#show:{{BASEPAGENAME}}|?provider}}}}&linkfrom={{urlencode:{{BASEPAGENAME}}}} {{{id}}} (real time departures)]|Los Angeles Metro=[{{SERVER}}/Departure_times_(Los_Angeles)?id={{{id}}}&provider={{urlencode:{{#show:{{BASEPAGENAME}}|?provider}}}}&linkfrom={{urlencode:{{BASEPAGENAME}}}} {{{id}}} (real time departures)]|{{{id}}}}}}}~File:Bus20.png;
 
}}
 
}}
 
}}</div>
 
}}</div>
Line 17: Line 18:
 
Source: Transit agency.
 
Source: Transit agency.
  
{|class="wikitable sortable"
+
===Stop list===
 +
{|class="infodata broadtable sortable"
 
! Stop name !! Destination !! Stop code
 
! Stop name !! Destination !! Stop code
 
{{#for_external_table:<nowiki/>
 
{{#for_external_table:<nowiki/>
Line 23: Line 25:
 
{{!}}{{{displayname}}}
 
{{!}}{{{displayname}}}
 
{{!}}{{{to}}}
 
{{!}}{{{to}}}
{{!}}{{#if:{{{511|}}}|[{{SERVER}}/511_Departure_times?id={{{id}}}&agency=511 {{{id}}}]|{{#ifeq:{{{agency}}}|sacrt|{{{id}}} - [http://bustime.sacrt.com/bustime/eta/eta.jsp?id={{{id}}} Desktop], [http://m.sacrt.com/bdetails.aspx?stpid={{{id}}} Mobile]|{{{id}}}}}}}
+
{{!}}{{#if:{{{511ag|}}}|[{{SERVER}}/Departure_times?id={{{id}}}&provider={{urlencode:{{#show:{{BASEPAGENAME}}|?provider}}}}&linkfrom={{urlencode:{{BASEPAGENAME}}}} {{{id}}}]|{{#switch:{{#show:{{BASEPAGENAME}}|?provider}}|MTS|NCTD=[{{SERVER}}/Departure_times_(San_Diego)?id={{{id}}}&provider={{urlencode:{{#show:{{BASEPAGENAME}}|?provider}}}}&linkfrom={{urlencode:{{BASEPAGENAME}}}} {{{id}}}]|Los Angeles Metro=[{{SERVER}}/Departure_times_(Los_Angeles)?id={{{id}}}&provider={{urlencode:{{#show:{{BASEPAGENAME}}|?provider}}}}&linkfrom={{urlencode:{{BASEPAGENAME}}}} {{{id}}}]|{{{id}}}}}}}
 
}}
 
}}
 
|}
 
|}
 
</includeonly>
 
</includeonly>

Latest revision as of 22:26, 1 February 2023