Fixed agent view in public Visual Console
This commit is contained in:
parent
60360d8764
commit
66c8404fcf
|
@ -153,11 +153,15 @@ if ($layers != false) {
|
||||||
foreach ($groupsByAgentId as $agentId => $groupInfo) {
|
foreach ($groupsByAgentId as $agentId => $groupInfo) {
|
||||||
$agentNamesOfGroupItems[$agentId] = $groupInfo["agent_name"];
|
$agentNamesOfGroupItems[$agentId] = $groupInfo["agent_name"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$agentNames = array_unique($agentNamesByGroup + $agentNamesByLayer + $agentNamesOfGroupItems);
|
$agentNames = array_unique($agentNamesByGroup + $agentNamesByLayer + $agentNamesOfGroupItems);
|
||||||
|
|
||||||
foreach ($agentNames as $agentName) {
|
foreach ($agentNames as $agentName) {
|
||||||
$idAgent = agents_get_agent_id($agentName);
|
$idAgent = agents_get_agent_id($agentName);
|
||||||
|
if (!$idAgent) {
|
||||||
|
$idAgent = agents_get_agent_id_by_alias($agentName);
|
||||||
|
$idAgent = (!empty($idAgent)) ? $idAgent[0]['id_agente'] : 0;
|
||||||
|
}
|
||||||
$coords = gis_get_data_last_position_agent($idAgent);
|
$coords = gis_get_data_last_position_agent($idAgent);
|
||||||
|
|
||||||
if ($coords === false) {
|
if ($coords === false) {
|
||||||
|
|
Loading…
Reference in New Issue