2010-03-04 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_gis.php: in function "printMap2" disable by default
	to add the control "layerSwitcher".

	* operation/gis_maps/render_view.php: add the "layerSwitcher" to controls to
	show.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2472 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-03-04 17:43:36 +00:00
parent 112e452fd3
commit ba344c2a39
3 changed files with 26 additions and 10 deletions

View File

@ -1,3 +1,11 @@
2010-03-04 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_gis.php: in function "printMap2" disable by default
to add the control "layerSwitcher".
* operation/gis_maps/render_view.php: add the "layerSwitcher" to controls to
show.
2010-03-04 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_gis.php: in function "getAgentMap" change the controls

View File

@ -59,33 +59,41 @@ function printMap2($idDiv, $iniZoom, $numLevelZooms, $latCenter, $lonCenter, $ba
var controlVar = [
<?php
foreach ($controls as $control) {
$first = true;
foreach ($controls as $control) {
if (!$first)
echo ',';
$first = false;
switch ($control) {
case 'Navigation':
echo "new OpenLayers.Control.Navigation(),";
echo "new OpenLayers.Control.Navigation()";
break;
case 'MousePosition':
echo "new OpenLayers.Control.MousePosition(),";
echo "new OpenLayers.Control.MousePosition()";
break;
case 'OverviewMap':
echo "new OpenLayers.Control.OverviewMap(),";
echo "new OpenLayers.Control.OverviewMap()";
break;
case 'PanZoom':
echo "new OpenLayers.Control.PanZoom(),";
echo "new OpenLayers.Control.PanZoom()";
break;
case 'PanZoomBar':
echo "new OpenLayers.Control.PanZoomBar(),";
echo "new OpenLayers.Control.PanZoomBar()";
break;
case 'ScaleLine':
echo "new OpenLayers.Control.ScaleLine(),";
echo "new OpenLayers.Control.ScaleLine()";
break;
case 'Scale':
echo "new OpenLayers.Control.Scale(),";
echo "new OpenLayers.Control.Scale()";
break;
case 'layerSwitcher':
echo "new OpenLayers.Control.LayerSwitcher()";
break;
}
}
?>
new OpenLayers.Control.LayerSwitcher()];
];
var option = {

View File

@ -71,7 +71,7 @@ if ($gmap_layer === true) {
<?php
}
$controls = array('PanZoomBar', 'ScaleLine', 'Navigation', 'MousePosition');
$controls = array('PanZoomBar', 'ScaleLine', 'Navigation', 'MousePosition', 'layerSwitcher');
$layers = getLayers($idMap);