$SEARCH_FORM = $util->makeSearchForm(); $map_zoom = "14"; $map_use_cluster = "false"; $use_caution = false; // node $id = isset($_GET["id"]) ? intval($_GET["id"]) : 1; $node = $db->getNodeById($id); $node_name = $node["name"]; $map_lat = $node["lat"]; $map_lon = $node["lon"]; $pref_id = $node["pref_id"]; $pref = $db->getPrefById($pref_id); $pref_title = "<a href=\"prefecture.php?id=" . $pref_id . "\">" . $pref["name"] . "</a>"; // routes $routes = $db->getRoutesByNodeId($id); list($list_route, $list_route_navi, $list_height) = $util->makeRouteList($routes, true); $map_corves = $db->getMapCorvesByRoutes($routes); $map_lines = $util->makeLines($map_corves); $route_num = count($routes); // nodes $nodes = $db->searchNodesPoint($map_lat, $map_lon, 5); $map_markers = $util->makeNodeMarkers($nodes); $list_node = $util->makeNodeListExcept($nodes, $id); $node_count = count($nodes); $node_num = $node_count > 0 ? $node_count - 1 : 0; ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>バス停 地図</title>
// company $id = isset($_GET["id"]) ? intval($_GET["id"]) : 1; $com = $db->getCompanyById($id); $com_name = $com["name"]; list($map_lat, $map_lon, $map_zoom) = $util->calcMapCenter($com["max_lat"], $com["min_lat"], $com["max_lon"], $com["min_lon"]); $url_home = ""; if ($com["url_home"]) { $url_home = "<a href=\"" . $com["url_home"] . "\" target=\"_blank\">[ホームページ]</a>"; } $url_search = ""; if ($com["url_search"]) { $url_search = "<a href=\"" . $com["url_search"] . "\" target=\"_blank\">[時刻表]</a>"; } // routes $routes = $db->getRoutesByComId($id); list($list, $list_navi, $list_height) = $util->makeRouteList($routes, false); $map_corves = $db->getMapCorvesByRoutes($routes); $map_lines = $util->makeLines($map_corves); $route_num = count($routes); // nodes $route_id_arr = $util->makeRouteIds($routes); $nodes = $db->getNodesByRouteIds($route_id_arr); $map_markers = $util->makeNodeMarkers($nodes); $node_num = count($nodes); // prefs $prefs = $db->getPrefsByCompanyId($id); list($pref_renge, $pref_delmita) = $util->makePrefRenge($prefs); $map_use_cluster = $node_num > 50 ? "true" : "false"; $use_caution = $node_num > 990 ? true : false; ?> <!doctype html>