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 5eb69a1b29
commit a8ae3514bd
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> 2013-02-05 Sergio Martin <sergio.martin@artica.es>
* godmode/reporting/visual_console_builder.editor.php: Fixed missed * 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']) { if(!$config['pure']) {
menu_print_menu ($menu_godmode); 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, num_zoom_levels: null,
name: null, name: null,
type: null, type: null,
url: null url: null};";
};";
echo "baselayer['type'] = '" . $baselayer['typeBaseLayer'] . "';"; echo "baselayer['type'] = '" . $baselayer['typeBaseLayer'] . "';";
echo "baselayer['name'] = '" . $baselayer['name'] . "';"; 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, echo "js_printMap(idDiv, initialZoom, centerLatitude, centerLongitude,
baselayerList, controlsList)"; baselayerList, controlsList)";
echo "</script>"; echo "</script>";
} }

View File

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

View File

@ -110,8 +110,7 @@ $times = array(
SECONDS_5MINUTES => __('5 minutes'), SECONDS_5MINUTES => __('5 minutes'),
SECONDS_10MINUTES => __('10 minutes'), SECONDS_10MINUTES => __('10 minutes'),
SECONDS_1HOUR => __('1 hour'), 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;"; $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>"; echo "<div id='map' style='width: 99%; height: 500px; border: 1px solid black;' ></div>";
} }
else { 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'], gis_print_map('map', $map['zoom_level'], $map['initial_latitude'],
@ -205,17 +204,4 @@ if ($config["pure"] != 0) {
</script> </script>
<?php <?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 // Save operation menu array to use in operation/extensions.php view
$operation_menu_array = $menu_operation; $operation_menu_array = $menu_operation;
if(!$config['pure']) { if(!$config['pure']) {
menu_print_menu ($menu_operation, true); menu_print_menu ($menu_operation, true);
} }