Commit 0f3b753914fd97825d4dd330533a9a180b830f52
1 parent
d4c08aa9
Exists in
master
and in
7 other branches
Correção no testamapfile para ambientes Linux
Showing
1 changed file
with
27 additions
and
2 deletions
Show diff stats
classesphp/classe_atributos.php
@@ -344,7 +344,32 @@ $dadosDaClasse - sim|nao Indica se serão obtidos os dados que descrevem a classe | @@ -344,7 +344,32 @@ $dadosDaClasse - sim|nao Indica se serão obtidos os dados que descrevem a classe | ||
344 | {$items = pegaItens($this->layer,$this->mapa);} | 344 | {$items = pegaItens($this->layer,$this->mapa);} |
345 | else | 345 | else |
346 | {$items[] = $itemtema;} | 346 | {$items[] = $itemtema;} |
347 | - $resultadoFinal[] = array("itens"=>$items); | 347 | + //pega os alias definidos no metadata itensdesc |
348 | + if($this->layer->getmetadata("itensdesc") != ""){ | ||
349 | + $alias = array(); | ||
350 | + $aliasdesc = explode(",",$this->layer->getmetadata("itensdesc")); | ||
351 | + $aliasitens = explode(",",$this->layer->getmetadata("itens")); | ||
352 | + $aliasc = array_combine($aliasitens,$aliasdesc); | ||
353 | + if(strtoupper($this->layer->getmetadata("convcaracter")) == "NAO") | ||
354 | + {$convC = false;} | ||
355 | + else | ||
356 | + {$convC = true;} | ||
357 | + foreach($items as $i){ | ||
358 | + if($aliasc[$i]){ | ||
359 | + if($convC) | ||
360 | + {$alias[] = $this->converte($aliasc[$i]);} | ||
361 | + else | ||
362 | + {$alias[] = $aliasc[$i];} | ||
363 | + } | ||
364 | + else{ | ||
365 | + $alias[] = $i; | ||
366 | + } | ||
367 | + } | ||
368 | + } | ||
369 | + else{ | ||
370 | + $alias = $items; | ||
371 | + } | ||
372 | + $resultadoFinal[] = array("itens"=>$items,"alias"=>$alias); | ||
348 | $shapes = retornaShapesSelecionados($this->layer,$this->arquivo,$this->mapa); | 373 | $shapes = retornaShapesSelecionados($this->layer,$this->arquivo,$this->mapa); |
349 | $res_count = count($shapes); | 374 | $res_count = count($shapes); |
350 | $registros = array(); | 375 | $registros = array(); |
@@ -1568,4 +1593,4 @@ $wkt - (opcional) {boolean} inclui ou não o valor do wkt da geometria | @@ -1568,4 +1593,4 @@ $wkt - (opcional) {boolean} inclui ou não o valor do wkt da geometria | ||
1568 | return $texto; | 1593 | return $texto; |
1569 | } | 1594 | } |
1570 | } | 1595 | } |
1571 | -?> | ||
1572 | \ No newline at end of file | 1596 | \ No newline at end of file |
1597 | +?> |