2013-02-05 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_gis.php,
	include/javascript/openlayers.pandora.js, operation/menu.php,
	operation/gis_maps/render_view.php, godmode/menu.php: fixed the
	height of maps when the menu is short.
	
	Fixes: #3602800
	
	MERGED FROM PANDORA_4




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7586 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-02-05 11:30:04 +00:00
parent a95d32b26b
commit 576e4b9f75
6 changed files with 30 additions and 29 deletions

View File

@ -1,3 +1,14 @@
2013-02-05 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_gis.php,
include/javascript/openlayers.pandora.js, operation/menu.php,
operation/gis_maps/render_view.php, godmode/menu.php: fixed the
height of maps when the menu is short.
Fixes: #3602800
MERGED FROM PANDORA_4
2013-02-05 Sergio Martin <sergio.martin@artica.es>
* godmode/reporting/visual_console_builder.editor.php: Fixed missed

View File

@ -297,6 +297,7 @@ if (check_acl ($config['id_user'], 0, "PM")) {
}
}
if(!$config['pure']) {
menu_print_menu ($menu_godmode);
}

View File

@ -95,8 +95,7 @@ function gis_print_map($idDiv, $iniZoom, $latCenter, $lonCenter, $baselayers, $c
num_zoom_levels: null,
name: null,
type: null,
url: null
};";
url: null};";
echo "baselayer['type'] = '" . $baselayer['typeBaseLayer'] . "';";
echo "baselayer['name'] = '" . $baselayer['name'] . "';";
@ -125,6 +124,7 @@ function gis_print_map($idDiv, $iniZoom, $latCenter, $lonCenter, $baselayers, $c
echo "js_printMap(idDiv, initialZoom, centerLatitude, centerLongitude,
baselayerList, controlsList)";
echo "</script>";
}

View File

@ -120,14 +120,13 @@ function js_printMap(id_div, initial_zoom, center_latitude, center_longitude, ob
var option = {
controls: controlsList,
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
units: "m",
numZoomLevels: 18,
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34)
};
controls: controlsList,
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
units: "m",
numZoomLevels: 18,
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34)};
map = new OpenLayers.Map(id_div, option);
@ -142,7 +141,8 @@ function js_printMap(id_div, initial_zoom, center_latitude, center_longitude, ob
baseLayer = new OpenLayers.Layer.OSM(
objBaseLayers[baselayerIndex]['name'],
objBaseLayers[baselayerIndex]['url'],
{numZoomLevels: objBaseLayers[baselayerIndex]['num_zoom_levels'],
{
numZoomLevels: objBaseLayers[baselayerIndex]['num_zoom_levels'],
'sphericalMercator': true
}
);
@ -202,7 +202,8 @@ function js_printMap(id_div, initial_zoom, center_latitude, center_longitude, ob
objBaseLayers[baselayerIndex]['bb_top']
),
new OpenLayers.Size(objBaseLayers[baselayerIndex]['image_width'], objBaseLayers[baselayerIndex]['image_height']),
{projection: new OpenLayers.Projection("EPSG:4326"),
{
projection: new OpenLayers.Projection("EPSG:4326"),
numZoomLevels: objBaseLayers[baselayerIndex]['num_zoom_levels']
}
);

View File

@ -110,8 +110,7 @@ $times = array(
SECONDS_5MINUTES => __('5 minutes'),
SECONDS_10MINUTES => __('10 minutes'),
SECONDS_1HOUR => __('1 hour'),
SECONDS_2HOUR => __('2 hours')
);
SECONDS_2HOUR => __('2 hours'));
$buttons[] = '&nbsp;' . __('Refresh: ') . html_print_select($times, 'refresh_time', 60, 'changeRefreshTime(this.value);', '', 0, true, false, false) . "&nbsp;";
@ -134,7 +133,7 @@ if ($config["pure"] == 0) {
echo "<div id='map' style='width: 99%; height: 500px; border: 1px solid black;' ></div>";
}
else {
echo "<div id='map' style='position:absolute;top:40px; z-index:100; width: 100%; height:94%; min-height:500px; border: 1px solid black;' ></div>";
echo "<div id='map' style='position:absolute; top:40px; z-index:100; width: 100%; height: 500px; min-height:500px; border: 1px solid black;' ></div>";
}
gis_print_map('map', $map['zoom_level'], $map['initial_latitude'],
@ -144,7 +143,7 @@ if ($layers != false) {
foreach ($layers as $layer) {
gis_make_layer($layer['layer_name'], $layer['view_layer'], null, $layer['id_tmap_layer']);
// calling agents_get_group_agents with none to obtain the names in the same case as they are in the DB.
// calling agents_get_group_agents with none to obtain the names in the same case as they are in the DB.
$agentNamesByGroup = agents_get_group_agents($layer['tgrupo_id_grupo'],false,'none', true, true, false);
$agentNamesByLayer = gis_get_agents_layer($layer['id_tmap_layer'], array('nombre'));
@ -205,17 +204,4 @@ if ($config["pure"] != 0) {
</script>
<?php
}
else {
// Resize GIS map on normalview
?>
<script type="text/javascript">
$().ready(function(){
var new_height = $("#menu").height();
$("#map").css("height", new_height - 20);
});
</script>
<?php
}
?>

View File

@ -401,6 +401,8 @@ if (check_acl ($config['id_user'], 0, "AR")) {
// Save operation menu array to use in operation/extensions.php view
$operation_menu_array = $menu_operation;
if(!$config['pure']) {
menu_print_menu ($menu_operation, true);
}