Commit a16d6526a8175521c13d2ee47eed992fb086f279

Authored by Edmar Moretti
1 parent 471d070a

Exemplo de uso da legenda de forma programatica

admin/admin.db
No preview for this file type
exemplos/cursodsv23.htm 0 → 100755
... ... @@ -0,0 +1,163 @@
  1 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2 +<html>
  3 +<head>
  4 +<meta http-equiv="Category" content="i3Geo Mapa interativo MMA geoprocessamento sig mobile">
  5 +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
  6 +<title>i3GEO - OpenLayers</title>
  7 +<script src="../classesjs/i3geonaocompacto.js"></script>
  8 +<script src="../pacotes/openlayers/OpenLayers2131.js"></script>
  9 +<link rel="stylesheet" type="text/css" href="../css/black.css">
  10 +</head>
  11 +<body style='background:white;' class=yui-skin-sam >
  12 +<div style="left:5px;top:100px">
  13 + <div id="menuSuspenso" style="width:750px;left:50px;">
  14 + </div>
  15 +
  16 + <div id=i3geo >
  17 + <div id=corpoMapa style="width:750px;height:400px;background-image:url('../imagens/i3geo1bw.jpg');">
  18 + </div>
  19 + </div>
  20 +</div>
  21 +<div id=barraDeIcones ></div>
  22 +<style>
  23 +#menuSuspenso .bd{
  24 + background: black;
  25 +}
  26 +#barraDeIcones {
  27 + border: 0px solid black;
  28 + border-radius: 4px;
  29 + height: 50px;
  30 + margin: auto;
  31 + padding: 1px;
  32 + position: relative;
  33 + top: 0px;
  34 + width: 510px;
  35 + z-index: 5000;
  36 + overflow: hidden;
  37 +}
  38 +
  39 +#barraDeIcones_mascara {
  40 + z-index: -1;
  41 + opacity: 0.4;
  42 + display: block;
  43 + position: absolute;
  44 + width: 100%;
  45 + height: 100%;
  46 + background: none repeat scroll 0 0 black;
  47 + border-radius: 4px;
  48 + overflow: hidden;
  49 +}
  50 +
  51 +#barraDeIcones img {
  52 + margin-left: 10px;
  53 +}
  54 +</style>
  55 +<script>
  56 +/************
  57 +Nesse exemplo a barra de botoes e inserida em um DIV, posicionado fora do mapa.
  58 +
  59 +************/
  60 +i3GEO.idioma.MOSTRASELETOR = false; //para nao mostrar as bandeiras de escolha do idioma
  61 +i3GEO.configura.mapaRefDisplay = "none";//nao mostra o mapa de referencia
  62 +//parametros da interface OpenLayers
  63 +i3GEO.Interface.openlayers.GADGETS = {
  64 + PanZoomBar : false,
  65 + PanZoom : false,
  66 + LayerSwitcher : false,
  67 + ScaleLine : true,
  68 + OverviewMap : false
  69 +};
  70 +//parametros para o menu
  71 +i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso = {
  72 + permiteLogin: true,
  73 + marcadores: true,
  74 + idhtml:"menuSuspenso",
  75 + deslocaEsquerda:0,
  76 + parametrosYUI: {iframe:false,autosubmenudisplay: false, showdelay: 200, hidedelay: 500, lazyload: false}
  77 + };
  78 +
  79 +i3GEO.configura.oMenuData = {
  80 + menu:[
  81 + {nome:$trad("s1"),id:"ajudaMenu"}
  82 + ],
  83 + submenus:{
  84 + "ajudaMenu": [
  85 + { id:"omenudataAjudamenu9",text: $trad("x68"), url: "javascript:i3GEO.janela.tempoMsg(i3GEO.parametros.mensageminicia)" },
  86 + { id:"omenudataAjudamenu2",text: $trad("u2"), url: "javascript:i3GEO.ajuda.abreDoc()" },
  87 + { id:"omenudataAjudamenu3",text: $trad("u4a"), url: "javascript:i3GEO.ajuda.abreDoc('/documentacao/manual-i3geo-6_0-pt.pdf')" },
  88 + { id:"omenudataAjudamenu4",text: $trad("u4"), url: "http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525", target:"_blank" },
  89 + { id:"omenudataAjudamenu5",text: $trad("u5a"), url: "http://www.softwarepublico.gov.br", target:"_blank" },
  90 + { id:"omenudataAjudamenu1",text: $trad("x67"), url: "http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332", target:"_blank" },
  91 + { id:"omenudataAjudamenu7",text: $trad("u5b"), url: "javascript:i3GEO.ajuda.abreDoc('/ajuda_usuario.php')"},
  92 + { id:"omenudataAjudamenu8",text: $trad("u5c"), url: "javascript:i3GEO.ajuda.redesSociais()" }
  93 + ]
  94 + }
  95 +};
  96 +
  97 +i3GEO.cria();
  98 +//
  99 +//parametros da barra de botoes
  100 +//
  101 +i3GEO.barraDeBotoes.TIPO = "emlinha";
  102 +//altera um dos icones de botoes ja existentes
  103 +i3GEO.barraDeBotoes.ICONEBOTAO.abreJanelaLegenda = "/imagens/gisicons/legend-add.png";
  104 +//adiciona um botao novo com suas funcoes especificas
  105 +//aciona funcao ajax definida em i3GEO.php
  106 +i3GEO.barraDeBotoes.adicionaBotao(
  107 + {
  108 + iddiv:"meubotao",
  109 + tipo:"",
  110 + dica:"Meu Bot&atilde;o",
  111 + titulo: "Meu Bot&atilde;o",
  112 + icone: "/imagens/oxygen/22x22/user-online.png",
  113 + funcaoonclick:function(){
  114 + var temp = function(retorno){
  115 + alert(retorno.data);
  116 + }
  117 + i3GEO.php.listaTemas(temp,"polygon");
  118 + }
  119 + }
  120 +);
  121 +//define quais os botoes serao mostrados
  122 +i3GEO.barraDeBotoes.INCLUIBOTAO = {
  123 + meubotao : true, //botao novo
  124 + abreJanelaLegenda: true,
  125 + localizar: true,
  126 + zoomanterior: true,
  127 + zoomli: true,
  128 + zoomproximo: true,
  129 + zoomiauto: false,
  130 + zoomoauto: false,
  131 + pan: false,
  132 + zoomtot: false,
  133 + identifica: false,
  134 + identificaBalao: false,
  135 + mede: false,
  136 + area: false,
  137 + selecao: false,
  138 + barraedicao: false,
  139 + imprimir: false,
  140 + google: false,
  141 + referencia: false,
  142 + exten: false,
  143 + inserexy: false,
  144 + textofid: false,
  145 + reinicia: false,
  146 + buscafotos: false,
  147 + wiki: false,
  148 + metar: false,
  149 + lentei: false,
  150 + confluence: false,
  151 + inseregrafico: false,
  152 + v3d: false
  153 +};
  154 +i3GEO.finaliza = function(){
  155 + //cria o div com id "barraDeIcones" e insere a barra
  156 + //
  157 + i3GEO.barraDeBotoes.inicializaBarra("","",false,0,0,"barraDeIcones");
  158 +};
  159 +i3GEO.inicia();
  160 +
  161 +</script>
  162 +</body>
  163 +</html>
... ...
exemplos/cursodsv24.htm 0 → 100755
... ... @@ -0,0 +1,42 @@
  1 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2 +<html>
  3 +<head>
  4 +<meta http-equiv="Category" content="i3Geo Mapa interativo MMA geoprocessamento sig mobile">
  5 +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
  6 +<title>i3GEO - OpenLayers</title>
  7 +<script src="../classesjs/i3geonaocompacto.js"></script>
  8 +<script src="../pacotes/openlayers/OpenLayers2131.js"></script>
  9 +<link rel="stylesheet" type="text/css" href="../css/black.css">
  10 +</head>
  11 +<body style='margin-left:7px;background:white;' class=yui-skin-sam >
  12 +<div style="top:50px;">
  13 +<div style="width:150px;height:300px;border:1px solid;float:left;">
  14 + Lateral <br>
  15 + <div id=Legenda style="display:block;margin:auto;text-align:center;left:5px;" ></div>
  16 +</div>
  17 +<div id=i3geo >
  18 +<div id=corpoMapa style="left:155px;width:700px;height:400px;background-image:url('../imagens/i3geo1bw.jpg');">
  19 +</div>
  20 +</div>
  21 +</div>
  22 +<script>
  23 +/************
  24 +A legenda do mapa pode ser mostrada em um local especifico. Para isso e necessario criar um DIV e iniciar
  25 +a construcao da legenda apos o mapa ter sido criado.
  26 +
  27 +O DIV deve ter o estilo "display" definido, ou a legenda nao sera mostrada.
  28 +
  29 +************/
  30 +//i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml = "escalaTeste";
  31 +i3GEO.idioma.MOSTRASELETOR = false; //para nao mostrar as bandeiras de escolha do idioma
  32 +i3GEO.configura.mapaRefDisplay = "none";//nao mostra o mapa de referencia
  33 +i3GEO.mapa.TEMASINICIAIS = "_lbiomashp,_llocali";
  34 +i3GEO.mapa.TEMASINICIAISLIGADOS = "_lbiomashp";
  35 +i3GEO.finaliza = function(){
  36 + i3GEO.mapa.legendaHTML.cria("Legenda");
  37 +};
  38 +i3GEO.cria();
  39 +i3GEO.inicia();
  40 +</script>
  41 +</body>
  42 +</html>
... ...
exemplos/index.html
... ... @@ -104,6 +104,11 @@ body,td {
104 104 <a title="Barra de botoes em linha" href="codemirror.php?&pagina=cursodsv21.htm" target="_blank">[21]</a>
105 105 &nbsp;&nbsp;
106 106 <a title="Botao com funcao Ajax" href="codemirror.php?&pagina=cursodsv22.htm" target="_blank">[22]</a>
  107 + &nbsp;&nbsp;
  108 + <a title="Barra de botoes fora do mapa" href="codemirror.php?&pagina=cursodsv23.htm" target="_blank">[23]</a>
  109 + &nbsp;&nbsp;
  110 + <a title="Legenda fora do mapa" href="codemirror.php?&pagina=cursodsv24.htm" target="_blank">[24]</a>
  111 +
107 112 </p>
108 113 </fieldset>
109 114 <fieldset>
... ...