".__('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'], null, $layer['id_tmap_layer']);
// calling get_group_agents with none to obtain the names in the same case as they are in the DB.
$agentNames = get_group_agents($layer['tgrupo_id_grupo'],false,'none');
foreach ($agentNames as $agentName) {
$idAgent = get_agent_id($agentName);
$coords = getDataLastPositionAgent($idAgent);
if ($coords === false)
continue;
$icon = get_agent_icon_map($idAgent, true);
if ($show_history == 'y') {
addPath($layer['layer_name'], $idAgent);
}
addPoint($layer['layer_name'], $agentName, $coords['stored_latitude'], $coords['stored_longitude'], $icon, 20, 20, $idAgent, 'point_agent_info');
}
}
$timestampLastOperation = get_db_value_sql("SELECT UNIX_TIMESTAMP()");
activateSelectControl();
activateAjaxRefresh($layers, $timestampLastOperation);
}
?>
";
}
else {
echo "