Commit cfb09f845a7952d48b8727c8d555ac6a86846db5
1 parent
a705455b
Exists in
master
and in
7 other branches
Inclusão de bookmark na árvore de temas e ícone indicando qd um tema está ativo …
…como etiqueta (ferramenta identifica)
Showing
9 changed files
with
40 additions
and
50 deletions
Show diff stats
classesjs/classe_arvoredetemas.js
... | ... | @@ -85,7 +85,9 @@ i3GEO.arvoreDeTemas = { |
85 | 85 | |
86 | 86 | uploadgpx: true, |
87 | 87 | |
88 | - comentarios: true | |
88 | + comentarios: true, | |
89 | + | |
90 | + bookmark: true | |
89 | 91 | } |
90 | 92 | |
91 | 93 | Tipo: |
... | ... | @@ -111,7 +113,8 @@ i3GEO.arvoreDeTemas = { |
111 | 113 | refresh: true, |
112 | 114 | carousel: true, |
113 | 115 | uploadgpx: true, |
114 | - comentarios: true | |
116 | + comentarios: true, | |
117 | + bookmark: true | |
115 | 118 | }, |
116 | 119 | /* |
117 | 120 | Propriedade: FATORESTRELA |
... | ... | @@ -1077,7 +1080,8 @@ i3GEO.arvoreDeTemas = { |
1077 | 1080 | idtema:temas[i].tid, |
1078 | 1081 | fonte:temas[i].link, |
1079 | 1082 | ogc:temas[i].ogc, |
1080 | - kmz:temas[i].kmz | |
1083 | + kmz:temas[i].kmz, | |
1084 | + bookmark:"sim" | |
1081 | 1085 | }, |
1082 | 1086 | node, |
1083 | 1087 | false, |
... | ... | @@ -1272,6 +1276,12 @@ i3GEO.arvoreDeTemas = { |
1272 | 1276 | tempNode.enableHighlight = false; |
1273 | 1277 | tempNode.isLeaf = true; |
1274 | 1278 | } |
1279 | + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark === true){ | |
1280 | + html = i3GEO.util.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema); | |
1281 | + tempNode = new YAHOO.widget.HTMLNode({html:html}, node, false,true); | |
1282 | + tempNode.enableHighlight = false; | |
1283 | + tempNode.isLeaf = true; | |
1284 | + } | |
1275 | 1285 | node.loadComplete(); |
1276 | 1286 | }, |
1277 | 1287 | /* | ... | ... |
classesjs/classe_barradebotoes.js
... | ... | @@ -610,7 +610,9 @@ i3GEO.barraDeBotoes = { |
610 | 610 | {i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic);} |
611 | 611 | //copia os botoes do HTML para a janela |
612 | 612 | ticone = 28; |
613 | - alturadisponivel = i3GEO.parametros.h - i3GEO.Interface.BARRABOTOESTOP - ticone - 18; | |
613 | + alturadisponivel = i3GEO.parametros.h - i3GEO.Interface.BARRABOTOESTOP - ticone - 18 - 28; | |
614 | + if(i3GEO.barraDeBotoes.AUTOALTURA === true) | |
615 | + {alturadisponivel += 28;} | |
614 | 616 | numerobotoes = parseInt(alturadisponivel / ticone,10); |
615 | 617 | falta = alturadisponivel - (ticone * numerobotoes); |
616 | 618 | if($i(idconteudo)) |
... | ... | @@ -649,9 +651,9 @@ i3GEO.barraDeBotoes = { |
649 | 651 | } |
650 | 652 | YAHOO.namespace("janelaBotoes.xp"); |
651 | 653 | if(i3GEO.barraDeBotoes.AUTOALTURA === false || barraZoom === true || (elementos.length > numerobotoes)) |
652 | - {YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false,iframe:false } );} | |
654 | + {YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {zIndex:20000,width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false,iframe:false } );} | |
653 | 655 | else |
654 | - {YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {height:i3GEO.parametros.h - 4,width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false,iframe:false } );} | |
656 | + {YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {zIndex:20000,height:i3GEO.parametros.h - 4,width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false,iframe:false } );} | |
655 | 657 | |
656 | 658 | if(i3GEO.barraDeBotoes.SOICONES === true){ |
657 | 659 | temp = $i("i3geo_barra2"); | ... | ... |
classesjs/classe_interface.js
... | ... | @@ -868,7 +868,7 @@ i3GEO.Interface = { |
868 | 868 | if(i3geoOL.getLayersByName(camada.name).length == 0){ |
869 | 869 | urllayer = url+"&layer="+camada.name; |
870 | 870 | try{ |
871 | - if(camada.escondido === "sim" || camada.connectiontype === 10 || camada.type === 4 || camada.type === 8 ) | |
871 | + if(camada.escondido === "sim" || camada.connectiontype === 10 || camada.type === 0 || camada.type === 4 || camada.type === 8 ) | |
872 | 872 | {opcoes.singleTile = true;} |
873 | 873 | else{ |
874 | 874 | if(camada.type === 3) //raster | ... | ... |
classesphp/classe_atributos.php
... | ... | @@ -1144,7 +1144,6 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado |
1144 | 1144 | $mapa = desligatemas($mapa); |
1145 | 1145 | $mapa = desligamargem($mapa); |
1146 | 1146 | $imgo = $mapa->draw(); |
1147 | - | |
1148 | 1147 | //$formatoinfo = "MIME"; |
1149 | 1148 | $formatosinfo = $layer->getmetadata("formatosinfo"); |
1150 | 1149 | if ($formatosinfo != "") |
... | ... | @@ -1164,42 +1163,12 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado |
1164 | 1163 | {$formatoinfo = $layer->getmetadata("wms_feature_info_mime_type");} |
1165 | 1164 | if($formatoinfo == "") |
1166 | 1165 | {$formatoinfo = "text/plain";} |
1167 | - } | |
1168 | - /* | |
1169 | - $srs = $layer->getmetadata("wms_srs"); | |
1170 | - $srss = explode(" ",$srs); | |
1171 | - $srs = "EPSG:4326"; | |
1172 | - foreach ($srss as $s) | |
1173 | - { | |
1174 | - if(strtoupper($s) == "EPSG:4291") | |
1175 | - {$srs = "EPSG:4291";} | |
1176 | 1166 | } |
1177 | - $res .= "&SRS=".$srs; | |
1178 | - $resposta = file($res."&FORMAT=".$formatoinfo); | |
1179 | - */ | |
1180 | 1167 | $res = $layer->getWMSFeatureInfoURL($ptimg->x, $ptimg->y, 1,$formatoinfo); |
1181 | 1168 | $res = str_replace("INFOFORMAT","INFO_FORMAT",$res); |
1182 | 1169 | $res2 = $layer->getWMSFeatureInfoURL($ptimg->x, $ptimg->y, 1,"MIME"); |
1183 | 1170 | $res2 = str_replace("INFOFORMAT","INFO_FORMAT",$res2); |
1184 | 1171 | $resposta = file($res); |
1185 | - /* | |
1186 | - $resposta = str_ireplace('<?xml version="1.0" encoding="UTF-8"?>',"",$resposta); | |
1187 | - $resposta = str_ireplace('<?xml version="1.0" encoding="ISO-8859-1"?>',"",$resposta); | |
1188 | - $resposta = str_ireplace("<?xml version='1.0' encoding='ISO-8859-1'?>","",$resposta); | |
1189 | - $resposta = str_ireplace('<?xml',"",$resposta); | |
1190 | - $resposta = str_ireplace("<","zzzzzzzzzz",$resposta); | |
1191 | - $resposta = str_ireplace(">","zzzzzzzzzz",$resposta); | |
1192 | - if (stristr(implode(" ",$resposta),"msWMSLoadGetMapParams")) | |
1193 | - { | |
1194 | - $resposta = file($res); | |
1195 | - $resposta = str_ireplace('<?xml version="1.0" encoding="UTF-8"?>',"",$resposta); | |
1196 | - $resposta = str_ireplace('<?xml version="1.0" encoding="ISO-8859-1"?>',"",$resposta); | |
1197 | - $resposta = str_ireplace("<?xml version='1.0' encoding='ISO-8859-1'?>","",$resposta); | |
1198 | - $resposta = str_ireplace('<?xml',"",$resposta); | |
1199 | - $resposta = str_ireplace("<","zzzzzzzzzz",$resposta); | |
1200 | - $resposta = str_ireplace(">","zzzzzzzzzz",$resposta); | |
1201 | - } | |
1202 | - */ | |
1203 | 1172 | $n = array(); |
1204 | 1173 | if(strtoupper($formatoinfo) == "TEXT/HTML") |
1205 | 1174 | { |
... | ... | @@ -1269,9 +1238,7 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado |
1269 | 1238 | $locimg = $layer->getmetadata("IMGLOC"); //indica o local onde estão os ícones |
1270 | 1239 | $tips = $layer->getmetadata("TIP"); |
1271 | 1240 | $itensLayer = pegaItens($layer); |
1272 | - | |
1273 | 1241 | $nitens = count($itensLayer); |
1274 | - | |
1275 | 1242 | if($itens == "") |
1276 | 1243 | {$itens = $itensLayer;} |
1277 | 1244 | else |
... | ... | @@ -1296,6 +1263,8 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado |
1296 | 1263 | {$locimg = array_fill(0, $nitens-1,'');} |
1297 | 1264 | else |
1298 | 1265 | {$locimg = explode(",",$locimg);} |
1266 | + $tips = str_replace(" ",",",$tips); | |
1267 | + $tips = explode(",",$tips); | |
1299 | 1268 | //o retorno deve ser do tipo TIP |
1300 | 1269 | if($etip == true) |
1301 | 1270 | { |
... | ... | @@ -1308,7 +1277,6 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado |
1308 | 1277 | $lks = array(); |
1309 | 1278 | $itemimg = array(); |
1310 | 1279 | $locimg = array(); |
1311 | - $tips = explode(",",$tips); | |
1312 | 1280 | foreach($tips as $t) |
1313 | 1281 | { |
1314 | 1282 | $itens[] = $t; |
... | ... | @@ -1343,13 +1311,17 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado |
1343 | 1311 | {$img = "<img src='".$locimg[$conta]."//".$shape->values[$itemimg[$conta]]."' //>";} |
1344 | 1312 | else |
1345 | 1313 | if($itemimg[$conta] != "") |
1346 | - {$img = "<img src='".$shape->values[$itemimg[$conta]]."' //>";} | |
1347 | - | |
1314 | + {$img = "<img src='".$shape->values[$itemimg[$conta]]."' //>";} | |
1315 | + //indica se o item é tbm uma etiqueta | |
1316 | + $etiqueta = "nao"; | |
1317 | + if(in_array($it,$tips)) | |
1318 | + {$etiqueta = "sim";} | |
1348 | 1319 | $arraytemp = array( |
1349 | 1320 | "alias"=>$this->converte($itensdesc[$conta]), |
1350 | 1321 | "valor"=>$this->converte($val), |
1351 | 1322 | "link"=>$link, |
1352 | - "img"=>$img | |
1323 | + "img"=>$img, | |
1324 | + "tip"=>$etiqueta | |
1353 | 1325 | ); |
1354 | 1326 | if($etip==false) |
1355 | 1327 | {$valori[] = $arraytemp;} | ... | ... |
ferramentas/comentarios/index.php
... | ... | @@ -24,6 +24,7 @@ if(!empty($parametrosURL["limpalogin"])) |
24 | 24 | session_name("openid"); |
25 | 25 | session_start(); |
26 | 26 | $_SESSION["g_sid"] = $parametrosURL["g_sid"]; |
27 | + $_SESSION["locaplic"] = $parametrosURL["locaplic"]; | |
27 | 28 | } |
28 | 29 | if(!empty($parametrosURL["tema"])) |
29 | 30 | {$_SESSION["tema"] = $parametrosURL["tema"];} |
... | ... | @@ -52,7 +53,7 @@ function linkOpenId() |
52 | 53 | function formularioInsere() |
53 | 54 | { |
54 | 55 | echo "<p>Adicione um comentário:</p>"; |
55 | - $url = $_SESSION["locaplic"]."/ferramentas/comentarios/index.php?g_sid=".$_SESSION["g_sid"]."&tema=".$_SESSION["tema"]; | |
56 | + $url = $_SESSION["locaplic"]."/ferramentas/comentarios/index.php?g_sid=".$_SESSION["g_sid"]."&tema=".$_SESSION["tema"]."&locaplic=".$_SESSION["locaplic"]; | |
56 | 57 | echo "<form action='".$url."' method='post'>"; |
57 | 58 | echo " <textarea name=novocomentario value='' type='text' style='height:150px;width:98%' ></textarea><br>"; |
58 | 59 | echo " <input type=submit value='Salvar' />"; | ... | ... |
ferramentas/identifica/index.js.php
... | ... | @@ -145,12 +145,12 @@ i3GEOF.identifica = { |
145 | 145 | i3GEO.guias.mostraGuiaFerramenta("i3GEOidentificaguia4","i3GEOidentificaguia"); |
146 | 146 | new YAHOO.widget.Button("i3GEOidentificabotao1",{onclick:{fn: function(){ |
147 | 147 | if(i3GEO.temaAtivo !== ""){ |
148 | - | |
149 | 148 | var ltema = i3GEO.arvoreDeCamadas.pegaTema(i3GEO.temaAtivo); |
150 | 149 | if(ltema.identifica == "nao" || ltema.identifica == "NAO") |
151 | 150 | {alert("Esse tema não permite etiquetas");} |
152 | 151 | else |
153 | 152 | {i3GEO.tema.dialogo.etiquetas(i3GEO.temaAtivo);} |
153 | + $i("i3GEOidentificaocorrencia").innerHTML = ""; | |
154 | 154 | } |
155 | 155 | else |
156 | 156 | {alert("Nenhum tema definido");} |
... | ... | @@ -583,7 +583,7 @@ i3GEOF.identifica = { |
583 | 583 | retorno {JSON} - objeto JSON com os dados <i3GEO.php.identifica2> |
584 | 584 | */ |
585 | 585 | mostraDadosTema: function(retorno){ |
586 | - var res="",div0,ntemas,i,resultados,nres,cor,j,itens,nitens,k,atualN = "todas",inicio=0,numResultados; | |
586 | + var res="",div0,ntemas,i,resultados,nres,cor,j,itens,nitens,k,atualN = "todas",inicio=0,numResultados,tip; | |
587 | 587 | if($i("i3GEOFidentificaNocorrencias")) |
588 | 588 | {atualN = $i("i3GEOFidentificaNocorrencias").value;} |
589 | 589 | $i("i3GEOF.identifica_corpo").scrollTop = 0; |
... | ... | @@ -614,10 +614,14 @@ i3GEOF.identifica = { |
614 | 614 | { |
615 | 615 | nitens = resultados[j].length; |
616 | 616 | for(k=0;k<nitens;k++){ |
617 | + tip = " "; | |
618 | + if(resultados[j][k].tip == "sim"){ | |
619 | + tip = "<img style='margin-right:2px;' src='"+i3GEO.configura.locaplic+"/imagens/tips.png' title='Etiqueta ativa' />"; | |
620 | + } | |
617 | 621 | if(resultados[j][k].link === "") |
618 | - {res += "<div style='width:100%;text-align:left;background-color:"+cor+"' > "+resultados[j][k].alias+": "+resultados[j][k].valor+"</div>";} | |
622 | + {res += "<div style='width:100%;text-align:left;background-color:"+cor+"' >"+tip+resultados[j][k].alias+": "+resultados[j][k].valor+"</div>";} | |
619 | 623 | else |
620 | - {res += "<div style='width:100%;text-align:left;background-color:"+cor+"' > "+resultados[j][k].alias+": <a href='"+resultados[j][k].link+"' target=_blank >"+resultados[j][k].valor+"</a></div>";} | |
624 | + {res += "<div style='width:100%;text-align:left;background-color:"+cor+"' >"+tip+resultados[j][k].alias+": <a href='"+resultados[j][k].link+"' target=_blank >"+resultados[j][k].valor+"</a></div>";} | |
621 | 625 | if(resultados[j][k].img !== "") |
622 | 626 | {res += "<div style='width:100%;text-align:left;background-color:"+cor+"' >"+resultados[j][k].img+"</div>";} |
623 | 627 | if (cor === "RGB(250,250,250)"){cor = "beige";} | ... | ... |
436 Bytes
interface/openlayers.htm
... | ... | @@ -183,7 +183,7 @@ i3GEO.Interface.openlayers.GADGETS = { |
183 | 183 | ScaleLine:true, |
184 | 184 | OverviewMap:false |
185 | 185 | }; |
186 | -i3GEO.Interface.openlayers.TILES = false; | |
186 | +i3GEO.Interface.openlayers.TILES = true; | |
187 | 187 | /* |
188 | 188 | Após a criação, é criado o objeto i3geoOL que corresponde ao objeto map da API do OpenLayers. |
189 | 189 | Vc pode usar i3geoOL para aplicar os métodos e verificar as propriedades da API do OpenLayers | ... | ... |
pacotes/openid/login.php