--- a/geo/route.kml.php +++ b/geo/route.kml.php @@ -1,4 +1,5 @@ <?php + header('Content-Type: application/vnd.google-earth.kml+xml'); include ('../include/common.inc.php'); echo '<?xml version="1.0" encoding="UTF-8"?> @@ -14,15 +15,15 @@ </PolyStyle> </Style>'; $route = getRoute($routeid); - echo "\n<Placemark>\n"; - $link = curPageURL()."/../trip.php?routeid=".htmlspecialchars ($route["route_id"]); - echo "<name>".$route['route_short_name']."</name>"; - echo '<atom:link href="'.$link.'"/>'; - echo '<description><![CDATA[ <a href="'.$link.'">'.$route['route_short_name']." ".$route['route_long_name']."</a>]]> </description>"; +echo "\n<Placemark>\n"; + +$link = curPageURL() . "/../trip.php?routeid=" . htmlspecialchars($route["route_id"]); +echo "<name>" . $route['route_short_name'] . "</name>"; +echo '<atom:link href="' . $link . '"/>'; +echo '<description><![CDATA[ <a href="' . $link . '">' . $route['route_short_name'] . " " . $route['route_long_name'] . "</a>]]> </description>"; echo "<styleUrl>#yellowLineGreenPoly</styleUrl>"; - - $trip = getRouteNextTrip($routeid); - echo getTripShape($trip['trip_id']); +$trip = getRouteNextTrip($routeid); +echo getTripShape($trip['trip_id']); echo "</Placemark>\n</Document></kml>\n"; ?>