2010-01-27 Pablo de la Concepción <pablo.concepcion@artica.es>
* include/functions_gis.php: Updated getMapConf to work with the new database model; git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2313 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
e38858753e
commit
9ee66a0d55
|
@ -1,3 +1,8 @@
|
|||
2010-01-27 Pablo de la Concepción <pablo.concepcion@artica.es>
|
||||
|
||||
* include/functions_gis.php: Updated getMapConf to work with the new
|
||||
database model;
|
||||
|
||||
2010-01-27 Miguel de Dios <miguel.dedios@artica.es>
|
||||
* include/functions_gis.php: add the prototipe of function "saveMap2" at
|
||||
the moment for to develop in next hours or days.
|
||||
|
|
|
@ -292,21 +292,18 @@ function addPointPath($layerName, $lat, $lon, $color, $manual = 1, $id) {
|
|||
function getMaps() {
|
||||
return get_db_all_rows_in_table ('tgis_map', 'map_name');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the configuration of all the base layers of a map
|
||||
*
|
||||
* @param $idMap: Map identifier of the map to get the configuration
|
||||
*
|
||||
* @return An array of arrays of configuration parameters
|
||||
*/
|
||||
function getMapConf($idMap) {
|
||||
$confsEncode = get_db_all_rows_sql('SELECT * FROM tgis_map_connection WHERE tgis_map_id_tgis_map = ' . $idMap);
|
||||
|
||||
$confsDecode = array();
|
||||
|
||||
if ($confsEncode !== false) {
|
||||
foreach ($confsEncode as $confEncode) {
|
||||
$temp = json_decode($confEncode['conection_data'], true);
|
||||
|
||||
$confsDecode[$temp['type']][] = $temp['content'];
|
||||
}
|
||||
}
|
||||
|
||||
return $confsDecode;
|
||||
$mapConfs= get_db_all_rows_sql('SELECT tconn.* FROM tgis_map_connection AS tconn, tgis_map_has_tgis_map_connection AS trel
|
||||
WHERE trel.tgis_map_connection_id_tmap_connection = tconn.id_tmap_connection AND trel.tgis_map_id_tgis_map = ' . $idMap);
|
||||
print_r($mapConfs);
|
||||
return $mapConfs;
|
||||
}
|
||||
|
||||
function getLayers($idMap) {
|
||||
|
@ -541,7 +538,6 @@ function saveMap2($map_name, $map_initial_longitude, $map_initial_latitude,
|
|||
$map_default_longitude, $map_default_latitude, $map_default_altitude,
|
||||
$map_group_id, $map_connection_list, $arrayLayers) {
|
||||
}
|
||||
?>
|
||||
|
||||
/**
|
||||
* Get the configuration parameters of a map connection
|
||||
|
@ -589,4 +585,3 @@ function getAgentMap($agent_id, $heigth, $width, $show_history = false, $history
|
|||
addPoint("layer_for_agent_".$agent_name, $agent_name, $agent_position['last_latitude'], $agent_position['last_longitude'], $agent_icon);
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
Loading…
Reference in New Issue