Commit fbff1577f4e1392d97e4ab623df15382ded390d7

Authored by Edmar Moretti
1 parent a5145fa4
Exists in master

Inclusão de parâmetro para abrir links de uma camada

Showing 2 changed files with 22 additions and 4 deletions   Show diff stats
@@ -91,7 +91,7 @@ copy($base,$nomeMapfileTmp); @@ -91,7 +91,7 @@ copy($base,$nomeMapfileTmp);
91 $oMap = ms_newMapobj($nomeMapfileTmp); 91 $oMap = ms_newMapobj($nomeMapfileTmp);
92 $nmap = ms_newMapobj($locaplic."/temas/".$tema.".map"); 92 $nmap = ms_newMapobj($locaplic."/temas/".$tema.".map");
93 $l = $nmap->getlayerbyname($tema); 93 $l = $nmap->getlayerbyname($tema);
94 - 94 +$l->set("template","none.htm");
95 if (!empty($postgis_mapa)){ 95 if (!empty($postgis_mapa)){
96 if ($l->connectiontype == MS_POSTGIS){ 96 if ($l->connectiontype == MS_POSTGIS){
97 $lcon = $l->connection; 97 $lcon = $l->connection;
@@ -333,14 +333,17 @@ function carregaCacheArquivo(){ @@ -333,14 +333,17 @@ function carregaCacheArquivo(){
333 333
334 function pegaDadosJ(){ 334 function pegaDadosJ(){
335 global $oMap, $tema, $versao; 335 global $oMap, $tema, $versao;
  336 + set_time_limit(0);
336 $layer = $oMap->getlayerbyname($tema); 337 $layer = $oMap->getlayerbyname($tema);
  338 + $layer->set("status",MS_DEFAULT);
  339 + $layer->set("template","none.htm");
337 $items = pegaItens($layer,$oMap); 340 $items = pegaItens($layer,$oMap);
338 $layer->querybyrect($oMap->extent); 341 $layer->querybyrect($oMap->extent);
339 $layer->open(); 342 $layer->open();
340 - $res_count = $layer->getNumresults(); 343 + $res_count = $layer->getNumresults();
341 $linhas = array(); 344 $linhas = array();
342 -  
343 for ($i = 0; $i < $res_count; $i++){ 345 for ($i = 0; $i < $res_count; $i++){
  346 + //echo $i." - <br>";
344 if($versao == 6){ 347 if($versao == 6){
345 $shape = $layer->getShape($layer->getResult($i)); 348 $shape = $layer->getShape($layer->getResult($i));
346 } 349 }
@@ -185,7 +185,9 @@ A:hover { @@ -185,7 +185,9 @@ A:hover {
185 } 185 }
186 186
187 servico += s; 187 servico += s;
188 - ins += "<p>" + servico; 188 + servico += s;
  189 + ins += "<p><a href='" + servico + "' target='_blank' >" + servico + "</a>";
  190 + ins += "<p>Link para essa p&aacute;gina: <a href='"+ window.location.href.split("?")[0] + "?temaOgc=" + tema + "'>"+ window.location.href.split("?")[0] + "?temaOgc=" + tema + "</a>";
189 ins += "<p>Bookmark: <span id=bm ></span>"; 191 ins += "<p>Bookmark: <span id=bm ></span>";
190 ins += 192 ins +=
191 "<p><iframe src='http://www.facebook.com/plugins/like.php?href=" + servico 193 "<p><iframe src='http://www.facebook.com/plugins/like.php?href=" + servico
@@ -259,6 +261,19 @@ A:hover { @@ -259,6 +261,19 @@ A:hover {
259 i3GEO.arvoreDeTemas.INCLUIESTRELAS = false; 261 i3GEO.arvoreDeTemas.INCLUIESTRELAS = false;
260 i3GEO.arvoreDeTemas.TIPOBOTAO = "radio"; 262 i3GEO.arvoreDeTemas.TIPOBOTAO = "radio";
261 i3GEO.arvoreDeTemas.cria("", g_locaplic, "arvoreTemas", "ogc_endereco\(this\)"); 263 i3GEO.arvoreDeTemas.cria("", g_locaplic, "arvoreTemas", "ogc_endereco\(this\)");
  264 + //verifica se deve abrir de imediato a janela de links
  265 + temp = loc.split("temaOgc=");
  266 + if(temp[1]){
  267 + temaOgc = temp[1];
  268 + temaOgc = temaOgc.split("&");
  269 + temaOgc = temaOgc[0];
  270 + var botao = {
  271 + checked: false,
  272 + name: temaOgc,
  273 + value: temaOgc
  274 + };
  275 + ogc_endereco(botao);
  276 + }
262 </script> 277 </script>
263 </body> 278 </body>
264 </html> 279 </html>