Commit a66ac9ba810d497b202ed3429debfcd394f06f95
1 parent
f6bf32b3
Exists in
master
and in
7 other branches
Incluido um box no mapa de referência para refletir a alteração da extensão geog…
…ráfica do mapa na opção de alteração da extensão
Showing
4 changed files
with
52 additions
and
16 deletions
Show diff stats
classesjs/funcoes.js
| ... | ... | @@ -1701,7 +1701,9 @@ function initJanelaRef() |
| 1701 | 1701 | ins += "<img class=menos onclick='"+temp+"' src="+$im("branco.gif")+" /> "; |
| 1702 | 1702 | ins += '<input style="cursor:pointer" onclick="javascript:objmapa.atualizaReferencia()" type="checkbox" id="refDinamico" /> '+$trad("o6")+'</div>'; |
| 1703 | 1703 | ins += '<div class="bd" style="text-align:left;padding:3px;" id="mapaReferencia" onmouseover="javascript:movimentoRef(this)" onclick="javascript:clicouRef()">'; |
| 1704 | - ins += '<img style="cursor:pointer;" id=imagemReferencia src="" />'; | |
| 1704 | + ins += '<img style="cursor:pointer;" id=imagemReferencia src="" >'; | |
| 1705 | + ins += '<div id=boxRef style="position:absolute;top:0px;left:0px;width:10px;height:10px;border:2px solid blue;display:none"></div></div>'; | |
| 1706 | + | |
| 1705 | 1707 | ins += '<div style="text-align:left;font-size:0px" id="refmensagem" ></div></div>'; |
| 1706 | 1708 | novoel.innerHTML = ins; |
| 1707 | 1709 | document.body.appendChild(novoel); | ... | ... |
classesjs/iniciamma.js
| ... | ... | @@ -834,6 +834,7 @@ function Mapa(e,m) |
| 834 | 834 | this.atualizaReferencia = function(mapexten) |
| 835 | 835 | { |
| 836 | 836 | //objaguarde.abre("ajaxreferencia1",$trad("o3")); |
| 837 | + if($i("boxRef")){$i("boxRef").style.display="none";} //div utilizado na ferramenta mostraexten | |
| 837 | 838 | var dinamico = false; |
| 838 | 839 | if ($i("refDinamico")) |
| 839 | 840 | {var dinamico = $i("refDinamico").checked;} | ... | ... |
ferramentas/mostraexten/index.htm
| ... | ... | @@ -7,7 +7,6 @@ |
| 7 | 7 | <style type="text/css" >.yuibutton button{padding-left:2em;background:url(../../imagens/tic.png) 5% 50% no-repeat;}</style> |
| 8 | 8 | </head> |
| 9 | 9 | <body class="yui-skin-sam" > |
| 10 | - <div id=geral style="left:0px;top:0px;"> | |
| 11 | 10 | <div style='left:0px;display:block'> |
| 12 | 11 | Extensão geográfica atual, em décimos de grau. As coordenadas correspondem a menor longitude, menor latitude, maior longitude e maior latitude: |
| 13 | 12 | <textarea id=extatual rows=3 cols=50 ></textarea> |
| ... | ... | @@ -19,33 +18,33 @@ |
| 19 | 18 | <tr> |
| 20 | 19 | <td>Menor longitude (oeste):</td> |
| 21 | 20 | <td> |
| 22 | - <input class=digitar id='xg' title='grau' type=text size=3 value='-00'/> | |
| 23 | - <input class=digitar id='xm' title='minuto' type=text size=3 value='00'/> | |
| 24 | - <input class=digitar id='xs' title='segundo' type=text size=3 value='0.0'/> | |
| 21 | + <input onchange="mudabox()" class=digitar id='xg' title='grau' type=text size=3 value='-00'/> | |
| 22 | + <input onchange="mudabox()" class=digitar id='xm' title='minuto' type=text size=3 value='00'/> | |
| 23 | + <input onchange="mudabox()" class=digitar id='xs' title='segundo' type=text size=3 value='0.0'/> | |
| 25 | 24 | </td> |
| 26 | 25 | </tr> |
| 27 | 26 | <tr> |
| 28 | 27 | <td>Menor latitude (sul):</td> |
| 29 | 28 | <td> |
| 30 | - <input class=digitar id='yg' title='grau' type=text size=3 value='-00'/> | |
| 31 | - <input class=digitar id='ym' title='minuto' type=text size=3 value='00'/> | |
| 32 | - <input class=digitar id='ys' title='segundo' type=text size=3 value='0.0'/> | |
| 29 | + <input onchange="mudabox()" class=digitar id='yg' title='grau' type=text size=3 value='-00'/> | |
| 30 | + <input onchange="mudabox()" class=digitar id='ym' title='minuto' type=text size=3 value='00'/> | |
| 31 | + <input onchange="mudabox()" class=digitar id='ys' title='segundo' type=text size=3 value='0.0'/> | |
| 33 | 32 | </td> |
| 34 | 33 | </tr> |
| 35 | 34 | <tr> |
| 36 | 35 | <td>Maior longitude (leste):</td> |
| 37 | 36 | <td> |
| 38 | - <input class=digitar id='xxg' title='grau' type=text size=3 value='-00'/> | |
| 39 | - <input class=digitar id='xxm' title='minuto' type=text size=3 value='00'/> | |
| 40 | - <input class=digitar id='xxs' title='segundo' type=text size=3 value='0.0'/> | |
| 37 | + <input onchange="mudabox()" class=digitar id='xxg' title='grau' type=text size=3 value='-00'/> | |
| 38 | + <input onchange="mudabox()" class=digitar id='xxm' title='minuto' type=text size=3 value='00'/> | |
| 39 | + <input onchange="mudabox()" class=digitar id='xxs' title='segundo' type=text size=3 value='0.0'/> | |
| 41 | 40 | </td> |
| 42 | 41 | </tr> |
| 43 | 42 | <tr> |
| 44 | 43 | <td>Maior latitude (norte):</td> |
| 45 | 44 | <td> |
| 46 | - <input class=digitar id='yyg' title='grau' type=text size=3 value='-00'/> | |
| 47 | - <input class=digitar id='yym' title='minuto' type=text size=3 value='00'/> | |
| 48 | - <input class=digitar id='yys' title='segundo' type=text size=3 value='0.0'/> | |
| 45 | + <input onchange="mudabox()" class=digitar id='yyg' title='grau' type=text size=3 value='-00'/> | |
| 46 | + <input onchange="mudabox()" class=digitar id='yym' title='minuto' type=text size=3 value='00'/> | |
| 47 | + <input onchange="mudabox()" class=digitar id='yys' title='segundo' type=text size=3 value='0.0'/> | |
| 49 | 48 | </td> |
| 50 | 49 | </tr> |
| 51 | 50 | </table> |
| ... | ... | @@ -55,7 +54,6 @@ |
| 55 | 54 | <input id=botao1 type='button' size=14 value='Aplicar' /> |
| 56 | 55 | </div> |
| 57 | 56 | </div> |
| 58 | - </div> | |
| 59 | 57 | <script src="../i3geo_tudo_compacto.js.php" type="text/javascript"></script> |
| 60 | 58 | <script language="JavaScript" type="text/javascript" src="index.js"></script> |
| 61 | 59 | </body> | ... | ... |
ferramentas/mostraexten/index.js
| ... | ... | @@ -19,7 +19,19 @@ GNU junto com este programa; se não, escreva para a |
| 19 | 19 | Free Software Foundation, Inc., no endereço |
| 20 | 20 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
| 21 | 21 | */ |
| 22 | -//inicializa | |
| 22 | +//pega o elemento boxref para desenhar um retângulo no mapa de referência | |
| 23 | +boxref = false | |
| 24 | +if (window.parent.document.getElementById("boxRef")) | |
| 25 | +{boxref = window.parent.document.getElementById("boxRef")} | |
| 26 | +if((boxref) && !window.parent.document.getElementById("refDinamico").checked) | |
| 27 | +{ | |
| 28 | + boxref.style.display="block"; | |
| 29 | + boxref.style.top=0; | |
| 30 | + boxref.style.left=0; | |
| 31 | + boxref.style.width=0; | |
| 32 | + boxref.style.height=0; | |
| 33 | +} | |
| 34 | +//inicializa alguns parâmetros. | |
| 23 | 35 | parametrosURL() |
| 24 | 36 | YAHOO.example.init = function () |
| 25 | 37 | { |
| ... | ... | @@ -46,6 +58,8 @@ function aplicar() |
| 46 | 58 | var yy = window.parent.convdmsddf($i("yyg").value,$i("yym").value,$i("yys").value); |
| 47 | 59 | if ((x == xx) || (y == yy)) |
| 48 | 60 | {alert("Digite coordenadas válidas");return;} |
| 61 | + if ((x > xx) || (y > yy)) | |
| 62 | + {alert("Digite coordenadas válidas");return;} | |
| 49 | 63 | var cp = new cpaint(); |
| 50 | 64 | cp.set_response_type("JSON"); |
| 51 | 65 | //cp.set_debug(2) |
| ... | ... | @@ -54,3 +68,24 @@ function aplicar() |
| 54 | 68 | } |
| 55 | 69 | catch(e){alert("Digite coordenadas válidas");} |
| 56 | 70 | } |
| 71 | +//muda o box no mapa de referência | |
| 72 | +function mudabox() | |
| 73 | +{ | |
| 74 | + if((boxref) && !window.parent.document.getElementById("refDinamico").checked) | |
| 75 | + { | |
| 76 | + var x = window.parent.convdmsddf($i("xg").value,$i("xm").value,$i("xs").value); | |
| 77 | + var xx = window.parent.convdmsddf($i("xxg").value,$i("xxm").value,$i("xxs").value); | |
| 78 | + var y = window.parent.convdmsddf($i("yg").value,$i("ym").value,$i("ys").value); | |
| 79 | + var yy = window.parent.convdmsddf($i("yyg").value,$i("yym").value,$i("yys").value); | |
| 80 | + if ((x == xx) || (y == yy)) | |
| 81 | + {return;} | |
| 82 | + if ((x > xx) || (y > yy)) | |
| 83 | + {return;} | |
| 84 | + //calculo da nova posição do box | |
| 85 | + var extr = window.parent.objmapa.extentref.split(" "); | |
| 86 | + boxref.style.left = ((extr[0] - x) / window.parent.g_celularef) * -1 | |
| 87 | + boxref.style.width = ((xx - x) / window.parent.g_celularef) | |
| 88 | + boxref.style.top = ((extr[3] - yy) / window.parent.g_celularef) | |
| 89 | + boxref.style.height = ((yy - y) / window.parent.g_celularef) | |
| 90 | + } | |
| 91 | +} | |
| 57 | 92 | \ No newline at end of file | ... | ... |