Commit 41be92f0100c09423cc7495738fec75d78cccbf1

Authored by Edmar Moretti
1 parent d74c1b3d

Correções na ferramenta de conexão com GEORSS

classesphp/classe_mapa.php
... ... @@ -1126,12 +1126,19 @@ $canal - Identificador do canal (ordem em que está no RSS)
1126 1126 }
1127 1127 xbase_close($db);
1128 1128 $novoshpf->free();
1129   - $layer = criaLayer($this->mapa,MS_LAYER_POLYGON,MS_DEFAULT,"GeoRSS","SIM");
  1129 + if ($tipol == MS_SHP_POINT)
  1130 + {$tipol = MS_LAYER_POINT;}
  1131 + if ($tipol == MS_SHP_POLYGON)
  1132 + {$tipol = MS_LAYER_POLYGON;}
  1133 + if ($tipol == MS_SHP_LINE)
  1134 + {$tipol = MS_LAYER_LINE;}
  1135 + $layer = criaLayer($this->mapa,$tipol,MS_DEFAULT,"GeoRSS","SIM");
1130 1136 $layer->set("data",$nomeshp.".shp");
1131 1137 $layer->set("name",basename($nomeshp));
1132 1138 $layer->setmetadata("DOWNLOAD","sim");
1133 1139 $layer->setmetadata("TEMALOCAL","SIM");
1134   - $layer->set("transparency",50);
  1140 + //$layer->set("transparency",50);
  1141 + $layer->setmetadata("nomeoriginal",basename($nomeshp));
1135 1142 return("ok");
1136 1143 }
1137 1144 return("erro");
... ... @@ -1161,6 +1168,7 @@ $arq - Nome do shape file.
1161 1168 $layer->set("name",basename($arq));
1162 1169 $layer->setmetadata("DOWNLOAD","nao");
1163 1170 $layer->setmetadata("TEMALOCAL","NAO");
  1171 + $layer->setmetadata("nomeoriginal",basename($arq));
1164 1172 }
1165 1173 return("ok");
1166 1174 }
... ...
ferramentas/conectargeorss/index.js
... ... @@ -82,10 +82,14 @@ function listaCanais(retorno)
82 82 function adicionatema(id)
83 83 {
84 84 aguarde("block")
  85 + var redesenha = function()
  86 + {
  87 + aguarde("none")
  88 + window.parent.ajaxredesenha("")
  89 + }
85 90 var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=adicionaTemaGeoRSS&canal="+id+"&servico="+$i("servico").value
86 91 var cp = new cpaint();
87 92 //cp.set_debug(2)
88 93 cp.set_response_type("JSON");
89   - cp.call(p,"adicionaTemaGeoRSS",window.parent.ajaxredesenha);
90   - aguarde("none")
  94 + cp.call(p,"adicionaTemaGeoRSS",redesenha);
91 95 }
92 96 \ No newline at end of file
... ...