예제 #1
0
define('MAPTYPE', "roadmap");
define('MOBILEMAP', $mobilemap);
// tabs are only "used" on the basic template and not really then either
$tabs = new Tabs(selfURL(), "tab", array("Map"));
$tabs_html = $tabs->html();
$tab = $tabs->active();
$tab = tab();
$width = pix("x", $prefix);
$height = pix("y", $prefix);
if ($_REQUEST['loc']) {
    $places = MapAdapter::getPlace($_REQUEST['loc']);
    $place = $places[0];
}
$parent = false;
if ($place['parent'] != '') {
    $places = MapAdapter::getParent($place['parent']);
    $parent_data = $places[0];
    $parent = true;
}
require "templates/{$prefix}/detail.html";
$page->output();
###################################################################################
### The functions to get place detail to work, primarily for the basic template
###################################################################################
function pix($label, $prefix)
{
    //set the resolution
    $resolution = array("basic" => array("220", "160"));
    $labels = array("x" => 0, "y" => 1);
    return $resolution[$prefix][$labels[$label]];
}