本文整理汇总了PHP中Map::renderMap方法的典型用法代码示例。如果您正苦于以下问题:PHP Map::renderMap方法的具体用法?PHP Map::renderMap怎么用?PHP Map::renderMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Map
的用法示例。
在下文中一共展示了Map::renderMap方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Map
<?php
require_once './map.class.php';
// Jeśli wysłano współrzędne, przekazujemy je do konstruktora Mapy, jeśli nie wywołujemy pusty konstruktor
if (isset($_POST['coordinates'])) {
$map = new Map($_POST['coordinates']);
} else {
$map = new Map();
}
?>
<html>
<head>
</head>
<body>
<?php
//renderujemy mapę
$map->renderMap();
?>
<form method="post">
Enter coordinates (row, col), e.g. A5
<input type="text" size="5" name="coordinates" autocomplete="off" autofocus />
<input type="submit" value="Prześlij"/>
</form>
</body>
</html>
示例2: foreach
if ($attendees) {
$render2 .= '<hr>' . "\n";
$render2 .= '<h2>Attendees:</h2>
<p>';
foreach ($attendees as $attendee) {
$render2 .= $attendee . ', ';
}
$render .= remove_lastchar($render2, ",") . '</p>' . "\n";
}
$render .= '<hr />';
// add map if there is only one property
if ($numRows == 1 && strlen($x) == 6 && strlen($y) == 6) {
$map = new Map();
$map->drawMap($x, $y);
$map->addLocator($x, $y);
$render .= $map->renderMap();
}
break;
case "Inspection":
$app["type"] = $app["subtype"] . ' ' . $app["type"];
$sql = "SELECT\ndea_id,\nCONCAT(pro_addr1,' ',pro_addr2,' ',pro_addr3,' ',pro_postcode) AS pro_addr,\nd2a_id,d2a_ord,d2a_cv,d2a_feedback,\ncon_id,CONCAT(con_fname,' ',con_sname) AS con_name,com_title,\nGROUP_CONCAT(DISTINCT CONCAT(vendor.cli_salutation,' ',vendor.cli_fname,' ',vendor.cli_sname,' (',vendor_tel.tel_number,' - ',vendor_tel.tel_type,')') SEPARATOR '<br />') AS vendor_name\nFROM appointment\nLEFT JOIN link_deal_to_appointment ON appointment.app_id = link_deal_to_appointment.d2a_app\nLEFT JOIN deal ON link_deal_to_appointment.d2a_dea = deal.dea_id\nLEFT JOIN property ON deal.dea_prop = property.pro_id\n\nLEFT JOIN link_client_to_instruction ON link_client_to_instruction.dealId = deal.dea_id\nLEFT JOIN client AS vendor ON link_client_to_instruction.clientId = vendor.cli_id\n\nLEFT JOIN con2app ON appointment.app_id = con2app.c2a_app\nLEFT JOIN contact ON con2app.c2a_con = contact.con_id\nLEFT JOIN company ON contact.con_company = company.com_id\n\nLEFT JOIN tel AS vendor_tel ON vendor.cli_id = vendor_tel.tel_cli\nWHERE\nappointment.app_id = {$app_id}\nGROUP BY deal.dea_id\nORDER BY link_deal_to_appointment.d2a_ord ASC\n";
//echo $sql;
$q = $db->query($sql);
if (DB::isError($q)) {
die("db error: " . $q->getMessage());
}
$numRows = $q->numRows();
$count = 1;
while ($row = $q->fetchRow()) {
// array of properties (deals)
$deals[$row["d2a_ord"]] = array('dea_id' => $row["dea_id"], 'd2a_id' => $row["d2a_id"], 'd2a_ord' => $row["d2a_ord"], 'd2a_cv' => $row["d2a_cv"], 'd2a_feedback' => $row["d2a_feedback"], 'addr' => $row["pro_addr"], 'vendor' => $row["vendor_name"]);