Commit cfb09f845a7952d48b8727c8d555ac6a86846db5

Authored by Edmar Moretti
1 parent a705455b

Inclusão de bookmark na árvore de temas e ícone indicando qd um tema está ativo …

…como etiqueta (ferramenta identifica)
classesjs/classe_arvoredetemas.js
@@ -85,7 +85,9 @@ i3GEO.arvoreDeTemas = { @@ -85,7 +85,9 @@ i3GEO.arvoreDeTemas = {
85 85
86 uploadgpx: true, 86 uploadgpx: true,
87 87
88 - comentarios: true 88 + comentarios: true,
  89 +
  90 + bookmark: true
89 } 91 }
90 92
91 Tipo: 93 Tipo:
@@ -111,7 +113,8 @@ i3GEO.arvoreDeTemas = { @@ -111,7 +113,8 @@ i3GEO.arvoreDeTemas = {
111 refresh: true, 113 refresh: true,
112 carousel: true, 114 carousel: true,
113 uploadgpx: true, 115 uploadgpx: true,
114 - comentarios: true 116 + comentarios: true,
  117 + bookmark: true
115 }, 118 },
116 /* 119 /*
117 Propriedade: FATORESTRELA 120 Propriedade: FATORESTRELA
@@ -1077,7 +1080,8 @@ i3GEO.arvoreDeTemas = { @@ -1077,7 +1080,8 @@ i3GEO.arvoreDeTemas = {
1077 idtema:temas[i].tid, 1080 idtema:temas[i].tid,
1078 fonte:temas[i].link, 1081 fonte:temas[i].link,
1079 ogc:temas[i].ogc, 1082 ogc:temas[i].ogc,
1080 - kmz:temas[i].kmz 1083 + kmz:temas[i].kmz,
  1084 + bookmark:"sim"
1081 }, 1085 },
1082 node, 1086 node,
1083 false, 1087 false,
@@ -1272,6 +1276,12 @@ i3GEO.arvoreDeTemas = { @@ -1272,6 +1276,12 @@ i3GEO.arvoreDeTemas = {
1272 tempNode.enableHighlight = false; 1276 tempNode.enableHighlight = false;
1273 tempNode.isLeaf = true; 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 node.loadComplete(); 1285 node.loadComplete();
1276 }, 1286 },
1277 /* 1287 /*
classesjs/classe_barradebotoes.js
@@ -610,7 +610,9 @@ i3GEO.barraDeBotoes = { @@ -610,7 +610,9 @@ i3GEO.barraDeBotoes = {
610 {i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic);} 610 {i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic);}
611 //copia os botoes do HTML para a janela 611 //copia os botoes do HTML para a janela
612 ticone = 28; 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 numerobotoes = parseInt(alturadisponivel / ticone,10); 616 numerobotoes = parseInt(alturadisponivel / ticone,10);
615 falta = alturadisponivel - (ticone * numerobotoes); 617 falta = alturadisponivel - (ticone * numerobotoes);
616 if($i(idconteudo)) 618 if($i(idconteudo))
@@ -649,9 +651,9 @@ i3GEO.barraDeBotoes = { @@ -649,9 +651,9 @@ i3GEO.barraDeBotoes = {
649 } 651 }
650 YAHOO.namespace("janelaBotoes.xp"); 652 YAHOO.namespace("janelaBotoes.xp");
651 if(i3GEO.barraDeBotoes.AUTOALTURA === false || barraZoom === true || (elementos.length > numerobotoes)) 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 else 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 if(i3GEO.barraDeBotoes.SOICONES === true){ 658 if(i3GEO.barraDeBotoes.SOICONES === true){
657 temp = $i("i3geo_barra2"); 659 temp = $i("i3geo_barra2");
classesjs/classe_interface.js
@@ -868,7 +868,7 @@ i3GEO.Interface = { @@ -868,7 +868,7 @@ i3GEO.Interface = {
868 if(i3geoOL.getLayersByName(camada.name).length == 0){ 868 if(i3geoOL.getLayersByName(camada.name).length == 0){
869 urllayer = url+"&layer="+camada.name; 869 urllayer = url+"&layer="+camada.name;
870 try{ 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 {opcoes.singleTile = true;} 872 {opcoes.singleTile = true;}
873 else{ 873 else{
874 if(camada.type === 3) //raster 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,7 +1144,6 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado
1144 $mapa = desligatemas($mapa); 1144 $mapa = desligatemas($mapa);
1145 $mapa = desligamargem($mapa); 1145 $mapa = desligamargem($mapa);
1146 $imgo = $mapa->draw(); 1146 $imgo = $mapa->draw();
1147 -  
1148 //$formatoinfo = "MIME"; 1147 //$formatoinfo = "MIME";
1149 $formatosinfo = $layer->getmetadata("formatosinfo"); 1148 $formatosinfo = $layer->getmetadata("formatosinfo");
1150 if ($formatosinfo != "") 1149 if ($formatosinfo != "")
@@ -1164,42 +1163,12 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado @@ -1164,42 +1163,12 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado
1164 {$formatoinfo = $layer->getmetadata("wms_feature_info_mime_type");} 1163 {$formatoinfo = $layer->getmetadata("wms_feature_info_mime_type");}
1165 if($formatoinfo == "") 1164 if($formatoinfo == "")
1166 {$formatoinfo = "text/plain";} 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 $res = $layer->getWMSFeatureInfoURL($ptimg->x, $ptimg->y, 1,$formatoinfo); 1167 $res = $layer->getWMSFeatureInfoURL($ptimg->x, $ptimg->y, 1,$formatoinfo);
1181 $res = str_replace("INFOFORMAT","INFO_FORMAT",$res); 1168 $res = str_replace("INFOFORMAT","INFO_FORMAT",$res);
1182 $res2 = $layer->getWMSFeatureInfoURL($ptimg->x, $ptimg->y, 1,"MIME"); 1169 $res2 = $layer->getWMSFeatureInfoURL($ptimg->x, $ptimg->y, 1,"MIME");
1183 $res2 = str_replace("INFOFORMAT","INFO_FORMAT",$res2); 1170 $res2 = str_replace("INFOFORMAT","INFO_FORMAT",$res2);
1184 $resposta = file($res); 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 $n = array(); 1172 $n = array();
1204 if(strtoupper($formatoinfo) == "TEXT/HTML") 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,9 +1238,7 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado
1269 $locimg = $layer->getmetadata("IMGLOC"); //indica o local onde estão os ícones 1238 $locimg = $layer->getmetadata("IMGLOC"); //indica o local onde estão os ícones
1270 $tips = $layer->getmetadata("TIP"); 1239 $tips = $layer->getmetadata("TIP");
1271 $itensLayer = pegaItens($layer); 1240 $itensLayer = pegaItens($layer);
1272 -  
1273 $nitens = count($itensLayer); 1241 $nitens = count($itensLayer);
1274 -  
1275 if($itens == "") 1242 if($itens == "")
1276 {$itens = $itensLayer;} 1243 {$itens = $itensLayer;}
1277 else 1244 else
@@ -1296,6 +1263,8 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado @@ -1296,6 +1263,8 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado
1296 {$locimg = array_fill(0, $nitens-1,'');} 1263 {$locimg = array_fill(0, $nitens-1,'');}
1297 else 1264 else
1298 {$locimg = explode(",",$locimg);} 1265 {$locimg = explode(",",$locimg);}
  1266 + $tips = str_replace(" ",",",$tips);
  1267 + $tips = explode(",",$tips);
1299 //o retorno deve ser do tipo TIP 1268 //o retorno deve ser do tipo TIP
1300 if($etip == true) 1269 if($etip == true)
1301 { 1270 {
@@ -1308,7 +1277,6 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado @@ -1308,7 +1277,6 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado
1308 $lks = array(); 1277 $lks = array();
1309 $itemimg = array(); 1278 $itemimg = array();
1310 $locimg = array(); 1279 $locimg = array();
1311 - $tips = explode(",",$tips);  
1312 foreach($tips as $t) 1280 foreach($tips as $t)
1313 { 1281 {
1314 $itens[] = $t; 1282 $itens[] = $t;
@@ -1343,13 +1311,17 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado @@ -1343,13 +1311,17 @@ $listaDeTemas - (opcional) Lista com os códigos dos temas que serão identificado
1343 {$img = "<img src='".$locimg[$conta]."//".$shape->values[$itemimg[$conta]]."' //>";} 1311 {$img = "<img src='".$locimg[$conta]."//".$shape->values[$itemimg[$conta]]."' //>";}
1344 else 1312 else
1345 if($itemimg[$conta] != "") 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 $arraytemp = array( 1319 $arraytemp = array(
1349 "alias"=>$this->converte($itensdesc[$conta]), 1320 "alias"=>$this->converte($itensdesc[$conta]),
1350 "valor"=>$this->converte($val), 1321 "valor"=>$this->converte($val),
1351 "link"=>$link, 1322 "link"=>$link,
1352 - "img"=>$img 1323 + "img"=>$img,
  1324 + "tip"=>$etiqueta
1353 ); 1325 );
1354 if($etip==false) 1326 if($etip==false)
1355 {$valori[] = $arraytemp;} 1327 {$valori[] = $arraytemp;}
ferramentas/comentarios/index.php
@@ -24,6 +24,7 @@ if(!empty($parametrosURL[&quot;limpalogin&quot;])) @@ -24,6 +24,7 @@ if(!empty($parametrosURL[&quot;limpalogin&quot;]))
24 session_name("openid"); 24 session_name("openid");
25 session_start(); 25 session_start();
26 $_SESSION["g_sid"] = $parametrosURL["g_sid"]; 26 $_SESSION["g_sid"] = $parametrosURL["g_sid"];
  27 + $_SESSION["locaplic"] = $parametrosURL["locaplic"];
27 } 28 }
28 if(!empty($parametrosURL["tema"])) 29 if(!empty($parametrosURL["tema"]))
29 {$_SESSION["tema"] = $parametrosURL["tema"];} 30 {$_SESSION["tema"] = $parametrosURL["tema"];}
@@ -52,7 +53,7 @@ function linkOpenId() @@ -52,7 +53,7 @@ function linkOpenId()
52 function formularioInsere() 53 function formularioInsere()
53 { 54 {
54 echo "<p>Adicione um comentário:</p>"; 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 echo "<form action='".$url."' method='post'>"; 57 echo "<form action='".$url."' method='post'>";
57 echo " <textarea name=novocomentario value='' type='text' style='height:150px;width:98%' ></textarea><br>"; 58 echo " <textarea name=novocomentario value='' type='text' style='height:150px;width:98%' ></textarea><br>";
58 echo " <input type=submit value='Salvar' />"; 59 echo " <input type=submit value='Salvar' />";
ferramentas/identifica/index.js.php
@@ -145,12 +145,12 @@ i3GEOF.identifica = { @@ -145,12 +145,12 @@ i3GEOF.identifica = {
145 i3GEO.guias.mostraGuiaFerramenta("i3GEOidentificaguia4","i3GEOidentificaguia"); 145 i3GEO.guias.mostraGuiaFerramenta("i3GEOidentificaguia4","i3GEOidentificaguia");
146 new YAHOO.widget.Button("i3GEOidentificabotao1",{onclick:{fn: function(){ 146 new YAHOO.widget.Button("i3GEOidentificabotao1",{onclick:{fn: function(){
147 if(i3GEO.temaAtivo !== ""){ 147 if(i3GEO.temaAtivo !== ""){
148 -  
149 var ltema = i3GEO.arvoreDeCamadas.pegaTema(i3GEO.temaAtivo); 148 var ltema = i3GEO.arvoreDeCamadas.pegaTema(i3GEO.temaAtivo);
150 if(ltema.identifica == "nao" || ltema.identifica == "NAO") 149 if(ltema.identifica == "nao" || ltema.identifica == "NAO")
151 {alert("Esse tema não permite etiquetas");} 150 {alert("Esse tema não permite etiquetas");}
152 else 151 else
153 {i3GEO.tema.dialogo.etiquetas(i3GEO.temaAtivo);} 152 {i3GEO.tema.dialogo.etiquetas(i3GEO.temaAtivo);}
  153 + $i("i3GEOidentificaocorrencia").innerHTML = "";
154 } 154 }
155 else 155 else
156 {alert("Nenhum tema definido");} 156 {alert("Nenhum tema definido");}
@@ -583,7 +583,7 @@ i3GEOF.identifica = { @@ -583,7 +583,7 @@ i3GEOF.identifica = {
583 retorno {JSON} - objeto JSON com os dados <i3GEO.php.identifica2> 583 retorno {JSON} - objeto JSON com os dados <i3GEO.php.identifica2>
584 */ 584 */
585 mostraDadosTema: function(retorno){ 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 if($i("i3GEOFidentificaNocorrencias")) 587 if($i("i3GEOFidentificaNocorrencias"))
588 {atualN = $i("i3GEOFidentificaNocorrencias").value;} 588 {atualN = $i("i3GEOFidentificaNocorrencias").value;}
589 $i("i3GEOF.identifica_corpo").scrollTop = 0; 589 $i("i3GEOF.identifica_corpo").scrollTop = 0;
@@ -614,10 +614,14 @@ i3GEOF.identifica = { @@ -614,10 +614,14 @@ i3GEOF.identifica = {
614 { 614 {
615 nitens = resultados[j].length; 615 nitens = resultados[j].length;
616 for(k=0;k<nitens;k++){ 616 for(k=0;k<nitens;k++){
  617 + tip = "&nbsp;&nbsp;";
  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 if(resultados[j][k].link === "") 621 if(resultados[j][k].link === "")
618 - {res += "<div style='width:100%;text-align:left;background-color:"+cor+"' >&nbsp;&nbsp;"+resultados[j][k].alias+":&nbsp;"+resultados[j][k].valor+"</div>";} 622 + {res += "<div style='width:100%;text-align:left;background-color:"+cor+"' >"+tip+resultados[j][k].alias+":&nbsp;"+resultados[j][k].valor+"</div>";}
619 else 623 else
620 - {res += "<div style='width:100%;text-align:left;background-color:"+cor+"' >&nbsp;&nbsp;"+resultados[j][k].alias+":&nbsp;<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+":&nbsp;<a href='"+resultados[j][k].link+"' target=_blank >"+resultados[j][k].valor+"</a></div>";}
621 if(resultados[j][k].img !== "") 625 if(resultados[j][k].img !== "")
622 {res += "<div style='width:100%;text-align:left;background-color:"+cor+"' >"+resultados[j][k].img+"</div>";} 626 {res += "<div style='width:100%;text-align:left;background-color:"+cor+"' >"+resultados[j][k].img+"</div>";}
623 if (cor === "RGB(250,250,250)"){cor = "beige";} 627 if (cor === "RGB(250,250,250)"){cor = "beige";}
imagens/tips.png 0 → 100644

436 Bytes

interface/openlayers.htm
@@ -183,7 +183,7 @@ i3GEO.Interface.openlayers.GADGETS = { @@ -183,7 +183,7 @@ i3GEO.Interface.openlayers.GADGETS = {
183 ScaleLine:true, 183 ScaleLine:true,
184 OverviewMap:false 184 OverviewMap:false
185 }; 185 };
186 -i3GEO.Interface.openlayers.TILES = false; 186 +i3GEO.Interface.openlayers.TILES = true;
187 /* 187 /*
188 Após a criação, é criado o objeto i3geoOL que corresponde ao objeto map da API do OpenLayers. 188 Após a criação, é criado o objeto i3geoOL que corresponde ao objeto map da API do OpenLayers.
189 Vc pode usar i3geoOL para aplicar os métodos e verificar as propriedades da API do OpenLayers 189 Vc pode usar i3geoOL para aplicar os métodos e verificar as propriedades da API do OpenLayers
pacotes/openid/login.php
@@ -136,5 +136,6 @@ function submete(quem){ @@ -136,5 +136,6 @@ function submete(quem){
136 } 136 }
137 } catch(ErrorException $e) { 137 } catch(ErrorException $e) {
138 echo $e->getMessage(); 138 echo $e->getMessage();
  139 + echo "<br>O nome de usuario pode estar errado.";
139 } 140 }
140 ?> 141 ?>
141 \ No newline at end of file 142 \ No newline at end of file