Commit 1ffd0a869d2a148d26912f4119b626ec9e89a59c

Authored by Edmar Moretti
1 parent 5d2b7f50

Largura e altura do mashup openlayers qd não definidos assume-se 100%

Showing 1 changed file with 11 additions and 5 deletions   Show diff stats
mashups/openlayers.php
... ... @@ -8,10 +8,10 @@ error_reporting(0);
8 8 //
9 9 if(!isset($temas))
10 10 {ajuda();}
11   -if(!isset($largura))
12   -{$largura = 400;}
13   -if(!isset($altura))
14   -{$altura = 400;}
  11 +if(isset($largura) && !isset($altura))
  12 +{$altura = $largura;}
  13 +if(isset($altura) && !isset($largura))
  14 +{$largura = $altura;}
15 15 //
16 16 //define quais controles serão mostrados no mapa
17 17 //
... ... @@ -265,7 +265,13 @@ Parâmetros:
265 265 </style>
266 266 </head>
267 267 <body class=" yui-skin-sam">
268   -<div id=i3geoMapa style="width:<?php echo $largura;?>px;height:<?php echo $altura;?>px;"></div>
  268 +<?php
  269 +if(isset($largura) && $largura != "")
  270 +{echo '<div id=i3geoMapa style="width:'.$largura.'px;height:'.$altura.'px;"></div>';}
  271 +else
  272 +{echo '<div id=i3geoMapa style="width:100%;height:100%"></div>';}
  273 +
  274 +?>
269 275 <div id=i3geoSelTemaAtivo style="height:15em;z-index:3000" class=" yui-skin-sam"></div>
270 276 <script>
271 277 i3GEO.editorOL.layersIniciais = [<?php
... ...