Commit fbff1577f4e1392d97e4ab623df15382ded390d7
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
json.php
... | ... | @@ -91,7 +91,7 @@ copy($base,$nomeMapfileTmp); |
91 | 91 | $oMap = ms_newMapobj($nomeMapfileTmp); |
92 | 92 | $nmap = ms_newMapobj($locaplic."/temas/".$tema.".map"); |
93 | 93 | $l = $nmap->getlayerbyname($tema); |
94 | - | |
94 | +$l->set("template","none.htm"); | |
95 | 95 | if (!empty($postgis_mapa)){ |
96 | 96 | if ($l->connectiontype == MS_POSTGIS){ |
97 | 97 | $lcon = $l->connection; |
... | ... | @@ -333,14 +333,17 @@ function carregaCacheArquivo(){ |
333 | 333 | |
334 | 334 | function pegaDadosJ(){ |
335 | 335 | global $oMap, $tema, $versao; |
336 | + set_time_limit(0); | |
336 | 337 | $layer = $oMap->getlayerbyname($tema); |
338 | + $layer->set("status",MS_DEFAULT); | |
339 | + $layer->set("template","none.htm"); | |
337 | 340 | $items = pegaItens($layer,$oMap); |
338 | 341 | $layer->querybyrect($oMap->extent); |
339 | 342 | $layer->open(); |
340 | - $res_count = $layer->getNumresults(); | |
343 | + $res_count = $layer->getNumresults(); | |
341 | 344 | $linhas = array(); |
342 | - | |
343 | 345 | for ($i = 0; $i < $res_count; $i++){ |
346 | + //echo $i." - <br>"; | |
344 | 347 | if($versao == 6){ |
345 | 348 | $shape = $layer->getShape($layer->getResult($i)); |
346 | 349 | } | ... | ... |
ogc.htm
... | ... | @@ -185,7 +185,9 @@ A:hover { |
185 | 185 | } |
186 | 186 | |
187 | 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ágina: <a href='"+ window.location.href.split("?")[0] + "?temaOgc=" + tema + "'>"+ window.location.href.split("?")[0] + "?temaOgc=" + tema + "</a>"; | |
189 | 191 | ins += "<p>Bookmark: <span id=bm ></span>"; |
190 | 192 | ins += |
191 | 193 | "<p><iframe src='http://www.facebook.com/plugins/like.php?href=" + servico |
... | ... | @@ -259,6 +261,19 @@ A:hover { |
259 | 261 | i3GEO.arvoreDeTemas.INCLUIESTRELAS = false; |
260 | 262 | i3GEO.arvoreDeTemas.TIPOBOTAO = "radio"; |
261 | 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 | 277 | </script> |
263 | 278 | </body> |
264 | 279 | </html> | ... | ... |