Files
pmgr/site/views/maps/view.ctp
abijah 2c85566ffc The map is working quite well now, including the legend. Next steps will be to add the sidemenu.
git-svn-id: file:///svn-source/pmgr/branches/initial_20090526@36 97e9348a-65ac-dc4b-aefc-98561f571b83
2009-05-29 05:10:46 +00:00

52 lines
1.1 KiB
PHP

<?php /* -*- mode:PHP -*- */ ?>
<DIV class="map">
<MAP name="mapzones">
<?php
{// for indentation purposes
// Go through each unit, adding a clickable region for the unit
foreach ($info['units'] AS $unit){
echo(' <area shape="rect"' .
' coords="' .
$unit['left'] . ',' .
$unit['top'] . ',' .
$unit['right'] . ',' .
$unit['bottom'] .
'" href="' .
$html->url(array('controller' => 'units',
'action' => 'view',
$unit['id'])) .
'" alt="' .
$unit['name'] .
'">' . "\n");
}
}// for indentation purposes
?>
</MAP>
<?php
echo $html->image(array('controller' => 'maps',
'action' => 'map',
$info['map_id'],
$info['width']),
array('alt' => 'Site Map',
'class' => 'map',
'border' => 0,
'usemap' => '#mapzones'));
?>
</DIV>
<DIV class="legend">
<?php
echo $html->image(array('controller' => 'maps',
'action' => 'legend',
$info['map_id'],
$info['width']/2),
array('alt' => 'Site Map Legend',
'class' => 'legend'));
?>
</DIV>