From e46670ee389330fbdcb227e2d236d393f98740dd Mon Sep 17 00:00:00 2001
From: mdtrooper <tres.14159@gmail.com>
Date: Thu, 18 Feb 2010 17:32:14 +0000
Subject: [PATCH] 2010-02-18  Miguel de Dios  <miguel.dedios@artica.es>

	* operation/gis_maps/render_view.php: change to use new tables.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2378 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
---
 pandora_console/ChangeLog                          | 4 ++++
 pandora_console/operation/gis_maps/render_view.php | 6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog
index f09782e751..d8f5969daa 100644
--- a/pandora_console/ChangeLog
+++ b/pandora_console/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-18  Miguel de Dios  <miguel.dedios@artica.es>
+
+	* operation/gis_maps/render_view.php: change to use new tables.
+
 2010-02-18  Miguel de Dios  <miguel.dedios@artica.es>
 
 	* include/functions_gis.php: check in the function "addPath" if the agent
diff --git a/pandora_console/operation/gis_maps/render_view.php b/pandora_console/operation/gis_maps/render_view.php
index 4daa613cde..6c4b3b2bbb 100644
--- a/pandora_console/operation/gis_maps/render_view.php
+++ b/pandora_console/operation/gis_maps/render_view.php
@@ -78,9 +78,9 @@ if ($layers != false) {
 		$agentNames = get_group_agents($layer['tgrupo_id_grupo'],false,'none');
 		foreach ($agentNames as $agentName) {
 			$idAgent = get_agent_id($agentName);
-			$coords = get_agent_last_coords($idAgent);
+			$coords = getDataLastPositionAgent($idAgent);
 			
-			if ($coords['last_latitude'] == null)
+			if ($coords === false)
 				continue;
 			
 			$icon = get_agent_icon_map($idAgent, true);
@@ -88,7 +88,7 @@ if ($layers != false) {
 			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');
+			addPoint($layer['layer_name'], $agentName, $coords['stored_latitude'], $coords['stored_longitude'], $icon, 20, 20, $idAgent, 'point_agent_info');
 		}
 	}