Commit 04fe92c1915fcc4cd717c158093d919650ac0c17
1 parent
0ee909e2
Exists in
master
and in
7 other branches
Conclusão da integração com o TME
Showing
4 changed files
with
17 additions
and
5 deletions
Show diff stats
admin/admin.db
No preview for this file type
pacotes/tme/TME_Engine.php
@@ -388,7 +388,8 @@ class ThematicMap | @@ -388,7 +388,8 @@ class ThematicMap | ||
388 | 388 | ||
389 | // Add timespan if time animation | 389 | // Add timespan if time animation |
390 | if ($this->timeType == 'slider') { | 390 | if ($this->timeType == 'slider') { |
391 | - $end = ''; | 391 | + |
392 | + $end = ''; | ||
392 | // Check if there is more years | 393 | // Check if there is more years |
393 | if (array_key_exists($key+1, $this->yearArray)) { | 394 | if (array_key_exists($key+1, $this->yearArray)) { |
394 | $end = '<end>' . intval($this->yearArray[$key+1]-1) . '-12-31</end>'; | 395 | $end = '<end>' . intval($this->yearArray[$key+1]-1) . '-12-31</end>'; |
@@ -396,12 +397,16 @@ class ThematicMap | @@ -396,12 +397,16 @@ class ThematicMap | ||
396 | $kmlFolder .= " <TimeSpan>" . PHP_EOL | 397 | $kmlFolder .= " <TimeSpan>" . PHP_EOL |
397 | . " <begin>$year-01-01</begin>$end" . PHP_EOL | 398 | . " <begin>$year-01-01</begin>$end" . PHP_EOL |
398 | . " </TimeSpan>" . PHP_EOL; | 399 | . " </TimeSpan>" . PHP_EOL; |
400 | + | ||
399 | } | 401 | } |
400 | 402 | ||
401 | // Loop thorough all features (values without features will not be shown) | 403 | // Loop thorough all features (values without features will not be shown) |
402 | foreach ($this->dataStore['features'] as $featureID => $feature) | 404 | foreach ($this->dataStore['features'] as $featureID => $feature) |
403 | { | 405 | { |
404 | $name = $feature['name']; | 406 | $name = $feature['name']; |
407 | + //if (!mb_detect_encoding($name,"UTF-8",true)) | ||
408 | + //{$name = mb_convert_encoding($name,"UTF-8","ISO-8859-1");} | ||
409 | + $name = "<![CDATA[ ".$name." ]]>"; | ||
405 | $value = ''; // use null? | 410 | $value = ''; // use null? |
406 | $valueText = 'no data'; | 411 | $valueText = 'no data'; |
407 | $valueLabel = ''; | 412 | $valueLabel = ''; |
pacotes/tme/TME_i3geo.php
@@ -58,6 +58,7 @@ $map = new ThematicMap($dataStore, $parameters); | @@ -58,6 +58,7 @@ $map = new ThematicMap($dataStore, $parameters); | ||
58 | $file = $map->getKML($dataConnector->url); | 58 | $file = $map->getKML($dataConnector->url); |
59 | if(!function_exists("cpjson")) | 59 | if(!function_exists("cpjson")) |
60 | {require("../../classesphp/funcoes_gerais.php");} | 60 | {require("../../classesphp/funcoes_gerais.php");} |
61 | + | ||
61 | cpjson(array('url' => $file)); | 62 | cpjson(array('url' => $file)); |
62 | //echo "<p><a href='$file'>$file</a>"; | 63 | //echo "<p><a href='$file'>$file</a>"; |
63 | 64 |
pacotes/tme/TME_i3geo_DataConnector.php
@@ -171,10 +171,16 @@ class DataConnector | @@ -171,10 +171,16 @@ class DataConnector | ||
171 | ); | 171 | ); |
172 | //[0] é o ano | 172 | //[0] é o ano |
173 | foreach($colunasvalor as $colunavalor){ | 173 | foreach($colunasvalor as $colunavalor){ |
174 | - $valor = number_format($shape->values[$colunavalor], 2, '.', ''); | ||
175 | - $dataStore['indicators']['valores']['values'][$colunavalor][$i] = $valor; | ||
176 | - $indicatorYears[$colunavalor] = $colunavalor; | ||
177 | - $todosV[] = $valor; | 174 | + $valor = $shape->values[$colunavalor]; |
175 | + | ||
176 | + settype($valor,"float"); | ||
177 | + //echo $valor; | ||
178 | + if(is_numeric($valor)){ | ||
179 | + $valor = number_format($valor, 2, '.', ''); | ||
180 | + $dataStore['indicators']['valores']['values'][$colunavalor][$i] = $valor; | ||
181 | + $indicatorYears[$colunavalor] = $colunavalor; | ||
182 | + $todosV[] = $valor; | ||
183 | + } | ||
178 | } | 184 | } |
179 | } | 185 | } |
180 | $fechou = $layer->close(); | 186 | $fechou = $layer->close(); |