Commit e8f498fc37ad2ba54a0c9e9950c86a4b36ad9f99
1 parent
16d2cc9f
Exists in
master
and in
7 other branches
Correção na captura de geometrias quando do tipo ponto
Showing
2 changed files
with
6 additions
and
2 deletions
Show diff stats
classesphp/classe_temas.php
... | ... | @@ -698,7 +698,7 @@ $nome - nome que será dado a geometria |
698 | 698 | $ext->setextent(($bounds->minx),($bounds->miny),($bounds->maxx),($bounds->maxy)); |
699 | 699 | $im = gravaImagemMapa($this->mapa); |
700 | 700 | $registros[] = array("id"=>$i,"wkt"=>$wktgeo,"valores"=>$valitem,"imagem"=>$im["url"]); |
701 | - $fechou = $this->layer->open(); | |
701 | + $abriu = $this->layer->open(); | |
702 | 702 | } |
703 | 703 | } |
704 | 704 | $fechou = $this->layer->close(); | ... | ... |
classesphp/funcoes_gerais.php
... | ... | @@ -957,7 +957,11 @@ function gravaImagemMapa($mapa) |
957 | 957 | { |
958 | 958 | if(is_string($mapa)) |
959 | 959 | {$mapa = ms_newMapObj($mapa);} |
960 | - $imgo = $mapa->draw(); | |
960 | + $imgo = @$mapa->draw(); | |
961 | + if(!$imgo) | |
962 | + { | |
963 | + return array("url"=>"","arquivo"=>""); | |
964 | + } | |
961 | 965 | $nome = ($imgo->imagepath).nomeRandomico().".png"; |
962 | 966 | $salva = $imgo->saveImage($nome); |
963 | 967 | if ($salva != -1) | ... | ... |