Difference between revisions of "Template:LA Metro bus map"

From Transit.Wiki
m
m
Line 1: Line 1:
 
<includeonly>Bus stop map for [[{{BASEPAGENAME}}]].
 
<includeonly>Bus stop map for [[{{BASEPAGENAME}}]].
  
Not every trip serve every stop. See timetable for details.
+
It is possible that not every trip serve every stop. See timetable for details.
  
 
{{#get_web_data:
 
{{#get_web_data:
url=http://api.metro.net/agencies/lametro/routes/{{#show:{{BASEPAGENAME}}| ?rnum}}/stops/
+
url=http://webservices.nextbus.com/service/publicXMLFeed?command=routeConfig&a=lametro&r={{{route|{{#ifeq:{{#show:{{BASEPAGENAME}}| ?rnum}}|0||{{#show:{{BASEPAGENAME}}| ?rnum}}}}{{#ifeq:{{#show:{{BASEPAGENAME}}| ?rlet}}|'||{{#show:{{BASEPAGENAME}}| ?rlet}}}}}}}
|format=json
+
|format=XML
 
|use xpath
 
|use xpath
|data=latitude=latitude,displayname=display_name,id=id,longitude=longitude
+
|data=latitude=/body/route/stop/@lat,displayname=/body/route/stop/@title,longitude=/body/route/stop/@lon,id=/body/route/stop/@stopId
 
}}
 
}}
  
Line 16: Line 16:
 
}}
 
}}
  
Source: LACMTA
+
Source: Transit agency via NextBus API.
 
</includeonly>
 
</includeonly>

Revision as of 16:27, 14 June 2013