Commit 41be92f0100c09423cc7495738fec75d78cccbf1
1 parent
d74c1b3d
Exists in
master
and in
7 other branches
Correções na ferramenta de conexão com GEORSS
Showing
2 changed files
with
16 additions
and
4 deletions
Show diff stats
classesphp/classe_mapa.php
| @@ -1126,12 +1126,19 @@ $canal - Identificador do canal (ordem em que está no RSS) | @@ -1126,12 +1126,19 @@ $canal - Identificador do canal (ordem em que está no RSS) | ||
| 1126 | } | 1126 | } |
| 1127 | xbase_close($db); | 1127 | xbase_close($db); |
| 1128 | $novoshpf->free(); | 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 | $layer->set("data",$nomeshp.".shp"); | 1136 | $layer->set("data",$nomeshp.".shp"); |
| 1131 | $layer->set("name",basename($nomeshp)); | 1137 | $layer->set("name",basename($nomeshp)); |
| 1132 | $layer->setmetadata("DOWNLOAD","sim"); | 1138 | $layer->setmetadata("DOWNLOAD","sim"); |
| 1133 | $layer->setmetadata("TEMALOCAL","SIM"); | 1139 | $layer->setmetadata("TEMALOCAL","SIM"); |
| 1134 | - $layer->set("transparency",50); | 1140 | + //$layer->set("transparency",50); |
| 1141 | + $layer->setmetadata("nomeoriginal",basename($nomeshp)); | ||
| 1135 | return("ok"); | 1142 | return("ok"); |
| 1136 | } | 1143 | } |
| 1137 | return("erro"); | 1144 | return("erro"); |
| @@ -1161,6 +1168,7 @@ $arq - Nome do shape file. | @@ -1161,6 +1168,7 @@ $arq - Nome do shape file. | ||
| 1161 | $layer->set("name",basename($arq)); | 1168 | $layer->set("name",basename($arq)); |
| 1162 | $layer->setmetadata("DOWNLOAD","nao"); | 1169 | $layer->setmetadata("DOWNLOAD","nao"); |
| 1163 | $layer->setmetadata("TEMALOCAL","NAO"); | 1170 | $layer->setmetadata("TEMALOCAL","NAO"); |
| 1171 | + $layer->setmetadata("nomeoriginal",basename($arq)); | ||
| 1164 | } | 1172 | } |
| 1165 | return("ok"); | 1173 | return("ok"); |
| 1166 | } | 1174 | } |
ferramentas/conectargeorss/index.js
| @@ -82,10 +82,14 @@ function listaCanais(retorno) | @@ -82,10 +82,14 @@ function listaCanais(retorno) | ||
| 82 | function adicionatema(id) | 82 | function adicionatema(id) |
| 83 | { | 83 | { |
| 84 | aguarde("block") | 84 | aguarde("block") |
| 85 | + var redesenha = function() | ||
| 86 | + { | ||
| 87 | + aguarde("none") | ||
| 88 | + window.parent.ajaxredesenha("") | ||
| 89 | + } | ||
| 85 | var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=adicionaTemaGeoRSS&canal="+id+"&servico="+$i("servico").value | 90 | var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=adicionaTemaGeoRSS&canal="+id+"&servico="+$i("servico").value |
| 86 | var cp = new cpaint(); | 91 | var cp = new cpaint(); |
| 87 | //cp.set_debug(2) | 92 | //cp.set_debug(2) |
| 88 | cp.set_response_type("JSON"); | 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 | \ No newline at end of file | 96 | \ No newline at end of file |