Commit 051bfd86279dce27ea4532e4b9241e0c60d59dd6

Authored by Edmar Moretti
1 parent 30c3756d

--no commit message

Showing 1 changed file with 5 additions and 3 deletions   Show diff stats
ferramentas/melhorcaminho/exec.php
... ... @@ -87,9 +87,9 @@ switch (strtoupper($funcao))
87 87 fclose($fp);
88 88 exec(dirname(__FILE__)."/better_path.py $y");
89 89 //adiciona o shapefile
  90 + include_once("../../classesphp/classe_mapa.php");
  91 + $m = new Mapa($map_file);
90 92 if(file_exists($pathresult."/".$prefixo."_best_path.shp")){
91   - include_once("../../classesphp/classe_mapa.php");
92   - $m = new Mapa($map_file);
93 93 //adiciona ao mapa best_path
94 94 $retorno = $m->adicionaTemaSHP($pathresult."/".$prefixo."_best_path.shp");
95 95 $layer = $m->mapa->getlayerbyname($prefixo."_best_path.shp");
... ... @@ -100,6 +100,8 @@ switch (strtoupper($funcao))
100 100 $estilo = $classe->getstyle(0);
101 101 $cor = $estilo->color;
102 102 $cor->setRGB(255,0,0);
  103 + }
  104 + if(file_exists($pathresult."/".$prefixo."_xxxcartesian_straight_line_cost.shp")){
103 105 //cartesian_straight_line_cost
104 106 $retorno = $m->adicionaTemaSHP($pathresult."/".$prefixo."_cartesian_straight_line_cost.shp");
105 107 $layer = $m->mapa->getlayerbyname($prefixo."_cartesian_straight_line_cost.shp");
... ... @@ -111,8 +113,8 @@ switch (strtoupper($funcao))
111 113 $cor = $estilo->color;
112 114 $cor->setRGB(255,0,255);
113 115 $estilo->set("width",2);
114   - $m->salva();
115 116 }
  117 + $m->salva();
116 118 }
117 119 else{
118 120 $retorno = "<span style='color:red' >Erro. Arquivo raster n&atilde;o encontrado</span>";
... ...