".__('Visual console')." » ".__('Map');
echo " " . $map['map_name'] . " ";
if ($config["pure"] == 0) {
echo '';
print_image ("images/fullscreen.png", false, array ("title" => __('Full screen mode')));
echo "";
} else {
echo '';
print_image ("images/normalscreen.png", false, array ("title" => __('Back to normal mode')));
echo "";
}
echo " ";
if (give_acl ($config["id_user"], $map['group_id'], "AW"))
echo ''.print_image ("images/setup.png", true, array ("title" => __('Setup'))).'';
echo "";
printMap('map', $map['zoom_level'], $numZoomLevels, $map['initial_latitude'],
$map['initial_longitude'], $baselayers, $controls);
if ($layers != false) {
foreach ($layers as $layer) {
makeLayer($layer['layer_name'], $layer['view_layer']);
$agentNames = get_group_agents($layer['tgrupo_id_grupo']);
foreach ($agentNames as $agentName) {
$idAgent = get_agent_id($agentName);
$coords = get_agent_last_coords($idAgent);
if ($coords['last_latitude'] == null)
continue;
switch (get_agent_status($idAgent)) {
case 1:
case 4:
//Critical (BAD or ALERT)
$status = "bad";
break;
case 0:
//Normal (OK)
$status = "ok";
break;
case 2:
//Warning
$status = "warning";
break;
default:
// Default is Grey (Other)
$status = false;
}
$icon = get_agent_icon_map($idAgent, $status);
if ($show_history=='y'){
addPath($layer['layer_name'], $idAgent);
}
addPoint($layer['layer_name'], $agentName, $coords['last_latitude'], $coords['last_longitude'], $icon, 20, 20, $idAgent, 'point_agent_info');
}
}
activateSelectControl();
}
?>
";
}
else {
echo "