Commit dae66e9ff4aac5caf95d0bc231a3acb21e2019bd

Authored by Edmar Moretti
1 parent 7acdc8fc

Correção na obtenção dos dados para construir os gráficos

Showing 1 changed file with 6 additions and 2 deletions   Show diff stats
classesphp/graficos.php
... ... @@ -708,10 +708,14 @@ function pegaValoresM($mapa,$layer,$itens,$exclui="nulo",$selecionados="nao",$ch
708 708 if ($considera == "sim"){
709 709 //pega os valores dos itens do registro
710 710 foreach ($itens as $item){
  711 + $vitem = $shape->values[$item];
  712 + if (!mb_detect_encoding($vitem,"UTF-8",true)){
  713 + $vitem = mb_convert_encoding($vitem,"UTF-8","ISO-8859-1");
  714 + }
711 715 if($chaves == false)
712   - {$v[] = $shape->values[$item];}
  716 + {$v[] = $vitem;}
713 717 else
714   - {$v[$item] = $shape->values[$item];}
  718 + {$v[$item] = $vitem;}
715 719 }
716 720 //pega o centroide
717 721 if($centroide == true){
... ...