Commit b910d63c37d106b8d26d47005251911b063aa24d

Authored by Edmar Moretti
1 parent f922fe4f

Correção na inclusão dos mapas de fundo no mashup que utiliza OL3

Showing 2 changed files with 40 additions and 18 deletions   Show diff stats
mashups/openlayers3.php
... ... @@ -833,42 +833,63 @@ i3GEO.editorOL.kml = [<?php
833 833 }
834 834 ?>];
835 835 i3GEO.editorOL.marca = "<?php
836   - if(isset($marca)){echo $marca;}
837   - else
838   - {echo "../pacotes/openlayers/img/marker-gold.png";}
  836 + if(isset($marca)){
  837 + echo $marca;
  838 + }
  839 + else{
  840 + echo "../pacotes/openlayers/img/marker-gold.png";
  841 + }
839 842 ?>";
840 843 i3GEO.editorOL.tiles = "<?php
841   - if(isset($tiles)){echo $tiles;}
842   - else
843   - {echo "true";}
  844 + if(isset($tiles)){
  845 + echo $tiles;
  846 + }
  847 + else{
  848 + echo "true";
  849 + }
844 850 ?>";
845 851 i3GEO.editorOL.incluilayergrafico = "<?php
846   - if(isset($incluilayergrafico)){echo $incluilayergrafico;}
847   - else
848   - {echo "true";}
  852 + if(isset($incluilayergrafico)){
  853 + echo $incluilayergrafico;
  854 + }
  855 + else{
  856 + echo "true";
  857 + }
849 858 ?>";
850 859 i3GEO.editorOL.ativalayerswitcher = "<?php
851   - if(isset($ativalayerswitcher)){echo $ativalayerswitcher;}
852   - else
853   - {echo "false";}
  860 + if(isset($ativalayerswitcher)){
  861 + echo $ativalayerswitcher;
  862 + }
  863 + else{
  864 + echo "false";
  865 + }
854 866 ?>";
855 867 i3GEO.editorOL.ativarodadomouse = "<?php
856   - if(isset($ativarodadomouse)){echo $ativarodadomouse;}
857   - else
858   - {echo "true";}
  868 + if(isset($ativarodadomouse)){
  869 + echo $ativarodadomouse;
  870 + }
  871 + else{
  872 + echo "true";
  873 + }
859 874 ?>";
860 875  
861 876 i3GEO.editorOL.legendahtml = "<?php
862   - if(isset($legendahtml)){echo $legendahtml;}
863   - else
864   - {echo "true";}
  877 + if(isset($legendahtml)){
  878 + echo $legendahtml;
  879 + }
  880 + else {
  881 + echo "true";
  882 + }
865 883 ?>";
866 884  
867 885 <?php
868 886 if(isset($fundo) && $fundo != ""){
869 887 echo "i3GEO.editorOL.fundo = '".implode(",",$fundo)."';";
  888 +} else {
  889 + echo "i3GEO.editorOL.fundo = '';";
870 890 }
871 891  
  892 +
872 893 if(isset($controles)){
873 894 echo "i3GEO.editorOL.controles = [".implode(",",$objControles)."];";
874 895 }
... ...
ogc.php
... ... @@ -1163,6 +1163,7 @@ function carregaCacheImagem($cachedir,$map,$tms){
1163 1163 $nome = $cachedir.$tms;
1164 1164 }
1165 1165 $nome = str_replace(".png","",$nome).".png";
  1166 + //TODO verificar esses cabecalhos e comparar com geoserver
1166 1167 if(file_exists($nome)){
1167 1168 header('Content-Length: '.filesize($nome));
1168 1169 header('Content-Type: image/png');
... ...