Commit 85c3eb1e67dc76af8258533deb2467e5ba631aac
1 parent
f502f42a
Exists in
master
and in
7 other branches
Correção no teste rapido para não usar imagem em cache
Showing
2 changed files
with
9 additions
and
6 deletions
Show diff stats
admin/js/editormapfile.js
@@ -316,7 +316,7 @@ function testarMapfileRapido(codigoMap,extensao) | @@ -316,7 +316,7 @@ function testarMapfileRapido(codigoMap,extensao) | ||
316 | $i("testeRapido"+codigoMap).style.display = "none"; | 316 | $i("testeRapido"+codigoMap).style.display = "none"; |
317 | return; | 317 | return; |
318 | } | 318 | } |
319 | - $i("testeRapido"+codigoMap).src = "../../testamapfile.php?tipo=grande&map="+codigoMap+".map"; | 319 | + $i("testeRapido"+codigoMap).src = "../../testamapfile.php?cache=nao&tipo=grande&map="+codigoMap+".map"; |
320 | $i("testeRapido"+codigoMap).style.display = "block"; | 320 | $i("testeRapido"+codigoMap).style.display = "block"; |
321 | } | 321 | } |
322 | function testarMapfile(codigoMap,extensao) | 322 | function testarMapfile(codigoMap,extensao) |
testamapfile.php
@@ -125,7 +125,10 @@ if (isset($map) && $map != "") | @@ -125,7 +125,10 @@ if (isset($map) && $map != "") | ||
125 | echo "<hr><br><br><a href='testamapfile.php?map=todos&iniciar=".($iniciar+10)."' >Próximos mapas</a>"; | 125 | echo "<hr><br><br><a href='testamapfile.php?map=todos&iniciar=".($iniciar+10)."' >Próximos mapas</a>"; |
126 | } | 126 | } |
127 | else{ | 127 | else{ |
128 | - verifica($map,$solegenda,$tabela); | 128 | + if(empty($cache)){ |
129 | + $cache = "sim"; | ||
130 | + } | ||
131 | + verifica($map,$solegenda,$tabela,$cache); | ||
129 | } | 132 | } |
130 | } | 133 | } |
131 | ?> | 134 | ?> |
@@ -152,15 +155,15 @@ if (isset($map) && $map != "") | @@ -152,15 +155,15 @@ if (isset($map) && $map != "") | ||
152 | </html> | 155 | </html> |
153 | 156 | ||
154 | <?php | 157 | <?php |
155 | -function verifica($map,$solegenda,$tabela){ | 158 | +function verifica($map,$solegenda,$tabela,$cache="sim"){ |
156 | global $tipo,$locaplic,$postgis_mapa,$versao,$base,$dir_tmp,$tempo; | 159 | global $tipo,$locaplic,$postgis_mapa,$versao,$base,$dir_tmp,$tempo; |
157 | $mapUrl = $map; | 160 | $mapUrl = $map; |
158 | - if ($tipo == "mini" && file_exists('temas/miniaturas/'.$map.".mini.png")){ | 161 | + if ($tipo == "mini" && file_exists('temas/miniaturas/'.$map.".mini.png") && $cache == "sim"){ |
159 | Header("Content-type: image/png"); | 162 | Header("Content-type: image/png"); |
160 | ImagePng(ImageCreateFromPNG('temas/miniaturas/'.$map.".mini.png")); | 163 | ImagePng(ImageCreateFromPNG('temas/miniaturas/'.$map.".mini.png")); |
161 | exit; | 164 | exit; |
162 | } | 165 | } |
163 | - if ($tipo == "grande" && file_exists('temas/miniaturas/'.$map.".grande.png")){ | 166 | + if ($tipo == "grande" && file_exists('temas/miniaturas/'.$map.".grande.png") && $cache == "sim"){ |
164 | Header("Content-type: image/png"); | 167 | Header("Content-type: image/png"); |
165 | ImagePng(ImageCreateFromPNG('temas/miniaturas/'.$map.".grande.png")); | 168 | ImagePng(ImageCreateFromPNG('temas/miniaturas/'.$map.".grande.png")); |
166 | exit; | 169 | exit; |
@@ -510,4 +513,4 @@ function zoomTema($nomelayer,&$mapa){ | @@ -510,4 +513,4 @@ function zoomTema($nomelayer,&$mapa){ | ||
510 | $extatual->setextent($ret[0],$ret[1],$ret[2],$ret[3]); | 513 | $extatual->setextent($ret[0],$ret[1],$ret[2],$ret[3]); |
511 | } | 514 | } |
512 | } | 515 | } |
513 | -?> | ||
514 | \ No newline at end of file | 516 | \ No newline at end of file |
517 | +?> |