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,7 +1701,9 @@ function initJanelaRef() | ||
1701 | ins += "<img class=menos onclick='"+temp+"' src="+$im("branco.gif")+" /> "; | 1701 | ins += "<img class=menos onclick='"+temp+"' src="+$im("branco.gif")+" /> "; |
1702 | ins += '<input style="cursor:pointer" onclick="javascript:objmapa.atualizaReferencia()" type="checkbox" id="refDinamico" /> '+$trad("o6")+'</div>'; | 1702 | ins += '<input style="cursor:pointer" onclick="javascript:objmapa.atualizaReferencia()" type="checkbox" id="refDinamico" /> '+$trad("o6")+'</div>'; |
1703 | ins += '<div class="bd" style="text-align:left;padding:3px;" id="mapaReferencia" onmouseover="javascript:movimentoRef(this)" onclick="javascript:clicouRef()">'; | 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 | ins += '<div style="text-align:left;font-size:0px" id="refmensagem" ></div></div>'; | 1707 | ins += '<div style="text-align:left;font-size:0px" id="refmensagem" ></div></div>'; |
1706 | novoel.innerHTML = ins; | 1708 | novoel.innerHTML = ins; |
1707 | document.body.appendChild(novoel); | 1709 | document.body.appendChild(novoel); |
classesjs/iniciamma.js
@@ -834,6 +834,7 @@ function Mapa(e,m) | @@ -834,6 +834,7 @@ function Mapa(e,m) | ||
834 | this.atualizaReferencia = function(mapexten) | 834 | this.atualizaReferencia = function(mapexten) |
835 | { | 835 | { |
836 | //objaguarde.abre("ajaxreferencia1",$trad("o3")); | 836 | //objaguarde.abre("ajaxreferencia1",$trad("o3")); |
837 | + if($i("boxRef")){$i("boxRef").style.display="none";} //div utilizado na ferramenta mostraexten | ||
837 | var dinamico = false; | 838 | var dinamico = false; |
838 | if ($i("refDinamico")) | 839 | if ($i("refDinamico")) |
839 | {var dinamico = $i("refDinamico").checked;} | 840 | {var dinamico = $i("refDinamico").checked;} |
ferramentas/mostraexten/index.htm
@@ -7,7 +7,6 @@ | @@ -7,7 +7,6 @@ | ||
7 | <style type="text/css" >.yuibutton button{padding-left:2em;background:url(../../imagens/tic.png) 5% 50% no-repeat;}</style> | 7 | <style type="text/css" >.yuibutton button{padding-left:2em;background:url(../../imagens/tic.png) 5% 50% no-repeat;}</style> |
8 | </head> | 8 | </head> |
9 | <body class="yui-skin-sam" > | 9 | <body class="yui-skin-sam" > |
10 | - <div id=geral style="left:0px;top:0px;"> | ||
11 | <div style='left:0px;display:block'> | 10 | <div style='left:0px;display:block'> |
12 | Extensão geográfica atual, em décimos de grau. As coordenadas correspondem a menor longitude, menor latitude, maior longitude e maior latitude: | 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 | <textarea id=extatual rows=3 cols=50 ></textarea> | 12 | <textarea id=extatual rows=3 cols=50 ></textarea> |
@@ -19,33 +18,33 @@ | @@ -19,33 +18,33 @@ | ||
19 | <tr> | 18 | <tr> |
20 | <td>Menor longitude (oeste):</td> | 19 | <td>Menor longitude (oeste):</td> |
21 | <td> | 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 | </td> | 24 | </td> |
26 | </tr> | 25 | </tr> |
27 | <tr> | 26 | <tr> |
28 | <td>Menor latitude (sul):</td> | 27 | <td>Menor latitude (sul):</td> |
29 | <td> | 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 | </td> | 32 | </td> |
34 | </tr> | 33 | </tr> |
35 | <tr> | 34 | <tr> |
36 | <td>Maior longitude (leste):</td> | 35 | <td>Maior longitude (leste):</td> |
37 | <td> | 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 | </td> | 40 | </td> |
42 | </tr> | 41 | </tr> |
43 | <tr> | 42 | <tr> |
44 | <td>Maior latitude (norte):</td> | 43 | <td>Maior latitude (norte):</td> |
45 | <td> | 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 | </td> | 48 | </td> |
50 | </tr> | 49 | </tr> |
51 | </table> | 50 | </table> |
@@ -55,7 +54,6 @@ | @@ -55,7 +54,6 @@ | ||
55 | <input id=botao1 type='button' size=14 value='Aplicar' /> | 54 | <input id=botao1 type='button' size=14 value='Aplicar' /> |
56 | </div> | 55 | </div> |
57 | </div> | 56 | </div> |
58 | - </div> | ||
59 | <script src="../i3geo_tudo_compacto.js.php" type="text/javascript"></script> | 57 | <script src="../i3geo_tudo_compacto.js.php" type="text/javascript"></script> |
60 | <script language="JavaScript" type="text/javascript" src="index.js"></script> | 58 | <script language="JavaScript" type="text/javascript" src="index.js"></script> |
61 | </body> | 59 | </body> |
ferramentas/mostraexten/index.js
@@ -19,7 +19,19 @@ GNU junto com este programa; se não, escreva para a | @@ -19,7 +19,19 @@ GNU junto com este programa; se não, escreva para a | ||
19 | Free Software Foundation, Inc., no endereço | 19 | Free Software Foundation, Inc., no endereço |
20 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | 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 | parametrosURL() | 35 | parametrosURL() |
24 | YAHOO.example.init = function () | 36 | YAHOO.example.init = function () |
25 | { | 37 | { |
@@ -46,6 +58,8 @@ function aplicar() | @@ -46,6 +58,8 @@ function aplicar() | ||
46 | var yy = window.parent.convdmsddf($i("yyg").value,$i("yym").value,$i("yys").value); | 58 | var yy = window.parent.convdmsddf($i("yyg").value,$i("yym").value,$i("yys").value); |
47 | if ((x == xx) || (y == yy)) | 59 | if ((x == xx) || (y == yy)) |
48 | {alert("Digite coordenadas válidas");return;} | 60 | {alert("Digite coordenadas válidas");return;} |
61 | + if ((x > xx) || (y > yy)) | ||
62 | + {alert("Digite coordenadas válidas");return;} | ||
49 | var cp = new cpaint(); | 63 | var cp = new cpaint(); |
50 | cp.set_response_type("JSON"); | 64 | cp.set_response_type("JSON"); |
51 | //cp.set_debug(2) | 65 | //cp.set_debug(2) |
@@ -54,3 +68,24 @@ function aplicar() | @@ -54,3 +68,24 @@ function aplicar() | ||
54 | } | 68 | } |
55 | catch(e){alert("Digite coordenadas válidas");} | 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 | \ No newline at end of file | 92 | \ No newline at end of file |