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/site@36 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-05-29 05:10:46 +00:00
parent 77c038e880
commit 50449205b4
3 changed files with 30 additions and 18 deletions

View File

@@ -21,7 +21,7 @@ foreach ($info['palate'] AS &$area) {
}
}
if ($info['border']) {
if (isset($info['border'])) {
// Create border around image
imageline($image,
0, 0,
@@ -68,14 +68,14 @@ foreach ($info['units'] AS $unit) {
// If the unit is wide enough, run the text horizontal,
// otherwise, we'll have to run it vertical.
if ($unit['width'] > 100) {
imagestring($image, 1,
if ($unit['width'] > 40 || ($unit['width'] >= $unit['depth'])) {
imagestring($image, $unit['width']/25,
$unit['left']+3, $unit['top']+3,
$unit['name'],
$info['palate']['unit'][$unit['status']]['fg']['color']);
}
else {
imagestringup($image, 1,
imagestringup($image, $unit['depth']/25,
$unit['left']+3, $unit['bottom']-3,
$unit['name'],
$info['palate']['unit'][$unit['status']]['fg']['color']);

View File

@@ -31,6 +31,7 @@
$info['width']),
array('alt' => 'Site Map',
'class' => 'map',
'border' => 0,
'usemap' => '#mapzones'));
?>
@@ -41,9 +42,9 @@
echo $html->image(array('controller' => 'maps',
'action' => 'legend',
$info['map_id'],
$info['width']),
$info['width']/2),
array('alt' => 'Site Map Legend',
'class' => 'map'));
'class' => 'legend'));
?>
</DIV>