Try to adapt to new route destination detection
[busui.git] / geo / route.kml.php
blob:a/geo/route.kml.php -> blob:b/geo/route.kml.php
<?php <?php
header('Content-Type: application/vnd.google-earth.kml+xml'); header('Content-Type: application/vnd.google-earth.kml+xml');
include ('../include/common.inc.php'); include ('../include/common.inc.php');
echo '<?xml version="1.0" encoding="UTF-8"?> echo '<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"><Document>'; <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"><Document>';
echo ' echo '
<Style id="yellowLineGreenPoly"> <Style id="yellowLineGreenPoly">
<LineStyle> <LineStyle>
<color>7f00ff00</color> <color>7f00ff00</color>
<width>4</width> <width>4</width>
</LineStyle> </LineStyle>
<PolyStyle> <PolyStyle>
<color>7f00ffff</color> <color>7f00ffff</color>
</PolyStyle> </PolyStyle>
</Style>'; </Style>';
$route = getRoute($routeid); $route = getRoute($routeid);
echo "\n<Placemark>\n"; echo "\n<Placemark>\n";
$link = curPageURL()."/../trip.php?routeid=".htmlspecialchars ($route["route_id"]); $link = curPageURL()."/../trip.php?routeid=".htmlspecialchars ($route["route_id"]);
echo "<name>".$route['route_short_name']."</name>"; echo "<name>".$route['route_short_name']."</name>";
echo '<atom:link href="'.$link.'"/>'; echo '<atom:link href="'.$link.'"/>';
echo '<description><![CDATA[ <a href="'.$link.'">'.$route['route_short_name']." ".$route['route_long_name']."</a>]]> </description>"; echo '<description><![CDATA[ <a href="'.$link.'">'.$route['route_short_name']." ".$route['route_long_name']."</a>]]> </description>";
echo "<styleUrl>#yellowLineGreenPoly</styleUrl>"; echo "<styleUrl>#yellowLineGreenPoly</styleUrl>";
   
$trips = getRouteTrips($routeid); $trip = getRouteNextTrip($routeid);
echo getTripShape($trips[0]['trip_id']); echo getTripShape($trip['trip_id']);
   
echo "</Placemark>\n</Document></kml>\n"; echo "</Placemark>\n</Document></kml>\n";
?> ?>