Commit ea046a7730b5a963ba49b50ba8f6af8673d6928c
1 parent
ef374e57
Exists in
master
and in
7 other branches
Otimização dos loops do tipo for( nos programas PHP
Showing
13 changed files
with
41 additions
and
41 deletions
Show diff stats
classesphp/classe_alteraclasse.php
| @@ -120,7 +120,7 @@ cores {array} - array com a lista de valores RGB | @@ -120,7 +120,7 @@ cores {array} - array com a lista de valores RGB | ||
| 120 | $numclasses = $this->layer->numclasses; | 120 | $numclasses = $this->layer->numclasses; |
| 121 | if ($numclasses > 0) | 121 | if ($numclasses > 0) |
| 122 | { | 122 | { |
| 123 | - for ($i=0; $i < $numclasses; $i++) | 123 | + for ($i=0; $i < $numclasses; ++$i) |
| 124 | { | 124 | { |
| 125 | $classe = $this->layer->getClass($i); | 125 | $classe = $this->layer->getClass($i); |
| 126 | $estilo = $classe->getstyle(0); | 126 | $estilo = $classe->getstyle(0); |
classesphp/classe_atlas.php
| @@ -153,7 +153,7 @@ locaplic - localiza&ccedil;&atilde;o do i3geo no servidor | @@ -153,7 +153,7 @@ locaplic - localiza&ccedil;&atilde;o do i3geo no servidor | ||
| 153 | $layers = array(); | 153 | $layers = array(); |
| 154 | $mapa = ms_newMapObj($map_file); | 154 | $mapa = ms_newMapObj($map_file); |
| 155 | $numlayers = $mapa->numlayers; | 155 | $numlayers = $mapa->numlayers; |
| 156 | - for ($i=0;$i < $numlayers;$i++) | 156 | + for ($i=0;$i < $numlayers;++$i) |
| 157 | { | 157 | { |
| 158 | $l = $mapa->getlayer($i); | 158 | $l = $mapa->getlayer($i); |
| 159 | if (($l->getmetadata("ATLAS")) != "nao") | 159 | if (($l->getmetadata("ATLAS")) != "nao") |
| @@ -206,7 +206,7 @@ locaplic - localiza&ccedil;&atilde;o do i3geo no servidor | @@ -206,7 +206,7 @@ locaplic - localiza&ccedil;&atilde;o do i3geo no servidor | ||
| 206 | 206 | ||
| 207 | $mapa = ms_newMapObj($map_file); | 207 | $mapa = ms_newMapObj($map_file); |
| 208 | $numlayers = $mapa->numlayers; | 208 | $numlayers = $mapa->numlayers; |
| 209 | - for ($i=0;$i < $numlayers;$i++) | 209 | + for ($i=0;$i < $numlayers;++$i) |
| 210 | { | 210 | { |
| 211 | $l = $mapa->getlayer($i); | 211 | $l = $mapa->getlayer($i); |
| 212 | if (($l->getmetadata("ATLAS")) != "nao") | 212 | if (($l->getmetadata("ATLAS")) != "nao") |
classesphp/classe_atributos.php
| @@ -553,7 +553,7 @@ $onde - Tipo de abrang&ecirc;ncia espacial (brasil ou mapa) | @@ -553,7 +553,7 @@ $onde - Tipo de abrang&ecirc;ncia espacial (brasil ou mapa) | ||
| 553 | if (@$l->queryByrect($ret) == MS_SUCCESS) | 553 | if (@$l->queryByrect($ret) == MS_SUCCESS) |
| 554 | { | 554 | { |
| 555 | $res_count = $l->getNumresults(); | 555 | $res_count = $l->getNumresults(); |
| 556 | - for ($i = 0; $i < $res_count; $i++) | 556 | + for ($i = 0; $i < $res_count; ++$i) |
| 557 | { | 557 | { |
| 558 | $valitem = array(); | 558 | $valitem = array(); |
| 559 | if($this->v == 6){ | 559 | if($this->v == 6){ |
| @@ -743,7 +743,7 @@ $resolucao - Resolucao de busca. | @@ -743,7 +743,7 @@ $resolucao - Resolucao de busca. | ||
| 743 | function identifica($opcao,$xy,$resolucao) | 743 | function identifica($opcao,$xy,$resolucao) |
| 744 | { | 744 | { |
| 745 | $numlayers = $mapa->numlayers; | 745 | $numlayers = $mapa->numlayers; |
| 746 | - for ($i=0;$i < $numlayers;$i++) | 746 | + for ($i=0;$i < $numlayers;++$i) |
| 747 | { | 747 | { |
| 748 | $layer = $mapa->getlayer($i); | 748 | $layer = $mapa->getlayer($i); |
| 749 | $tem = $l->name; | 749 | $tem = $l->name; |
| @@ -973,7 +973,7 @@ $wkt - (opcional) {boolean} inclui ou n&atilde;o o valor do wkt da geometria | @@ -973,7 +973,7 @@ $wkt - (opcional) {boolean} inclui ou n&atilde;o o valor do wkt da geometria | ||
| 973 | { | 973 | { |
| 974 | $ltemp = array(); | 974 | $ltemp = array(); |
| 975 | $numlayers = $this->mapa->numlayers; | 975 | $numlayers = $this->mapa->numlayers; |
| 976 | - for ($i=0;$i < $numlayers;$i++) | 976 | + for ($i=0;$i < $numlayers;++$i) |
| 977 | { | 977 | { |
| 978 | $tl = $this->mapa->getlayer($i); | 978 | $tl = $this->mapa->getlayer($i); |
| 979 | $tema = $tl->name; | 979 | $tema = $tl->name; |
classesphp/classe_imagem.php
| @@ -39,26 +39,26 @@ class Imagem | @@ -39,26 +39,26 @@ class Imagem | ||
| 39 | { | 39 | { |
| 40 | /* | 40 | /* |
| 41 | Variavel: $arquivoimg | 41 | Variavel: $arquivoimg |
| 42 | - | 42 | + |
| 43 | Arquivo de imagem | 43 | Arquivo de imagem |
| 44 | */ | 44 | */ |
| 45 | protected $arquivoimg; | 45 | protected $arquivoimg; |
| 46 | /* | 46 | /* |
| 47 | Variavel: $img | 47 | Variavel: $img |
| 48 | - | 48 | + |
| 49 | Objeto imagem | 49 | Objeto imagem |
| 50 | */ | 50 | */ |
| 51 | protected $img; | 51 | protected $img; |
| 52 | - | 52 | + |
| 53 | /* | 53 | /* |
| 54 | Function: __construct | 54 | Function: __construct |
| 55 | 55 | ||
| 56 | -Cria um objeto imagem | 56 | +Cria um objeto imagem |
| 57 | 57 | ||
| 58 | parameters: | 58 | parameters: |
| 59 | 59 | ||
| 60 | $arquivo - Nome completo da imagem em disco. | 60 | $arquivo - Nome completo da imagem em disco. |
| 61 | -*/ | 61 | +*/ |
| 62 | function __construct($arquivo) | 62 | function __construct($arquivo) |
| 63 | { | 63 | { |
| 64 | //error_reporting(E_ALL); | 64 | //error_reporting(E_ALL); |
| @@ -67,7 +67,7 @@ $arquivo - Nome completo da imagem em disco. | @@ -67,7 +67,7 @@ $arquivo - Nome completo da imagem em disco. | ||
| 67 | $this->arquivoimg = $arquivo; | 67 | $this->arquivoimg = $arquivo; |
| 68 | $this->img = imagecreatefrompng($arquivo); | 68 | $this->img = imagecreatefrompng($arquivo); |
| 69 | imagealphablending($this->img, false); | 69 | imagealphablending($this->img, false); |
| 70 | - imagesavealpha($this->img, true); | 70 | + imagesavealpha($this->img, true); |
| 71 | } | 71 | } |
| 72 | else | 72 | else |
| 73 | {return null;} | 73 | {return null;} |
| @@ -75,12 +75,12 @@ $arquivo - Nome completo da imagem em disco. | @@ -75,12 +75,12 @@ $arquivo - Nome completo da imagem em disco. | ||
| 75 | /* | 75 | /* |
| 76 | function: fundeIm | 76 | function: fundeIm |
| 77 | 77 | ||
| 78 | -Funde duas imagens | 78 | +Funde duas imagens |
| 79 | 79 | ||
| 80 | parameters: | 80 | parameters: |
| 81 | 81 | ||
| 82 | $ims: arquivo com a imagem que será sobreposta a atual | 82 | $ims: arquivo com a imagem que será sobreposta a atual |
| 83 | -*/ | 83 | +*/ |
| 84 | function fundeIm($ims) | 84 | function fundeIm($ims) |
| 85 | { | 85 | { |
| 86 | if (file_exists($ims)) | 86 | if (file_exists($ims)) |
| @@ -102,8 +102,8 @@ $ims: arquivo com a imagem que ser&aacute; sobreposta a atual | @@ -102,8 +102,8 @@ $ims: arquivo com a imagem que ser&aacute; sobreposta a atual | ||
| 102 | /* | 102 | /* |
| 103 | function: cortaBorda | 103 | function: cortaBorda |
| 104 | 104 | ||
| 105 | -Corta as bordas da imagem baseando-se no primeiro pixel | ||
| 106 | -*/ | 105 | +Corta as bordas da imagem baseando-se no primeiro pixel |
| 106 | +*/ | ||
| 107 | function cortaBorda() | 107 | function cortaBorda() |
| 108 | { | 108 | { |
| 109 | $sx = imagesx($this->img); | 109 | $sx = imagesx($this->img); |
| @@ -111,9 +111,9 @@ Corta as bordas da imagem baseando-se no primeiro pixel | @@ -111,9 +111,9 @@ Corta as bordas da imagem baseando-se no primeiro pixel | ||
| 111 | $corBase = imagecolorat($this->img, 0, 0); | 111 | $corBase = imagecolorat($this->img, 0, 0); |
| 112 | $linhai = 0; | 112 | $linhai = 0; |
| 113 | //pega a linha inicial | 113 | //pega a linha inicial |
| 114 | - for ($y = 0; $y < $sy; $y++) | 114 | + for ($y = 0; $y < $sy; ++$y) |
| 115 | { | 115 | { |
| 116 | - for ($x = 0; $x < $sx; $x++) | 116 | + for ($x = 0; $x < $sx; ++$x) |
| 117 | { | 117 | { |
| 118 | if (imagecolorat($this->img, $x, $y) != $corBase) | 118 | if (imagecolorat($this->img, $x, $y) != $corBase) |
| 119 | {$linhai = $y - 1;break;} | 119 | {$linhai = $y - 1;break;} |
| @@ -121,9 +121,9 @@ Corta as bordas da imagem baseando-se no primeiro pixel | @@ -121,9 +121,9 @@ Corta as bordas da imagem baseando-se no primeiro pixel | ||
| 121 | if ($linhai != 0){break;} | 121 | if ($linhai != 0){break;} |
| 122 | } | 122 | } |
| 123 | //pega a coluna inicial | 123 | //pega a coluna inicial |
| 124 | - for ($x = 0; $x < $sx; $x++) | 124 | + for ($x = 0; $x < $sx; ++$x) |
| 125 | { | 125 | { |
| 126 | - for ($y = 0; $y < $sy; $y++) | 126 | + for ($y = 0; $y < $sy; ++$y) |
| 127 | { | 127 | { |
| 128 | if (imagecolorat($this->img, $x, $y) != $corBase) | 128 | if (imagecolorat($this->img, $x, $y) != $corBase) |
| 129 | {$colunai = $x - 1;break;} | 129 | {$colunai = $x - 1;break;} |
| @@ -133,7 +133,7 @@ Corta as bordas da imagem baseando-se no primeiro pixel | @@ -133,7 +133,7 @@ Corta as bordas da imagem baseando-se no primeiro pixel | ||
| 133 | //pega a linha final | 133 | //pega a linha final |
| 134 | for ($y = $sy - 1; $y > 0; $y--) | 134 | for ($y = $sy - 1; $y > 0; $y--) |
| 135 | { | 135 | { |
| 136 | - for ($x = 0; $x < $sx; $x++) | 136 | + for ($x = 0; $x < $sx; ++$x) |
| 137 | { | 137 | { |
| 138 | if (imagecolorat($this->img, $x, $y) != $corBase) | 138 | if (imagecolorat($this->img, $x, $y) != $corBase) |
| 139 | {$linhaf = $y + 1;break;} | 139 | {$linhaf = $y + 1;break;} |
| @@ -143,7 +143,7 @@ Corta as bordas da imagem baseando-se no primeiro pixel | @@ -143,7 +143,7 @@ Corta as bordas da imagem baseando-se no primeiro pixel | ||
| 143 | //pega a coluna final | 143 | //pega a coluna final |
| 144 | for ($x = $sx - 1; $x > 0; $x--) | 144 | for ($x = $sx - 1; $x > 0; $x--) |
| 145 | { | 145 | { |
| 146 | - for ($y = 0; $y < $sy; $y++) | 146 | + for ($y = 0; $y < $sy; ++$y) |
| 147 | { | 147 | { |
| 148 | if (imagecolorat($this->img, $x, $y) != $corBase) | 148 | if (imagecolorat($this->img, $x, $y) != $corBase) |
| 149 | {$colunaf = $x + 15;break;} | 149 | {$colunaf = $x + 15;break;} |
| @@ -159,7 +159,7 @@ function: cinzaNormal | @@ -159,7 +159,7 @@ function: cinzaNormal | ||
| 159 | 159 | ||
| 160 | Converte a imagem atual em tons de cinza | 160 | Converte a imagem atual em tons de cinza |
| 161 | 161 | ||
| 162 | -*/ | 162 | +*/ |
| 163 | function cinzaNormal() | 163 | function cinzaNormal() |
| 164 | { | 164 | { |
| 165 | imagefilter($this->img, IMG_FILTER_GRAYSCALE); | 165 | imagefilter($this->img, IMG_FILTER_GRAYSCALE); |
| @@ -174,9 +174,9 @@ Converte para s&eacute;pia clara | @@ -174,9 +174,9 @@ Converte para s&eacute;pia clara | ||
| 174 | { | 174 | { |
| 175 | $sx = imagesx($this->img); | 175 | $sx = imagesx($this->img); |
| 176 | $sy = imagesy($this->img); | 176 | $sy = imagesy($this->img); |
| 177 | - for ($x = 0; $x < $sx; $x++) | 177 | + for ($x = 0; $x < $sx; ++$x) |
| 178 | { | 178 | { |
| 179 | - for ($y = 0; $y < $sy; $y++) | 179 | + for ($y = 0; $y < $sy; ++$y) |
| 180 | { | 180 | { |
| 181 | $rgb = imagecolorat($this->img, $x, $y); | 181 | $rgb = imagecolorat($this->img, $x, $y); |
| 182 | $n = min(255,abs((($rgb >> 16) & 0xFF) * .229 + (($rgb >> 8) & 0xFF) * .587 + ($rgb & 0xFF) * .114) + 20); | 182 | $n = min(255,abs((($rgb >> 16) & 0xFF) * .229 + (($rgb >> 8) & 0xFF) * .587 + ($rgb & 0xFF) * .114) + 20); |
| @@ -197,9 +197,9 @@ Converte para s&eacute;pia normal | @@ -197,9 +197,9 @@ Converte para s&eacute;pia normal | ||
| 197 | { | 197 | { |
| 198 | $sx = imagesx($this->img); | 198 | $sx = imagesx($this->img); |
| 199 | $sy = imagesy($this->img); | 199 | $sy = imagesy($this->img); |
| 200 | - for ($x = 0; $x < $sx; $x++) | 200 | + for ($x = 0; $x < $sx; ++$x) |
| 201 | { | 201 | { |
| 202 | - for ($y = 0; $y < $sy; $y++) | 202 | + for ($y = 0; $y < $sy; ++$y) |
| 203 | { | 203 | { |
| 204 | $rgb = imagecolorat($this->img, $x, $y); | 204 | $rgb = imagecolorat($this->img, $x, $y); |
| 205 | $n = min(255,abs((($rgb >> 16) & 0xFF) * .229 + (($rgb >> 8) & 0xFF) * .587 + ($rgb & 0xFF) * .114) + 3); | 205 | $n = min(255,abs((($rgb >> 16) & 0xFF) * .229 + (($rgb >> 8) & 0xFF) * .587 + ($rgb & 0xFF) * .114) + 3); |
classesphp/classe_legenda.php
| @@ -270,7 +270,7 @@ string de variaveis no formato javascript que permitem montar a legenda. | @@ -270,7 +270,7 @@ string de variaveis no formato javascript que permitem montar a legenda. | ||
| 270 | function legendaGrafica() | 270 | function legendaGrafica() |
| 271 | { | 271 | { |
| 272 | $numlayers = $this->$mapa->numlayers; | 272 | $numlayers = $this->$mapa->numlayers; |
| 273 | - for ($i=0;$i < $numlayers;$i++) | 273 | + for ($i=0;$i < $numlayers;++$i) |
| 274 | { | 274 | { |
| 275 | $layer = $this->$mapa->getlayer($i); | 275 | $layer = $this->$mapa->getlayer($i); |
| 276 | if (($layer->data != "") && (strtoupper($layer->getmetadata("escondido")) != "SIM") && (strtoupper($layer->getmetadata("tema")) != "NAO")) | 276 | if (($layer->data != "") && (strtoupper($layer->getmetadata("escondido")) != "SIM") && (strtoupper($layer->getmetadata("tema")) != "NAO")) |
classesphp/classe_vermultilayer.php
| @@ -97,7 +97,7 @@ class vermultilayer | @@ -97,7 +97,7 @@ class vermultilayer | ||
| 97 | $temasvisiveis = array(); | 97 | $temasvisiveis = array(); |
| 98 | 98 | ||
| 99 | $numlayers = $map->numlayers; | 99 | $numlayers = $map->numlayers; |
| 100 | - for ($i=0;$i < $numlayers;$i++) | 100 | + for ($i=0;$i < $numlayers;++$i) |
| 101 | { | 101 | { |
| 102 | $layer = $map->getlayer($i); | 102 | $layer = $map->getlayer($i); |
| 103 | $temai = $layer->name; | 103 | $temai = $layer->name; |
classesphp/funcoes_gerais.php
| @@ -204,7 +204,7 @@ function criaImagemR($nomearq) | @@ -204,7 +204,7 @@ function criaImagemR($nomearq) | ||
| 204 | $trans = 250 / ($maxpixel - $minpixel); | 204 | $trans = 250 / ($maxpixel - $minpixel); |
| 205 | $img = imagecreatetruecolor($wh[0],$wh[1]); | 205 | $img = imagecreatetruecolor($wh[0],$wh[1]); |
| 206 | $celula = 0; | 206 | $celula = 0; |
| 207 | - for ($x = 0; $x < $wh[0]; $x++) | 207 | + for ($x = 0; $x < $wh[0]; ++$x) |
| 208 | { | 208 | { |
| 209 | for ($y = ($wh[1] - 1); $y >= 0; $y--) | 209 | for ($y = ($wh[1] - 1); $y >= 0; $y--) |
| 210 | { | 210 | { |
| @@ -2101,7 +2101,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | @@ -2101,7 +2101,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | ||
| 2101 | { | 2101 | { |
| 2102 | $maptemp = ms_newMapObj($temasdir."/".$tema.".map"); | 2102 | $maptemp = ms_newMapObj($temasdir."/".$tema.".map"); |
| 2103 | $numlayers = $maptemp->numlayers; | 2103 | $numlayers = $maptemp->numlayers; |
| 2104 | - for ($i=0;$i < $numlayers;$i++) | 2104 | + for ($i=0;$i < $numlayers;++$i) |
| 2105 | { | 2105 | { |
| 2106 | $ll = $maptemp->getlayer($i); | 2106 | $ll = $maptemp->getlayer($i); |
| 2107 | $permite = $ll->getmetadata("permitedownload"); | 2107 | $permite = $ll->getmetadata("permitedownload"); |
| @@ -2256,7 +2256,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | @@ -2256,7 +2256,7 @@ function downloadTema2($map_file,$tema,$locaplic,$dir_tmp,$postgis_mapa) | ||
| 2256 | if(file_exists($temasdir."/".$tema.".map")){ | 2256 | if(file_exists($temasdir."/".$tema.".map")){ |
| 2257 | $maptemp = ms_newMapObj($temasdir."/".$tema.".map"); | 2257 | $maptemp = ms_newMapObj($temasdir."/".$tema.".map"); |
| 2258 | $numlayers = $maptemp->numlayers; | 2258 | $numlayers = $maptemp->numlayers; |
| 2259 | - for ($i=0;$i < $numlayers;$i++) | 2259 | + for ($i=0;$i < $numlayers;++$i) |
| 2260 | { | 2260 | { |
| 2261 | $gl = $maptemp->getlayer($i); | 2261 | $gl = $maptemp->getlayer($i); |
| 2262 | $gl->set("data",""); | 2262 | $gl->set("data",""); |
| @@ -2916,7 +2916,7 @@ $map_file - arquivo mapfile que ser&aacute; processado | @@ -2916,7 +2916,7 @@ $map_file - arquivo mapfile que ser&aacute; processado | ||
| 2916 | function sobeAnno($map_file){ | 2916 | function sobeAnno($map_file){ |
| 2917 | $mapa = ms_newMapObj($map_file); | 2917 | $mapa = ms_newMapObj($map_file); |
| 2918 | $numlayers = $mapa->numlayers; | 2918 | $numlayers = $mapa->numlayers; |
| 2919 | - for ($i=0;$i<$numlayers;$i++){ | 2919 | + for ($i=0;$i<$numlayers;++$i){ |
| 2920 | $layer = $mapa->getlayer($i); | 2920 | $layer = $mapa->getlayer($i); |
| 2921 | if($layer->type == 4){ | 2921 | if($layer->type == 4){ |
| 2922 | $temp = ms_newLayerObj($mapa,$layer); | 2922 | $temp = ms_newLayerObj($mapa,$layer); |
classesphp/graficopizza.php
| @@ -109,12 +109,12 @@ function graficopizza($data,$width,$inclinacao,$shadow_height,$cores,$map_file,$ | @@ -109,12 +109,12 @@ function graficopizza($data,$width,$inclinacao,$shadow_height,$cores,$map_file,$ | ||
| 109 | } | 109 | } |
| 110 | for ($i=$centerY+$shadow_height; $i>$centerY; $i--) | 110 | for ($i=$centerY+$shadow_height; $i>$centerY; $i--) |
| 111 | { | 111 | { |
| 112 | - for ($j = 0; $j < count($slice); $j++) | 112 | + for ($j = 0; $j < count($slice); ++$j) |
| 113 | { | 113 | { |
| 114 | ImageFilledArc($img, $centerX, $i, $diameterX, $diameterY, $slice[$j][0], $slice[$j][1], $slice[$j][2], IMG_ARC_PIE); | 114 | ImageFilledArc($img, $centerX, $i, $diameterX, $diameterY, $slice[$j][0], $slice[$j][1], $slice[$j][2], IMG_ARC_PIE); |
| 115 | } | 115 | } |
| 116 | } | 116 | } |
| 117 | - for ($j = 0; $j < count($slice); $j++) | 117 | + for ($j = 0; $j < count($slice); ++$j) |
| 118 | { | 118 | { |
| 119 | ImageFilledArc($img, $centerX, $centerY, $diameterX, $diameterY, $slice[$j][0], $slice[$j][1], $slice[$j][3], IMG_ARC_PIE); | 119 | ImageFilledArc($img, $centerX, $centerY, $diameterX, $diameterY, $slice[$j][0], $slice[$j][1], $slice[$j][3], IMG_ARC_PIE); |
| 120 | } | 120 | } |
classesphp/mapa_controle.php
| @@ -153,7 +153,7 @@ if (isset($debug) && strtolower($debug) == "sim") | @@ -153,7 +153,7 @@ if (isset($debug) && strtolower($debug) == "sim") | ||
| 153 | // | 153 | // |
| 154 | //teste de timeout | 154 | //teste de timeout |
| 155 | // | 155 | // |
| 156 | -//for($i==0;$i<5000000000;$i++){} | 156 | +//for($i==0;$i<5000000000;++$i){} |
| 157 | // | 157 | // |
| 158 | //ativa o php mapscript e as extensões necessárias | 158 | //ativa o php mapscript e as extensões necessárias |
| 159 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido | 159 | //se as extensões já estiverem carregadas no PHP, vc pode comentar essa linha para que o processamento fique mais rápido |
classesphp/mapa_googleearth.php
| @@ -120,7 +120,7 @@ function retornaWms($map_fileX,$postgis_mapa){ | @@ -120,7 +120,7 @@ function retornaWms($map_fileX,$postgis_mapa){ | ||
| 120 | $o->set("imagemode",MS_IMAGEMODE_RGBA); | 120 | $o->set("imagemode",MS_IMAGEMODE_RGBA); |
| 121 | if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao´e alterado | 121 | if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao´e alterado |
| 122 | $numlayers = $mapa->numlayers; | 122 | $numlayers = $mapa->numlayers; |
| 123 | - for ($i=0;$i < $numlayers;$i++) | 123 | + for ($i=0;$i < $numlayers;++$i) |
| 124 | { | 124 | { |
| 125 | $l = $mapa->getlayer($i); | 125 | $l = $mapa->getlayer($i); |
| 126 | if ($l->getmetadata("classesnome") != "") | 126 | if ($l->getmetadata("classesnome") != "") |
classesphp/mapa_googlemaps.php
| @@ -130,7 +130,7 @@ $cache = false; | @@ -130,7 +130,7 @@ $cache = false; | ||
| 130 | if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao´e alterado | 130 | if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao´e alterado |
| 131 | 131 | ||
| 132 | $numlayers = $mapa->numlayers; | 132 | $numlayers = $mapa->numlayers; |
| 133 | - for ($i=0;$i < $numlayers;$i++) | 133 | + for ($i=0;$i < $numlayers;++$i) |
| 134 | { | 134 | { |
| 135 | $l = $mapa->getlayer($i); | 135 | $l = $mapa->getlayer($i); |
| 136 | $layerName = $l->name; | 136 | $layerName = $l->name; |
| @@ -178,7 +178,7 @@ if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao´e alter | @@ -178,7 +178,7 @@ if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao´e alter | ||
| 178 | else{ | 178 | else{ |
| 179 | $mapa->setProjection("proj=merc,a=6378137,b=6378137,lat_ts=0.0,lon_0=0.0,x_0=0.0,y_0=0,k=1.0,units=m"); | 179 | $mapa->setProjection("proj=merc,a=6378137,b=6378137,lat_ts=0.0,lon_0=0.0,x_0=0.0,y_0=0,k=1.0,units=m"); |
| 180 | $numlayers = $mapa->numlayers; | 180 | $numlayers = $mapa->numlayers; |
| 181 | - for ($i=0;$i < $numlayers;$i++) | 181 | + for ($i=0;$i < $numlayers;++$i) |
| 182 | { | 182 | { |
| 183 | $l = $mapa->getlayer($i); | 183 | $l = $mapa->getlayer($i); |
| 184 | if($l->getProjection() == "" ) | 184 | if($l->getProjection() == "" ) |
classesphp/mapa_inicia.php
| @@ -244,7 +244,7 @@ function iniciaMapa() | @@ -244,7 +244,7 @@ function iniciaMapa() | ||
| 244 | $m->mapa->save($nomefundo); | 244 | $m->mapa->save($nomefundo); |
| 245 | $mf = ms_newMapObj($nomefundo); | 245 | $mf = ms_newMapObj($nomefundo); |
| 246 | $numlayers = $mf->numlayers; | 246 | $numlayers = $mf->numlayers; |
| 247 | - for($i = 0;$i < $numlayers;$i++) | 247 | + for($i = 0;$i < $numlayers;++$i) |
| 248 | { | 248 | { |
| 249 | $l = $mf->getLayer($i); | 249 | $l = $mf->getLayer($i); |
| 250 | $l->set("status",MS_DELETE); | 250 | $l->set("status",MS_DELETE); |
classesphp/mapa_openlayers.php
| @@ -84,7 +84,7 @@ $qy = file_exists($qyfile); | @@ -84,7 +84,7 @@ $qy = file_exists($qyfile); | ||
| 84 | if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao e alterado | 84 | if(!isset($_GET["telaR"])){//no caso de projecoes remotas, o mapfile nao e alterado |
| 85 | $numlayers = $mapa->numlayers; | 85 | $numlayers = $mapa->numlayers; |
| 86 | $cache = false; | 86 | $cache = false; |
| 87 | - for($i = 0;$i < $numlayers;$i++) | 87 | + for($i = 0;$i < $numlayers;++$i) |
| 88 | { | 88 | { |
| 89 | $l = $mapa->getLayer($i); | 89 | $l = $mapa->getLayer($i); |
| 90 | if ($l->getmetadata("classesnome") != "") | 90 | if ($l->getmetadata("classesnome") != "") |