diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog
index ba7a153e67..a1d7397fa2 100644
--- a/pandora_console/ChangeLog
+++ b/pandora_console/ChangeLog
@@ -1,3 +1,11 @@
+2010-03-01  Miguel de Dios  <miguel.dedios@artica.es>
+
+	* include/functions_gis.php: now function "getAgentMap" return true or false
+	if there is default map or not.
+
+	* operation/agentes/gis_view.php, godmode/agentes/agent_conf_gis.php: show
+	message of error when there isn't a default map
+
 2010-03-01  Miguel de Dios  <miguel.dedios@artica.es>
 
 	* extras/pandoradb_migrate_v3.0_to_v3.1.sql: update with the new data in
diff --git a/pandora_console/godmode/agentes/agent_conf_gis.php b/pandora_console/godmode/agentes/agent_conf_gis.php
index bd14250f50..1ba56561cf 100644
--- a/pandora_console/godmode/agentes/agent_conf_gis.php
+++ b/pandora_console/godmode/agentes/agent_conf_gis.php
@@ -31,7 +31,10 @@ $agent_name = get_agent_name($id_agente);
 
 /* Map with the current position */
 echo "<div id=\"" . $agent_name . "_agent_map\"  style=\"border:1px solid black; width:98%; height: 30em;\"></div>";
-echo getAgentMap($id_agente, "500px", "98%", false);
+
+if (!getAgentMap($id_agente, "500px", "98%", false)) {
+	echo "<br /><div class='nf'>" . __("There is no default map.") . "</div>";
+} 
 
 
 
diff --git a/pandora_console/include/functions_gis.php b/pandora_console/include/functions_gis.php
index de3a7db309..526fd1480b 100644
--- a/pandora_console/include/functions_gis.php
+++ b/pandora_console/include/functions_gis.php
@@ -775,7 +775,7 @@ function updateMap($idMap, $map_name, $map_initial_longitude, $map_initial_latit
  * @param $centerInAgent boolean Default is true, set the map center in the icon agent. 
  * @param $history_time: Number of seconds in the past to show from where to start the history path.
  *
- * @return A div tag with the map and the agent and the history path if asked.
+ * @return boolean True ok and false fail. 
  */
 function getAgentMap($agent_id, $heigth, $width, $show_history = false, $centerInAgent = true, $history_time = 86400) {
 	$defaultMap = get_db_all_rows_sql("
@@ -786,6 +786,10 @@ function getAgentMap($agent_id, $heigth, $width, $show_history = false, $centerI
 		WHERE t1.default_map = 1 AND t2.tgis_map_id_tgis_map = t1.id_tgis_map
 			AND t2.default_map_connection = 1
 			AND t3.id_tmap_connection = t2.tgis_map_connection_id_tmap_connection");
+	
+	if ($defaultMap === false)
+		return false;
+	
 	$defaultMap = $defaultMap[0];
 	
 	$agent_position = getDataLastPositionAgent($agent_id);
@@ -837,6 +841,8 @@ function getAgentMap($agent_id, $heigth, $width, $show_history = false, $centerI
 		</script>
 		<?php
 	}
+	
+	return true;
 }
 
 /**
diff --git a/pandora_console/operation/agentes/gis_view.php b/pandora_console/operation/agentes/gis_view.php
index a1c524cf52..559373967f 100644
--- a/pandora_console/operation/agentes/gis_view.php
+++ b/pandora_console/operation/agentes/gis_view.php
@@ -40,7 +40,9 @@ echo "<h3>" . __("Map with the last position/s") . " " . human_time_description
 
 /* Map with the current position */
 echo "<div id=\"".$agent_name."_agent_map\"  style=\"border:1px solid black; width:98%; height: 30em;\"></div>";
-echo getAgentMap($agentId, "500px", "98%", true, true, $period);
+if (!getAgentMap($agentId, "500px", "98%", true, true, $period)) {
+	echo "<br /><div class='nf'>" . __("There is no default map.") . "</div>";
+} 
 
 $timestampLastOperation = get_db_value_sql("SELECT UNIX_TIMESTAMP()");