Commit 85302f1733492f39fab84606ab74c265bba9b69c
1 parent
b3d5b916
Exists in
master
and in
7 other branches
--no commit message
Showing
20 changed files
with
544 additions
and
399 deletions
Show diff stats
admin/js/arvore.js
... | ... | @@ -3,7 +3,7 @@ function initMenu() |
3 | 3 | { |
4 | 4 | var editorDeMenus = function() |
5 | 5 | { |
6 | - core_montaEditor("","600px","500px") | |
6 | + core_montaEditor("","600px","500px","pegaMenus") | |
7 | 7 | $i("editor_bd").innerHTML = '<input type=button id=adicionaNovoMenu value="Adicionar um novo menu" style="left:-5px;" /><br><br><div id="tabela" style="left:-5px;"> </div>' |
8 | 8 | initEditorMenu() |
9 | 9 | }; |
... | ... | @@ -530,8 +530,6 @@ function montaDivTema(i) |
530 | 530 | ins += "<select id='Epublicado' >" |
531 | 531 | ins += core_combosimnao(i.publicado) |
532 | 532 | ins += "</select>" |
533 | - ins += "<br><br>Para criar um novo tema clique <a href='temas.html' >aqui</a>." | |
534 | - ins += "<br><br>Para criar um novo perfil clique <a href='perfis.html' >aqui</a>." | |
535 | 533 | ins += "<input type=hidden value="+i.ordem+" id='Eordem' />" |
536 | 534 | return(ins) |
537 | 535 | } | ... | ... |
admin/js/core.js
... | ... | @@ -607,6 +607,7 @@ function core_pegaTags(funcao) |
607 | 607 | try |
608 | 608 | { |
609 | 609 | $tags = YAHOO.lang.JSON.parse(o.responseText); |
610 | + if($tags == ""){$tags = " ";} | |
610 | 611 | if(funcao != "") |
611 | 612 | eval(funcao); |
612 | 613 | } |
... | ... | @@ -1048,8 +1049,10 @@ O editor possui um div com id=editor_bd que deve ser usado para incluir o formul |
1048 | 1049 | Parameters: |
1049 | 1050 | |
1050 | 1051 | funcaoOK - string com o nome da função que será executada quando o botão OK for pressionado. |
1052 | + | |
1053 | +funcaoClose - nome da funcao que será executada quando a janela for fechada | |
1051 | 1054 | */ |
1052 | -function core_montaEditor(funcaoOK,w,h) | |
1055 | +function core_montaEditor(funcaoOK,w,h,funcaoClose) | |
1053 | 1056 | { |
1054 | 1057 | if(arguments.length == 0) |
1055 | 1058 | { |
... | ... | @@ -1108,6 +1111,9 @@ function core_montaEditor(funcaoOK,w,h) |
1108 | 1111 | { |
1109 | 1112 | YAHOO.example.container.panelEditor.destroy(); |
1110 | 1113 | YAHOO.example.container.panelEditor = null; |
1114 | + try{ | |
1115 | + eval(funcaoClose+"()");} | |
1116 | + catch(e){}; | |
1111 | 1117 | } |
1112 | 1118 | YAHOO.util.Event.addListener(YAHOO.example.container.panelEditor.close, "click", fecha); |
1113 | 1119 | YAHOO.example.container.panelEditor.show(); | ... | ... |
admin/js/editormapfile.js
... | ... | @@ -421,6 +421,10 @@ function adicionaNovoMapfile() |
421 | 421 | } |
422 | 422 | else |
423 | 423 | { |
424 | + YAHOO.example.container.panelEditor.destroy(); | |
425 | + YAHOO.example.container.panelEditor = null; | |
426 | + core_pegaMapfiles("montaArvore()") | |
427 | + /* | |
424 | 428 | $mapfiles = [codigo]; |
425 | 429 | var nos = montaNosRaiz("nao"); |
426 | 430 | tree.popNode(nos[0]) |
... | ... | @@ -430,6 +434,7 @@ function adicionaNovoMapfile() |
430 | 434 | core_carregando("desativa"); |
431 | 435 | YAHOO.example.container.panelEditor.destroy(); |
432 | 436 | YAHOO.example.container.panelEditor = null; |
437 | + */ | |
433 | 438 | } |
434 | 439 | } |
435 | 440 | catch(e){core_handleFailure(e,o.responseText);} | ... | ... |
admin/php/admin.php
... | ... | @@ -275,7 +275,7 @@ function verificaFilhos() |
275 | 275 | } |
276 | 276 | if($tabela == "mapfiles") |
277 | 277 | { |
278 | - $r = pegaDados("SELECT id_tema from i3geoadmin_temas where codigo_tema ='$id'"); | |
278 | + $r = pegaDados("SELECT id_tema from i3geoadmin_n3 where id_tema ='$id'"); | |
279 | 279 | if(count($r) > 0) |
280 | 280 | $res = true; |
281 | 281 | } | ... | ... |
admin/php/conexaomma.php
1 | 1 | <?php |
2 | 2 | try |
3 | 3 | { |
4 | - $dbh = new PDO('pgsql:dbname=geodados;user=geodados;password=geodados;host=pgsql1.mma.gov.br'); | |
5 | - $dbhw = new PDO('pgsql:dbname=geodados;user=pgsql;password=pgsql;host=pgsql1.mma.gov.br'); | |
4 | + $dbh = new PDO('pgsql:dbname=geodados;user=geodados;password=geodados;host=pgsql1.mapas.mma.gov.br'); | |
5 | + $dbhw = new PDO('pgsql:dbname=geodados;user=pgsql;password=pgsql;host=pgsql1.mapas.mma.gov.br'); | |
6 | 6 | } |
7 | 7 | catch (PDOException $e) |
8 | 8 | { | ... | ... |
admin/php/criabanco.php
... | ... | @@ -37,7 +37,7 @@ else |
37 | 37 | } |
38 | 38 | foreach($tabelas as $tabela) |
39 | 39 | { |
40 | - if($dbh->getAttribute(PDO::ATTR_DRIVER_NAME) == "pgsql") | |
40 | + if($dbhw->getAttribute(PDO::ATTR_DRIVER_NAME) == "pgsql") | |
41 | 41 | { |
42 | 42 | $tabela = str_replace("INTEGER PRIMARY KEY","SERIAL PRIMARY KEY NOT NULL",$tabela); |
43 | 43 | } | ... | ... |
admin/php/editormapfile.php
... | ... | @@ -48,8 +48,11 @@ switch ($funcao) |
48 | 48 | exit; |
49 | 49 | break; |
50 | 50 | case "excluirMapfile": |
51 | + //pega oid do tema | |
52 | + $dados = pegaDados("SELECT id_tema from i3geoadmin_temas WHERE codigo_tema = '".$codigoMap."'"); | |
53 | + $id = $dados[0]["id_tema"]; | |
51 | 54 | $tabela = "mapfiles"; |
52 | - $id = $codigoMap; | |
55 | + $coluna = "id_tema"; | |
53 | 56 | $f = verificaFilhos(); |
54 | 57 | if($f) |
55 | 58 | { |
... | ... | @@ -59,6 +62,8 @@ switch ($funcao) |
59 | 62 | else |
60 | 63 | { |
61 | 64 | unlink("../../temas/".$codigoMap.".map"); |
65 | + $tabela = "i3geoadmin_temas"; | |
66 | + exclui(); | |
62 | 67 | retornaJSON("ok"); |
63 | 68 | exit; |
64 | 69 | } |
... | ... | @@ -217,7 +222,7 @@ function criarNovoMap() |
217 | 222 | $dados[] = ' DATA ""'; |
218 | 223 | $dados[] = ' METADATA'; |
219 | 224 | $dados[] = ' TEMA "'.$nome.'"'; |
220 | - $dados[] = ' METADATA'; | |
225 | + $dados[] = ' END'; | |
221 | 226 | $dados[] = "END"; |
222 | 227 | $dados[] = "END"; |
223 | 228 | $fp = fopen($arq,"w"); |
... | ... | @@ -226,7 +231,7 @@ function criarNovoMap() |
226 | 231 | fwrite($fp,$dado."\n"); |
227 | 232 | } |
228 | 233 | require_once("conexao.php"); |
229 | - $dbh->query("INSERT INTO i3geoadmin_temas (link_tema,kml_tema,ogc_tema,download_tema,desc_tema,tipoa_tema,tags_tema,nome_tema,codigo_tema) VALUES ('','', '','','','','','$nome','$codigo')"); | |
234 | + $dbhw->query("INSERT INTO i3geoadmin_temas (link_tema,kml_tema,ogc_tema,download_tema,desc_tema,tipoa_tema,tags_tema,nome_tema,codigo_tema) VALUES ('','', '','','','','','$nome','$codigo')"); | |
230 | 235 | $dbh = null; |
231 | 236 | $dbhw = null; |
232 | 237 | return "ok"; | ... | ... |
admin/php/menutemas.php
... | ... | @@ -450,7 +450,7 @@ function alteraMenus() |
450 | 450 | else |
451 | 451 | { |
452 | 452 | $dbhw->query("INSERT INTO i3geoadmin_menus (publicado_menu, nome_menu, desc_menu, aberto, perfil_menu) VALUES ('','', '','SIM','')"); |
453 | - $id_menu = $dbhw->query("SELECT * FROM i3geoadmin_menus"); | |
453 | + $id_menu = $dbhw->query("SELECT id_menu FROM i3geoadmin_menus"); | |
454 | 454 | $id_menu = $id_menu->fetchAll(); |
455 | 455 | $id_menu = intval($id_menu[count($id_menu)-1]['id_menu']); |
456 | 456 | $retorna = $id_menu; |
... | ... | @@ -733,11 +733,11 @@ function alteraTemas() |
733 | 733 | } |
734 | 734 | else |
735 | 735 | { |
736 | - $dbhw->query("INSERT INTO i3geoadmin_temas");// (link_tema,kml_tema,ogc_tema,download_tema,nome_tema,desc_tema,codigo_tema,tipoa_tema,tags_tema) VALUES ('','', '','','','','','','')"); | |
736 | + $dbhw->query("INSERT INTO i3geoadmin_temas (nome_tema) VALUES ('')");// (link_tema,kml_tema,ogc_tema,download_tema,nome_tema,desc_tema,codigo_tema,tipoa_tema,tags_tema) VALUES ('','', '','','','','','','')"); | |
737 | 737 | $id = $dbh->query("SELECT * FROM i3geoadmin_temas"); |
738 | 738 | $id = $id->fetchAll(); |
739 | 739 | $id = intval($id[count($id)-1]['id_tema']); |
740 | - $retorna = $id; | |
740 | + $retorna = $id; | |
741 | 741 | } |
742 | 742 | //verifica se é necessário adicionar algum tag novo |
743 | 743 | $tags = explode(" ",$tags); | ... | ... |
admin/php/temas.php
... | ... | @@ -567,10 +567,9 @@ function criarNovoMap() |
567 | 567 | $layer->set("name",$codigo); |
568 | 568 | $mapa->save($mapfile); |
569 | 569 | require_once("conexao.php"); |
570 | - $dbh->query("INSERT INTO i3geoadmin_temas (link_tema,kml_tema,ogc_tema,download_tema,desc_tema,tipoa_tema,tags_tema,nome_tema,codigo_tema) VALUES ('','', '','','','','','$nome','$codigo')"); | |
570 | + $dbhw->query("INSERT INTO i3geoadmin_temas (link_tema,kml_tema,ogc_tema,download_tema,desc_tema,tipoa_tema,tags_tema,nome_tema,codigo_tema) VALUES ('','', '','','','','','$nome','$codigo')"); | |
571 | 571 | $dbh = null; |
572 | 572 | $dbhw = null; |
573 | - | |
574 | 573 | return "ok"; |
575 | 574 | } |
576 | 575 | return "erro"; | ... | ... |
classesjs/classe_janela.js
... | ... | @@ -263,4 +263,107 @@ i3GEO.janela = { |
263 | 263 | try{eval('YAHOO.aguarde.'+id+'.destroy()');} |
264 | 264 | catch(e){}; |
265 | 265 | } |
266 | -} | |
267 | 266 | \ No newline at end of file |
267 | +} | |
268 | +try | |
269 | +{ | |
270 | +//controle dos painéis que podem ser redimensionados | |
271 | +YAHOO.widget.ResizePanel = function(el, userConfig) | |
272 | +{ | |
273 | + if (arguments.length > 0) | |
274 | + {YAHOO.widget.ResizePanel.superclass.constructor.call(this, el, userConfig);} | |
275 | +}; | |
276 | +YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE = "yui-resizepanel"; | |
277 | +YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE = "resizehandle"; | |
278 | +YAHOO.extend | |
279 | +( | |
280 | + YAHOO.widget.ResizePanel, YAHOO.widget.Panel, | |
281 | + { | |
282 | + init: function(el, userConfig) | |
283 | + { | |
284 | + YAHOO.widget.ResizePanel.superclass.init.call(this, el); | |
285 | + this.beforeInitEvent.fire(YAHOO.widget.ResizePanel); | |
286 | + var Dom = YAHOO.util.Dom, | |
287 | + Event = YAHOO.util.Event, | |
288 | + oInnerElement = this.innerElement, | |
289 | + oResizeHandle = document.createElement("DIV"), | |
290 | + sResizeHandleId = this.id + "_resizehandle"; | |
291 | + oResizeHandle.id = sResizeHandleId; | |
292 | + oResizeHandle.className = YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE; | |
293 | + Dom.addClass(oInnerElement, YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE); | |
294 | + this.resizeHandle = oResizeHandle; | |
295 | + function initResizeFunctionality() | |
296 | + { | |
297 | + var me = this, | |
298 | + oHeader = this.header, | |
299 | + oBody = this.body, | |
300 | + oFooter = this.footer, | |
301 | + nStartWidth, | |
302 | + nStartHeight, | |
303 | + aStartPos, | |
304 | + nBodyBorderTopWidth, | |
305 | + nBodyBorderBottomWidth, | |
306 | + nBodyTopPadding, | |
307 | + nBodyBottomPadding, | |
308 | + nBodyOffset; | |
309 | + oInnerElement.appendChild(oResizeHandle); | |
310 | + this.ddResize = new YAHOO.util.DragDrop(sResizeHandleId, this.id); | |
311 | + this.ddResize.setHandleElId(sResizeHandleId); | |
312 | + this.ddResize.onMouseDown = function(e) | |
313 | + { | |
314 | + nStartWidth = oInnerElement.offsetWidth; | |
315 | + nStartHeight = oInnerElement.offsetHeight; | |
316 | + if (YAHOO.env.ua.ie && document.compatMode == "BackCompat") | |
317 | + {nBodyOffset = 0;} | |
318 | + else | |
319 | + { | |
320 | + nBodyBorderTopWidth = parseInt(Dom.getStyle(oBody, "borderTopWidth"), 10), | |
321 | + nBodyBorderBottomWidth = parseInt(Dom.getStyle(oBody, "borderBottomWidth"), 10), | |
322 | + nBodyTopPadding = parseInt(Dom.getStyle(oBody, "paddingTop"), 10), | |
323 | + nBodyBottomPadding = parseInt(Dom.getStyle(oBody, "paddingBottom"), 10), | |
324 | + nBodyOffset = nBodyBorderTopWidth + nBodyBorderBottomWidth + nBodyTopPadding + nBodyBottomPadding; | |
325 | + } | |
326 | + me.cfg.setProperty("width", nStartWidth + "px"); | |
327 | + aStartPos = [Event.getPageX(e), Event.getPageY(e)]; | |
328 | + }; | |
329 | + this.ddResize.onDrag = function(e) | |
330 | + { | |
331 | + var aNewPos = [Event.getPageX(e), Event.getPageY(e)], | |
332 | + nOffsetX = aNewPos[0] - aStartPos[0], | |
333 | + nOffsetY = aNewPos[1] - aStartPos[1], | |
334 | + nNewWidth = Math.max(nStartWidth + nOffsetX, 10), | |
335 | + nNewHeight = Math.max(nStartHeight + nOffsetY, 10), | |
336 | + nBodyHeight = (nNewHeight - (oFooter.offsetHeight + oHeader.offsetHeight + nBodyOffset)); | |
337 | + me.cfg.setProperty("width", nNewWidth + "px"); | |
338 | + if (nBodyHeight < 0) | |
339 | + {nBodyHeight = 0;} | |
340 | + oBody.style.height = nBodyHeight + "px"; | |
341 | + if ($i("wdocai")) | |
342 | + {$i("wdocai").style.height = nBodyHeight;} | |
343 | + }; | |
344 | + }; | |
345 | + function onBeforeShow() | |
346 | + { | |
347 | + initResizeFunctionality.call(this); | |
348 | + this.unsubscribe("beforeShow", onBeforeShow); | |
349 | + }; | |
350 | + function onBeforeRender() | |
351 | + { | |
352 | + if (!this.footer) | |
353 | + {this.setFooter("");} | |
354 | + if (this.cfg.getProperty("visible")) | |
355 | + {initResizeFunctionality.call(this);} | |
356 | + else | |
357 | + {this.subscribe("beforeShow", onBeforeShow);} | |
358 | + this.unsubscribe("beforeRender", onBeforeRender); | |
359 | + }; | |
360 | + this.subscribe("beforeRender", onBeforeRender); | |
361 | + if (userConfig) | |
362 | + {this.cfg.applyConfig(userConfig, true);} | |
363 | + this.initEvent.fire(YAHOO.widget.ResizePanel); | |
364 | + }, | |
365 | + toString: function() | |
366 | + {return "ResizePanel " + this.id;} | |
367 | + } | |
368 | +); | |
369 | +} | |
370 | +catch(e){}; | ... | ... |
... | ... | @@ -0,0 +1,258 @@ |
1 | +/* | |
2 | +Class: i3GEO.navega | |
3 | + | |
4 | +Realiza operações de navegação do mapa, como zoom, pan, etc.. | |
5 | + | |
6 | +File: i3geo/classesjs/classe_navega.js | |
7 | + | |
8 | +About: Licença | |
9 | + | |
10 | +I3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
11 | + | |
12 | +Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
13 | +Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br | |
14 | + | |
15 | +Este programa é software livre; você pode redistribuí-lo | |
16 | +e/ou modificá-lo sob os termos da Licença Pública Geral | |
17 | +GNU conforme publicada pela Free Software Foundation; | |
18 | +tanto a versão 2 da Licença. | |
19 | +Este programa é distribuído na expectativa de que seja útil, | |
20 | +porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
21 | +de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
22 | +Consulte a Licença Pública Geral do GNU para mais detalhes. | |
23 | +Você deve ter recebido uma cópia da Licença Pública Geral do | |
24 | +GNU junto com este programa; se não, escreva para a | |
25 | +Free Software Foundation, Inc., no endereço | |
26 | +59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
27 | +*/ | |
28 | +if(typeof(i3GEO) == 'undefined'){ | |
29 | + i3GEO = new Array(); | |
30 | +} | |
31 | +i3GEO.navega = { | |
32 | + /* | |
33 | + Property: FATORZOOM | |
34 | + | |
35 | + Valor utilizado nas operações de zoom in e out. Fator de zoom. | |
36 | + | |
37 | + O valor default é 2. | |
38 | + | |
39 | + Type: | |
40 | + {Integer} | |
41 | + */ | |
42 | + FATORZOOM: 2, | |
43 | + /* | |
44 | + Function: zoomin | |
45 | + | |
46 | + Aproxima o mapa | |
47 | + | |
48 | + Parameters: | |
49 | + | |
50 | + locaplic {String} - endereço do i3geo utilizado na geração da URL para fazer a chamada AJAX | |
51 | + | |
52 | + sid {String} - código da seção aberta no servidor pelo i3geo | |
53 | + */ | |
54 | + zoomin: function(locaplic,sid){ | |
55 | + i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
56 | + var p = locaplic+"/classesphp/mapa_controle.php?funcao=aproxima&nivel="+i3GEO.navega.FATORZOOM+"&g_sid="+sid; | |
57 | + //g_operacao = "navega"; | |
58 | + var cp = new cpaint(); | |
59 | + cp.set_async("true"); | |
60 | + cp.set_response_type("JSON"); | |
61 | + cp.call(p,"aproxima",ajaxredesenha); | |
62 | + }, | |
63 | + /* | |
64 | + Function: zoomout | |
65 | + | |
66 | + Afasta o mapa | |
67 | + | |
68 | + Parameters: | |
69 | + | |
70 | + locaplic {String} - endereço do i3geo utilizado na geração da URL para fazer a chamada AJAX | |
71 | + | |
72 | + sid {String} - código da seção aberta no servidor pelo i3geo | |
73 | + */ | |
74 | + zoomout: function(locaplic,sid){ | |
75 | + i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
76 | + var p = locaplic+"/classesphp/mapa_controle.php?funcao=afasta&nivel="+i3GEO.navega.FATORZOOM+"&g_sid="+sid; | |
77 | + //g_operacao = "navega"; | |
78 | + var cp = new cpaint(); | |
79 | + cp.set_async("true"); | |
80 | + cp.set_response_type("JSON"); | |
81 | + cp.call(p,"afasta",ajaxredesenha); | |
82 | + }, | |
83 | + /* | |
84 | + Function: zoomponto | |
85 | + | |
86 | + Centraliza o mapa em um ponto e acrescenta o ponto como uma nova camada no mapa | |
87 | + | |
88 | + Parameters: | |
89 | + | |
90 | + locaplic {String} - endereço do i3geo utilizado na geração da URL para fazer a chamada AJAX | |
91 | + | |
92 | + sid {String} - código da seção aberta no servidor pelo i3geo | |
93 | + | |
94 | + x {Numeric} - coordenada em décimos de grau da longitude | |
95 | + | |
96 | + y {Numeric} - coordenada em décimos de grau da latitude | |
97 | + */ | |
98 | + zoomponto: function(locaplic,sid,x,y){ | |
99 | + i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
100 | + var p = locaplic+"/classesphp/mapa_controle.php?funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+sid; | |
101 | + var cp = new cpaint(); | |
102 | + cp.set_async("true"); | |
103 | + cp.set_response_type("JSON"); | |
104 | + cp.call(p,"zoomPonto",ajaxredesenha); | |
105 | + }, | |
106 | + /* | |
107 | + Function: localizaIP | |
108 | + | |
109 | + Localiza as coordenadas baseadas no número IP do usuário. | |
110 | + | |
111 | + Parameters: | |
112 | + | |
113 | + locaplic {String} - endereço do i3geo utilizado na geração da URL para fazer a chamada AJAX | |
114 | + | |
115 | + sid {String} - código da seção aberta no servidor pelo i3geo | |
116 | + | |
117 | + funcao {Function} - função que será executada ao concluir a chamada AJAX. Essa função receberá o objeto JSON obtido. | |
118 | + */ | |
119 | + localizaIP: function(locaplic,sid,funcao){ | |
120 | + var p = locaplic+"/classesphp/mapa_controle.php?funcao=localizaIP&g_sid="+sid; | |
121 | + var cp = new cpaint(); | |
122 | + cp.set_async("true"); | |
123 | + cp.set_response_type("JSON"); | |
124 | + cp.call(p,"IP",funcao); | |
125 | + }, | |
126 | + /* | |
127 | + Function: zoomIP | |
128 | + | |
129 | + Mostra no mapa um ponto baseado na localização do usuário. | |
130 | + | |
131 | + Parameters: | |
132 | + | |
133 | + locaplic {String} - endereço do i3geo utilizado na geração da URL para fazer a chamada AJAX | |
134 | + | |
135 | + sid {String} - código da seção aberta no servidor pelo i3geo | |
136 | + */ | |
137 | + zoomIP: function(locaplic,sid){ | |
138 | + try | |
139 | + { | |
140 | + var mostraIP = function(retorno) | |
141 | + { | |
142 | + if (retorno.data.latitude != null) | |
143 | + { | |
144 | + i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude); | |
145 | + } | |
146 | + else | |
147 | + {alert("Nao foi possivel identificar a localizacao.");} | |
148 | + }; | |
149 | + i3GEO.navega.localizaIP(locaplic,sid,mostraIP); | |
150 | + } | |
151 | + catch(e){var e = "";} | |
152 | + }, | |
153 | + /* | |
154 | + Function: zoomExt | |
155 | + | |
156 | + Aplica uma nova extensão geográfica ao mapa. | |
157 | + | |
158 | + Parameters: | |
159 | + | |
160 | + locaplic {String} - endereço do i3geo utilizado na geração da URL para fazer a chamada AJAX | |
161 | + | |
162 | + sid {String} - código da seção aberta no servidor pelo i3geo | |
163 | + | |
164 | + tipoimagem {String} - Utlize "" para aplicar o default. Tipo de imagem que será retornada na imagem do mapa que será criada | |
165 | + | |
166 | + ext {String} - Extensão geográfica no formato xmin ymin xmax ymax | |
167 | + */ | |
168 | + zoomExt: function(locaplic,sid,tipoimagem,ext){ | |
169 | + if(tipoimagem == "") | |
170 | + {var tipoimagem = "nenhum";} | |
171 | + i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
172 | + var p = locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid; | |
173 | + var cp = new cpaint(); | |
174 | + cp.set_async("true"); | |
175 | + cp.set_response_type("JSON"); | |
176 | + cp.call(p,"mudaExtensao",ajaxredesenha); | |
177 | + }, | |
178 | + /* | |
179 | + Function: aplicaEscala | |
180 | + | |
181 | + Aplica ao mapa um novo valor de escala tendo como base o valor do denminador | |
182 | + | |
183 | + Parameters: | |
184 | + | |
185 | + locaplic {String} - endereço do i3geo utilizado na geração da URL para fazer a chamada AJAX | |
186 | + | |
187 | + sid {String} - código da seção aberta no servidor pelo i3geo | |
188 | + | |
189 | + escala {Numeric} - denominador da escala | |
190 | + */ | |
191 | + aplicaEscala: function(locaplic,sid,escala){ | |
192 | + i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
193 | + var p = locaplic+"/classesphp/mapa_controle.php?funcao=mudaescala&escala="+escala+"&g_sid="+sid; | |
194 | + var cp = new cpaint(); | |
195 | + cp.set_async("true"); | |
196 | + cp.set_response_type("JSON"); | |
197 | + cp.call(p,"mudaEscala",ajaxredesenha); | |
198 | + }, | |
199 | + /* | |
200 | + Function: panFixo | |
201 | + | |
202 | + Desloca o mapa para uma determinada direção com uma distância fixa. | |
203 | + | |
204 | + Parameters: | |
205 | + | |
206 | + locaplic {String} - endereço do i3geo utilizado na geração da URL para fazer a chamada AJAX | |
207 | + | |
208 | + sid {String} - código da seção aberta no servidor pelo i3geo | |
209 | + | |
210 | + direcao {String} - norte,sul,leste,oeste,sudeste,sudoeste,nordeste,noroeste | |
211 | + | |
212 | + w {Numeric} - largura da imagem do mapa em pixels | |
213 | + | |
214 | + h {Numeric} - altura da imagem do mapa em pixels | |
215 | + | |
216 | + escala {Numeric} - escala do mapa | |
217 | + */ | |
218 | + panFixo: function(locaplic,sid,direcao,w,h,escala){ | |
219 | + if (direcao == "norte"){ | |
220 | + var y = h / 6; | |
221 | + var x = w / 2; | |
222 | + } | |
223 | + if (direcao == "sul"){ | |
224 | + var y = h - (h / 6); | |
225 | + var x = w / 2; | |
226 | + } | |
227 | + if (direcao == "leste"){ | |
228 | + var x = w - (w / 6); | |
229 | + var y = h / 2; | |
230 | + } | |
231 | + if (direcao == "oeste"){ | |
232 | + var x = w / 6; | |
233 | + var y = h / 2; | |
234 | + } | |
235 | + if (direcao == "nordeste"){ | |
236 | + var y = h / 6; | |
237 | + var x = w - (w / 6); | |
238 | + } | |
239 | + if (direcao == "sudeste"){ | |
240 | + var y = h - (h / 6); | |
241 | + var x = w - (w / 6); | |
242 | + } | |
243 | + if (direcao == "noroeste"){ | |
244 | + var y = h / 6; | |
245 | + var x = w / 6; | |
246 | + } | |
247 | + if (direcao == "sudoeste"){ | |
248 | + var y = h - (h / 6); | |
249 | + var x = w / 6; | |
250 | + } | |
251 | + i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
252 | + var p = locaplic+"/classesphp/mapa_controle.php?funcao=pan&escala="+escala+"&x="+x+"&y="+y+"&g_sid="+sid; | |
253 | + var cp = new cpaint(); | |
254 | + cp.set_async("true"); | |
255 | + cp.set_response_type("JSON"); | |
256 | + cp.call(p,"pan",ajaxredesenha); | |
257 | + } | |
258 | +}; | ... | ... |
classesjs/classe_util.js
... | ... | @@ -229,5 +229,41 @@ i3GEO.util = { |
229 | 229 | var re = /ú/gi; |
230 | 230 | palavra = palavra.replace(re,"u"); |
231 | 231 | return(palavra); |
232 | + }, | |
233 | + /* | |
234 | + Function: dms2dd | |
235 | + | |
236 | + Converte coordenadas formatadas em DMS para DD | |
237 | + | |
238 | + Parameters: | |
239 | + | |
240 | + cd {Numeric} - grau | |
241 | + | |
242 | + cm {Numeric} - minuto | |
243 | + | |
244 | + cs {Numeric} - segundo | |
245 | + | |
246 | + Return: | |
247 | + | |
248 | + {Numeric} - Coordenada em décimos de grau. | |
249 | + */ | |
250 | + dms2dd: function(cd,cm,cs){ | |
251 | + try | |
252 | + { | |
253 | + //converte dms em dd | |
254 | + var sinal = 'positivo'; | |
255 | + if (cd < 0) | |
256 | + { | |
257 | + cd = cd * -1; | |
258 | + sinal = 'negativo'; | |
259 | + } | |
260 | + spm = cs / 3600; | |
261 | + mpg = cm / 60; | |
262 | + var dd = (cd * 1) + (mpg * 1) + (spm * 1); | |
263 | + if (sinal == 'negativo') | |
264 | + {dd = dd * -1;} | |
265 | + return (dd); | |
266 | + } | |
267 | + catch(e){return (0);} | |
232 | 268 | } |
233 | 269 | }; |
234 | 270 | \ No newline at end of file | ... | ... |
classesjs/compactajs.php
... | ... | @@ -62,6 +62,7 @@ packer("classe_idioma.js","compactados/classe_idioma_compacto.js","Normal"); |
62 | 62 | packer("classe_ajuda.js","compactados/classe_ajuda_compacto.js","Normal"); |
63 | 63 | packer("configura.js","compactados/configura_compacto.js","Normal"); |
64 | 64 | packer("classe_configura.js","compactados/classe_configura_compacto.js","Normal"); |
65 | +packer("classe_navega.js","compactados/classe_navega_compacto.js","Normal"); | |
65 | 66 | packer("redesenho.js","compactados/redesenho_compacto.js","Normal"); |
66 | 67 | packer("iniciamma.js","compactados/iniciamma_compacto.js","Normal"); |
67 | 68 | packer("ferramentas.js","compactados/ferramentas_compacto.js","Normal"); |
... | ... | @@ -108,6 +109,7 @@ $jsfiles = array( |
108 | 109 | "compactados/classe_arvoredecamadas_compacto.js", |
109 | 110 | "compactados/classe_arvoredetemas_compacto.js", |
110 | 111 | "compactados/configura_compacto.js", |
112 | +"compactados/classe_navega_compacto.js", | |
111 | 113 | "compactados/ferramentas_compacto.js", |
112 | 114 | "compactados/redesenho_compacto.js", |
113 | 115 | "compactados/iniciamma_compacto.js", | ... | ... |
classesjs/configura.js
... | ... | @@ -458,7 +458,8 @@ g_funcoesMousemoveMapaDefault = new Array( |
458 | 458 | "movelentef()", |
459 | 459 | "moveLonglat()", |
460 | 460 | "moveSelecaoPoli()", |
461 | - "moveArea()" | |
461 | + "moveArea()", | |
462 | + "atualizaLocalizarxy()" | |
462 | 463 | ); |
463 | 464 | /* |
464 | 465 | Variable: g_funcoesNevegaMapaDefault |
... | ... | @@ -473,7 +474,8 @@ g_funcoesNevegaMapaDefault = new Array( |
473 | 474 | "atualizagoogle()", |
474 | 475 | "atualizascielo()", |
475 | 476 | "atualizawiki()", |
476 | - "atualizaconfluence()" | |
477 | + "atualizaconfluence()", | |
478 | + "atualizaEscalaNumerica()" | |
477 | 479 | ); |
478 | 480 | /* |
479 | 481 | Variable: g_listaPropriedades (depreciado) |
... | ... | @@ -582,7 +584,7 @@ g_listaFuncoesBotoes = { |
582 | 584 | //Ativa o botão que realiza a operação de zoom para a extensão total do mapa. |
583 | 585 | iddiv:"zoomtot", |
584 | 586 | dica:$trad("d2"), |
585 | - funcaoonclick:function(){zoomtot();} | |
587 | + funcaoonclick:function(){i3GEO.navega.zoomExt(g_locaplic,g_sid,g_tipoimagem,objmapa.extentTotal);} | |
586 | 588 | }, |
587 | 589 | { |
588 | 590 | //Ativa o botão que realiza a operação de zoom interativo. |
... | ... | @@ -602,15 +604,13 @@ g_listaFuncoesBotoes = { |
602 | 604 | //botão que realiza a operação de zoom in. |
603 | 605 | iddiv:"zoomiauto", |
604 | 606 | dica:$trad("d5"), |
605 | - funcaoonclick:function() | |
606 | - {zoomiauto();} | |
607 | + funcaoonclick:function(){i3GEO.navega.zoomin(g_locaplic,g_sid);} | |
607 | 608 | }, |
608 | 609 | { |
609 | 610 | //botão que realiza a operação de zoom out |
610 | 611 | iddiv:"zoomoauto", |
611 | 612 | dica:$trad("d6"), |
612 | - funcaoonclick:function() | |
613 | - {zoomoauto();} | |
613 | + funcaoonclick:function(){i3GEO.navega.zoomout(g_locaplic,g_sid);} | |
614 | 614 | }, |
615 | 615 | { |
616 | 616 | //botão que abre a função de identificação. |
... | ... | @@ -665,7 +665,7 @@ g_listaFuncoesBotoes = { |
665 | 665 | iddiv:"ondeestou", |
666 | 666 | dica:$trad("d13"), |
667 | 667 | funcaoonclick:function() |
668 | - {zoomIP();} | |
668 | + {i3GEO.navega.zoomIP(g_locaplic,g_sid);} | |
669 | 669 | }, |
670 | 670 | { |
671 | 671 | //abre a opção de geração de um modelo virtual de elevação | ... | ... |
classesjs/depreciados.js
... | ... | @@ -201,4 +201,42 @@ function aguarde() |
201 | 201 | { |
202 | 202 | i3GEO.janela.fechaAguarde(aguardeId); |
203 | 203 | }; |
204 | -} | |
205 | 204 | \ No newline at end of file |
205 | +} | |
206 | +/* | |
207 | +Function: zoomiauto (depreciado) | |
208 | +*/ | |
209 | +function zoomiauto() | |
210 | +{i3GEO.navega.zoomin(g_locaplic,g_sid);} | |
211 | +/* | |
212 | +Function: zoomoauto (depreciado) | |
213 | +*/ | |
214 | +function zoomoauto() | |
215 | +{i3GEO.navega.zoomout(g_locaplic,g_sid);} | |
216 | +/* | |
217 | +Function: convdmsddf (depreciado) | |
218 | +*/ | |
219 | +function convdmsddf(cd,cm,cs) | |
220 | +{return (i3GEO.util.dsm2dd(cd,cm,cs));} | |
221 | +/* | |
222 | +Function: zoomPonto (depreciado) | |
223 | +*/ | |
224 | +function zoomPonto() | |
225 | +{alert("utilize i3GEO.navega.zoomponto");} | |
226 | +/* | |
227 | +Function: zoomIP (depreciado) | |
228 | +*/ | |
229 | +function zoomIP() | |
230 | +{alert("zoomIP foi depreciado. Utilize i3GEO.navega.zoomIP");} | |
231 | +/* | |
232 | +Function: zoomtot | |
233 | +*/ | |
234 | +function zoomtot() | |
235 | +{alert("zoomtot foi depreciado. Utilize i3GEO.navega.zoomExt");} | |
236 | +/* | |
237 | +Function: atualizaFarol (depreciado) | |
238 | +*/ | |
239 | +/* | |
240 | +Function: panFixo (depreciado) | |
241 | +*/ | |
242 | +function panFixo(direcao,w,h,escala) | |
243 | +{alert("panFixo foi depreciado. Utilize i3GEO.navega.panFixo");} | |
206 | 244 | \ No newline at end of file | ... | ... |
classesjs/ferramentas.js
... | ... | @@ -1417,17 +1417,32 @@ function ativaLocalizarxy(iddiv) |
1417 | 1417 | { |
1418 | 1418 | if($i(iddiv)) |
1419 | 1419 | { |
1420 | - var ins = "<table style='text-align:center'><tr>"; | |
1421 | - ins += "<td>localiza X: </td>"; | |
1422 | - ins += "<td>"+$inputText(iddiv,"315","xg","grau","3","-00")+" </td>"; | |
1423 | - ins += "<td>"+$inputText("","","xm","minuto","3","00")+" </td>"; | |
1424 | - ins += "<td>"+$inputText("","","xs","segundo","5","00.00")+" </td>"; | |
1425 | - ins += "<td>Y:"+$inputText("","","yg","grau","3","-00")+" </td>"; | |
1426 | - ins += "<td>"+$inputText("","","ym","minuto","3","00")+" </td>"; | |
1427 | - ins += "<td>"+$inputText("","","ys","segundo","5","00.00")+"</td>"; | |
1428 | - ins += "<td><img class='tic' title='zoom' onclick='zoomPonto()' src='"+$im("branco.gif")+"' id=procurarxy /></td>"; | |
1429 | - ins += "</tr></table>"; | |
1430 | - $i(iddiv).innerHTML = ins; | |
1420 | + if(!$i("xm")){ | |
1421 | + var ins = "<table style='text-align:center'><tr>"; | |
1422 | + ins += "<td>localiza X: </td>"; | |
1423 | + ins += "<td>"+$inputText(iddiv,"315","xg","grau","3","-00")+" </td>"; | |
1424 | + ins += "<td>"+$inputText("","","xm","minuto","3","00")+" </td>"; | |
1425 | + ins += "<td>"+$inputText("","","xs","segundo","5","00.00")+" </td>"; | |
1426 | + ins += "<td>Y:"+$inputText("","","yg","grau","3","-00")+" </td>"; | |
1427 | + ins += "<td>"+$inputText("","","ym","minuto","3","00")+" </td>"; | |
1428 | + ins += "<td>"+$inputText("","","ys","segundo","5","00.00")+"</td>"; | |
1429 | + var temp = 'var xxx = i3GEO.util.dms2dd($i("xg").value,$i("xm").value,$i("xs").value);'; | |
1430 | + temp += 'var yyy = i3GEO.util.dms2dd($i("yg").value,$i("ym").value,$i("ys").value);'; | |
1431 | + temp += 'i3GEO.navega.zoomponto(g_locaplic,g_sid,xxx,yyy);'; | |
1432 | + ins += "<td><img class='tic' title='zoom' onclick='"+temp+"' src='"+$im("branco.gif")+"' id=procurarxy /></td>"; | |
1433 | + ins += "</tr></table>"; | |
1434 | + $i(iddiv).innerHTML = ins; | |
1435 | + } | |
1436 | + atualizaLocalizarxy = function(){ | |
1437 | + var x = objposicaocursor.dmsx.split(" "); | |
1438 | + var y = objposicaocursor.dmsy.split(" "); | |
1439 | + $i("xg").value = x[0]; | |
1440 | + $i("xm").value = x[1]; | |
1441 | + $i("xs").value = x[2]; | |
1442 | + $i("yg").value = y[0]; | |
1443 | + $i("ym").value = y[1]; | |
1444 | + $i("ys").value = y[2]; | |
1445 | + }; | |
1431 | 1446 | } |
1432 | 1447 | } |
1433 | 1448 | /* |
... | ... | @@ -1441,10 +1456,21 @@ function ativaEscalaNumerica(iddiv) |
1441 | 1456 | { |
1442 | 1457 | if($i(iddiv)) |
1443 | 1458 | { |
1444 | - var i = $inputText(iddiv,"138","escalanum","digite o denominador da escala","19",""); | |
1445 | - var ins = "<table><tr><td>1:"+i; | |
1446 | - ins += "</td><td><img src='"+$im("branco.gif")+"' class='tic' onclick='aplicaescala()' /></td></tr></table>"; | |
1447 | - $i(iddiv).innerHTML = ins; | |
1459 | + if(!$i("i3geo_escalanum")) | |
1460 | + { | |
1461 | + var i = $inputText(iddiv,"138","i3geo_escalanum","digite o denominador da escala","19",""); | |
1462 | + var ins = "<table><tr><td>1:"+i; | |
1463 | + var temp = 'var nova = document.getElementById("i3geo_escalanum").value;'; | |
1464 | + temp += 'i3GEO.navega.aplicaEscala(g_locaplic,g_sid,nova);'; | |
1465 | + ins += "</td><td><img src='"+$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>"; | |
1466 | + $i(iddiv).innerHTML = ins; | |
1467 | + } | |
1468 | + atualizaEscalaNumerica = function(escala){ | |
1469 | + if(arguments.length == 1) | |
1470 | + $i("i3geo_escalanum").value = escala; | |
1471 | + else | |
1472 | + $i("i3geo_escalanum").value = parseInt(objmapa.scale); | |
1473 | + }; | |
1448 | 1474 | } |
1449 | 1475 | } |
1450 | 1476 | /* | ... | ... |
classesjs/funcoes.js
... | ... | @@ -1031,9 +1031,7 @@ function ativaClicks(docMapa) |
1031 | 1031 | return; |
1032 | 1032 | } |
1033 | 1033 | var nex = novoxi+" "+novoyi+" "+novoxf+" "+novoyf; |
1034 | - i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
1035 | - var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+g_tipoimagem+"&ext="+nex+"&g_sid="+g_sid; | |
1036 | - cpObj.call(p,"mudaExtensao",ajaxredesenha); | |
1034 | + i3GEO.navega.zoomExt(g_locaplic,g_sid,g_tipoimagem,nex); | |
1037 | 1035 | } |
1038 | 1036 | } |
1039 | 1037 | catch(e){var e = "";} |
... | ... | @@ -1065,12 +1063,10 @@ function zoomAnterior() |
1065 | 1063 | var muda = i - 1;break; |
1066 | 1064 | } |
1067 | 1065 | } |
1068 | - function retorna(retorno) | |
1066 | + if(quadrosfilme[muda].extensao != " ") | |
1069 | 1067 | { |
1070 | - ajaxredesenha(retorno); | |
1071 | - // | |
1072 | - //zera os novos quadros adicionados | |
1073 | - // | |
1068 | + g_zoomProximo.push(objmapa.extent); | |
1069 | + i3GEO.navega.zoomExt(g_locaplic,g_sid,g_tipoimagem,quadrosfilme[muda].extensao); | |
1074 | 1070 | for (var i = n-1; i > muda; i--) |
1075 | 1071 | { |
1076 | 1072 | $i("f"+(i)).className = "quadro"; |
... | ... | @@ -1078,13 +1074,6 @@ function zoomAnterior() |
1078 | 1074 | quadrosfilme[i] = qu; |
1079 | 1075 | } |
1080 | 1076 | } |
1081 | - if(quadrosfilme[muda].extensao != " ") | |
1082 | - { | |
1083 | - g_zoomProximo.push(objmapa.extent); | |
1084 | - var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+g_tipoimagem+"&ext="+quadrosfilme[muda].extensao+"&g_sid="+g_sid; | |
1085 | - i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
1086 | - cpObj.call(p,"mudaExtensao",retorna); | |
1087 | - } | |
1088 | 1077 | } |
1089 | 1078 | catch(e){var e = "";} |
1090 | 1079 | } |
... | ... | @@ -1102,9 +1091,7 @@ function zoomProximo() |
1102 | 1091 | var n = g_zoomProximo.length; |
1103 | 1092 | if (n > 0 && g_zoomProximo[n-1] != objmapa.extent) |
1104 | 1093 | { |
1105 | - var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+g_tipoimagem+"&ext="+g_zoomProximo[n-1]+"&g_sid="+g_sid; | |
1106 | - i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
1107 | - cpObj.call(p,"mudaExtensao",ajaxredesenha); | |
1094 | + i3GEO.navega.zoomExt(g_locaplic,g_sid,g_tipoimagem,g_zoomProximo[n-1]); | |
1108 | 1095 | g_zoomProximo.pop(); |
1109 | 1096 | } |
1110 | 1097 | } |
... | ... | @@ -1168,18 +1155,18 @@ function mostraRosaDosVentos() |
1168 | 1155 | } |
1169 | 1156 | var setas = "<table id='rosaV' >"; |
1170 | 1157 | setas += "<tr onclick=\"javascript:g_mostraRosa='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>"; |
1171 | - setas += "<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"panFixo('noroeste')\" /></td>"; | |
1172 | - setas += "<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"panFixo('norte')\" /></td>"; | |
1173 | - setas += "<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"panFixo('nordeste')\" /></td></tr>"; | |
1174 | - setas += "<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"panFixo('oeste')\" /></td>"; | |
1158 | + setas += "<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+g_locaplic+"','"+g_sid+"','noroeste','"+objmapa.w+"','"+objmapa.h+"','"+objmapa.scale+"')\" /></td>"; | |
1159 | + setas += "<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+g_locaplic+"','"+g_sid+"','norte','"+objmapa.w+"','"+objmapa.h+"','"+objmapa.scale+"')\" /></td>"; | |
1160 | + setas += "<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+g_locaplic+"','"+g_sid+"','nordeste','"+objmapa.w+"','"+objmapa.h+"','"+objmapa.scale+"')\" /></td></tr>"; | |
1161 | + setas += "<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+g_locaplic+"','"+g_sid+"','oeste','"+objmapa.w+"','"+objmapa.h+"','"+objmapa.scale+"')\" /></td>"; | |
1175 | 1162 | setas += "<td><table><tr>"; |
1176 | - setas += "<td><img class='rosamais' title='aproxima' onclick='zoomiauto()' src='"+$im("branco.gif")+"' </td>"; | |
1177 | - setas += "<td><img class='rosamenos' title='afasta' onclick='zoomoauto()' src='"+$im("branco.gif")+"' </td>"; | |
1163 | + setas += "<td><img class='rosamais' title='aproxima' onclick='i3GEO.navega.zoomin()' src='"+$im("branco.gif")+"' </td>"; | |
1164 | + setas += "<td><img class='rosamenos' title='afasta' onclick='i3GEO.navega.zoomout()' src='"+$im("branco.gif")+"' </td>"; | |
1178 | 1165 | setas += "</tr></table></td>"; |
1179 | - setas += "<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"panFixo('leste')\" /></td></tr>"; | |
1180 | - setas += "<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"panFixo('sudoeste')\" /></td>"; | |
1181 | - setas += "<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"panFixo('sul')\" /></td>"; | |
1182 | - setas += "<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"panFixo('sudeste')\" /></td></tr></table>"; | |
1166 | + setas += "<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+g_locaplic+"','"+g_sid+"','leste','"+objmapa.w+"','"+objmapa.h+"','"+objmapa.scale+"')\" /></td></tr>"; | |
1167 | + setas += "<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+g_locaplic+"','"+g_sid+"','sudoeste','"+objmapa.w+"','"+objmapa.h+"','"+objmapa.scale+"')\" /></td>"; | |
1168 | + setas += "<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+g_locaplic+"','"+g_sid+"','sul','"+objmapa.w+"','"+objmapa.h+"','"+objmapa.scale+"')\" /></td>"; | |
1169 | + setas += "<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+g_locaplic+"','"+g_sid+"','sudeste','"+objmapa.w+"','"+objmapa.h+"','"+objmapa.scale+"')\" /></td></tr></table>"; | |
1183 | 1170 | var i = $i("tip"); |
1184 | 1171 | i.innerHTML = setas; |
1185 | 1172 | i.style.top = objposicaocursor.telay - 27; |
... | ... | @@ -1295,8 +1282,8 @@ function initJanelaZoom(qual) |
1295 | 1282 | $i("img").style.height = nh; |
1296 | 1283 | $top("img",nt); |
1297 | 1284 | $left("img",nl); |
1298 | - if ($i("escalanum")) | |
1299 | - {$i("escalanum").value=ns;} | |
1285 | + if ($i("i3geo_escalanum")) | |
1286 | + {$i("i3geo_escalanum").value=ns;} | |
1300 | 1287 | }; |
1301 | 1288 | } |
1302 | 1289 | return; |
... | ... | @@ -1412,32 +1399,7 @@ function movelentef() |
1412 | 1399 | } |
1413 | 1400 | catch(e){var e = "";} |
1414 | 1401 | } |
1415 | -/* | |
1416 | -Function: zoomiauto | |
1417 | - | |
1418 | -Aproxima o mapa tendo o centro do mapa atual como referência. | |
1419 | -*/ | |
1420 | -function zoomiauto() | |
1421 | -{ | |
1422 | - i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
1423 | - g_fatordezoom = 0; | |
1424 | - var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=aproxima&nivel=2&g_sid="+g_sid; | |
1425 | - g_operacao = "navega"; | |
1426 | - cpObj.call(p,"aproxima",ajaxredesenha); | |
1427 | -} | |
1428 | -/* | |
1429 | -Function: zoomoauto | |
1430 | 1402 | |
1431 | -Afasta o mapa tendo o centro do mapa atual como referência. | |
1432 | -*/ | |
1433 | -function zoomoauto() | |
1434 | -{ | |
1435 | - i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
1436 | - g_fatordezoom = 0; | |
1437 | - var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=afasta&nivel=2&g_sid="+g_sid; | |
1438 | - g_operacao = "navega"; | |
1439 | - cpObj.call(p,"afasta",ajaxredesenha); | |
1440 | -} | |
1441 | 1403 | /* |
1442 | 1404 | Function: zoomboxf |
1443 | 1405 | |
... | ... | @@ -1524,9 +1486,7 @@ function zoomboxf(tipo) |
1524 | 1486 | if (x1 != x2) |
1525 | 1487 | { |
1526 | 1488 | objmapa.extent=v; |
1527 | - i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
1528 | - var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+g_tipoimagem+"&ext="+v+"&g_sid="+g_sid; | |
1529 | - cpObj.call(p,"mudaExtensao",ajaxredesenha); | |
1489 | + i3GEO.navega.zoomExt(g_locaplic,g_sid,g_tipoimagem,v); | |
1530 | 1490 | } |
1531 | 1491 | } |
1532 | 1492 | else |
... | ... | @@ -1559,57 +1519,6 @@ function zoomboxf(tipo) |
1559 | 1519 | } |
1560 | 1520 | } |
1561 | 1521 | /* |
1562 | -Function: zoomIP | |
1563 | - | |
1564 | -Localiza no mapa o usuário baseado em seu número IP. | |
1565 | - | |
1566 | -O ponto de localização é adicionado ao mapa como um novo tema. | |
1567 | -*/ | |
1568 | -function zoomIP() | |
1569 | -{ | |
1570 | - try | |
1571 | - { | |
1572 | - var xxx = convdmsddf($i("xg").value,$i("xm").value,$i("xs").value); | |
1573 | - var yyy = convdmsddf($i("yg").value,$i("ym").value,$i("ys").value); | |
1574 | - var mostraIP = function(retorno) | |
1575 | - { | |
1576 | - if (retorno.data.latitude != null) | |
1577 | - { | |
1578 | - i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
1579 | - var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=zoomponto&pin=pin&tamanho=14&xy="+retorno.data.longitude+" "+retorno.data.latitude+"&g_sid="+g_sid; | |
1580 | - cpObj.call(p,"zoomPonto",ajaxredesenha); | |
1581 | - } | |
1582 | - else | |
1583 | - {alert("Nao foi possivel identificar a localizacao.");} | |
1584 | - }; | |
1585 | - var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=localizaIP&g_sid="+g_sid; | |
1586 | - cpObj.call(p,"localizaIP",mostraIP); | |
1587 | - } | |
1588 | - catch(e){var e = "";} | |
1589 | -} | |
1590 | -/* | |
1591 | -Function: zoomPonto | |
1592 | - | |
1593 | -Localiza uma coordenada no mapa e desloca o mapa centralizando no ponto. | |
1594 | - | |
1595 | -O ponto de localização é adicionado ao mapa como um novo tema. | |
1596 | -*/ | |
1597 | -function zoomPonto() | |
1598 | -{ | |
1599 | - try | |
1600 | - { | |
1601 | - if ($i("xg")) | |
1602 | - { | |
1603 | - var xxx = convdmsddf($i("xg").value,$i("xm").value,$i("xs").value); | |
1604 | - var yyy = convdmsddf($i("yg").value,$i("ym").value,$i("ys").value); | |
1605 | - i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
1606 | - var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=zoomponto&pin=pin&xy="+xxx+" "+yyy+"&g_sid="+g_sid; | |
1607 | - cpObj.call(p,"zoomPonto",ajaxredesenha); | |
1608 | - } | |
1609 | - } | |
1610 | - catch(e){var e = "";} | |
1611 | -} | |
1612 | -/* | |
1613 | 1522 | Function: clicouRef |
1614 | 1523 | |
1615 | 1524 | Altera a abrangência do mapa quando o mapa de referência é clicado |
... | ... | @@ -1637,94 +1546,6 @@ function movimentoRef(obj) |
1637 | 1546 | }; |
1638 | 1547 | } |
1639 | 1548 | /* |
1640 | -Function: aplicaescala | |
1641 | - | |
1642 | -Aplica a escala numerica definida no formulário existente no mapa. | |
1643 | - | |
1644 | -O valor da escala a ser aplicada é obtido do elemento com id="escalanum" | |
1645 | -*/ | |
1646 | -function aplicaescala() | |
1647 | -{ | |
1648 | - if ($i("escalanum")) | |
1649 | - {var nova = $i("escalanum").value;} | |
1650 | - else | |
1651 | - {var nova = objmapa.scale;} | |
1652 | - i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
1653 | - var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=mudaescala&escala="+nova+"&g_sid="+g_sid; | |
1654 | - g_operacao = "outras"; | |
1655 | - cpObj.call(p,"mudaEscala",ajaxredesenha); | |
1656 | -} | |
1657 | -/* | |
1658 | -Function: zoomtot | |
1659 | - | |
1660 | -Zoom para a extensão default. | |
1661 | - | |
1662 | -O valor da extensão default é obtido de objmapa.extentTotal, cujo valor é definido na inicialização do mapa. | |
1663 | -*/ | |
1664 | -function zoomtot() | |
1665 | -{ | |
1666 | - i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
1667 | - var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+g_tipoimagem+"&ext="+objmapa.extentTotal+"&g_sid="+g_sid; | |
1668 | - g_operacao = "navega"; | |
1669 | - cpObj.call(p,"mudaExtensao",ajaxredesenha); | |
1670 | -} | |
1671 | -/* | |
1672 | -Function: panFixo | |
1673 | - | |
1674 | -Desloca o mapa em uma direção determinada. | |
1675 | - | |
1676 | -Parameters: | |
1677 | - | |
1678 | -direcao - norte|sul|leste|oeste | |
1679 | -*/ | |
1680 | -function panFixo(direcao) | |
1681 | -{ | |
1682 | - if (direcao == "norte") | |
1683 | - { | |
1684 | - var y = objmapa.h / 6; | |
1685 | - var x = objmapa.w / 2; | |
1686 | - } | |
1687 | - if (direcao == "sul") | |
1688 | - { | |
1689 | - var y = objmapa.h - (objmapa.h / 6); | |
1690 | - var x = objmapa.w / 2; | |
1691 | - } | |
1692 | - if (direcao == "leste") | |
1693 | - { | |
1694 | - var x = objmapa.w - (objmapa.w / 6); | |
1695 | - var y = objmapa.h / 2; | |
1696 | - } | |
1697 | - if (direcao == "oeste") | |
1698 | - { | |
1699 | - var x = objmapa.w / 6; | |
1700 | - var y = objmapa.h / 2; | |
1701 | - } | |
1702 | - if (direcao == "nordeste") | |
1703 | - { | |
1704 | - var y = objmapa.h / 6; | |
1705 | - var x = objmapa.w - (objmapa.w / 6); | |
1706 | - } | |
1707 | - if (direcao == "sudeste") | |
1708 | - { | |
1709 | - var y = objmapa.h - (objmapa.h / 6); | |
1710 | - var x = objmapa.w - (objmapa.w / 6); | |
1711 | - } | |
1712 | - if (direcao == "noroeste") | |
1713 | - { | |
1714 | - var y = objmapa.h / 6; | |
1715 | - var x = objmapa.w / 6; | |
1716 | - } | |
1717 | - if (direcao == "sudoeste") | |
1718 | - { | |
1719 | - var y = objmapa.h - (objmapa.h / 6); | |
1720 | - var x = objmapa.w / 6; | |
1721 | - } | |
1722 | - i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
1723 | - var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=pan&escala="+objmapa.scale+"&x="+x+"&y="+y+"&g_sid="+g_sid; | |
1724 | - g_operacao = "navega"; | |
1725 | - cpObj.call(p,"pan",ajaxredesenha); | |
1726 | -} | |
1727 | -/* | |
1728 | 1549 | Function: ativaEntorno |
1729 | 1550 | |
1730 | 1551 | Ativa ou desativa a carga do entorno. |
... | ... | @@ -2847,9 +2668,7 @@ function filmezf(o) |
2847 | 2668 | {var quadro = o;} |
2848 | 2669 | if (quadrosfilme[quadro].extensao != " ") |
2849 | 2670 | { |
2850 | - var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=mudaext&tipoimagem="+g_tipoimagem+"&ext="+quadrosfilme[quadro].extensao+"&g_sid="+g_sid; | |
2851 | - i3GEO.janela.abreAguarde("ajaxredesenha",$trad("o1")); | |
2852 | - cpObj.call(p,"mudaExtensao",ajaxredesenha); | |
2671 | + i3GEO.navega.zoomExt(g_locaplic,g_sid,g_tipoimagem,quadrosfilme[quadro].extensao); | |
2853 | 2672 | } |
2854 | 2673 | else{alert("Extensao nao definida");} |
2855 | 2674 | } |
... | ... | @@ -3001,43 +2820,7 @@ function calculadistancia(lga,lta,lgb,ltb) //0ms |
3001 | 2820 | } |
3002 | 2821 | catch(e){return (0);} |
3003 | 2822 | } |
3004 | -/* | |
3005 | -Function: convdmsddf | |
3006 | - | |
3007 | -Converte dms em dd. | |
3008 | - | |
3009 | -Parameters: | |
3010 | - | |
3011 | -cd - grau. | |
3012 | - | |
3013 | -cm - minuto. | |
3014 | 2823 | |
3015 | -cs - segundo | |
3016 | - | |
3017 | -Returns: | |
3018 | - | |
3019 | -Coordenada em dd. | |
3020 | -*/ | |
3021 | -function convdmsddf(cd,cm,cs) | |
3022 | -{ | |
3023 | - try | |
3024 | - { | |
3025 | - //converte dms em dd | |
3026 | - var sinal = 'positivo'; | |
3027 | - if (cd < 0) | |
3028 | - { | |
3029 | - cd = cd * -1; | |
3030 | - sinal = 'negativo'; | |
3031 | - } | |
3032 | - spm = cs / 3600; | |
3033 | - mpg = cm / 60; | |
3034 | - var dd = (cd * 1) + (mpg * 1) + (spm * 1); | |
3035 | - if (sinal == 'negativo') | |
3036 | - {dd = dd * -1;} | |
3037 | - return (dd); | |
3038 | - } | |
3039 | - catch(e){return (0);} | |
3040 | -} | |
3041 | 2824 | /* |
3042 | 2825 | Function: calcddf |
3043 | 2826 | |
... | ... | @@ -3163,18 +2946,6 @@ function convdmsf(x,y) |
3163 | 2946 | var res = new Array(); |
3164 | 2947 | res[0] = xv; |
3165 | 2948 | res[1] = yv; |
3166 | - if ($i("localizarxy")) | |
3167 | - { | |
3168 | - if($i("xg")) | |
3169 | - { | |
3170 | - $i("xg").value = dx; | |
3171 | - $i("xm").value = mx; | |
3172 | - $i("xs").value = sx; | |
3173 | - $i("yg").value = dy; | |
3174 | - $i("ym").value = my; | |
3175 | - $i("ys").value = sy; | |
3176 | - } | |
3177 | - } | |
3178 | 2949 | return res; |
3179 | 2950 | } |
3180 | 2951 | /* |
... | ... | @@ -3204,7 +2975,6 @@ function convddtela(vx,vy,docmapa) |
3204 | 2975 | var dc = docmapa.getElementById("contemImg"); |
3205 | 2976 | else |
3206 | 2977 | var dc = docmapa.getElementById("img"); |
3207 | - | |
3208 | 2978 | var pos = pegaPosicaoObjeto(dc); |
3209 | 2979 | var imgext = objmapa.extent; |
3210 | 2980 | var imgext = imgext.split(" "); |
... | ... | @@ -3539,109 +3309,6 @@ function criaboxg() |
3539 | 3309 | document.body.appendChild(novoel); |
3540 | 3310 | } |
3541 | 3311 | } |
3542 | -try | |
3543 | -{ | |
3544 | -//controle dos painéis que podem ser redimensionados | |
3545 | -YAHOO.widget.ResizePanel = function(el, userConfig) | |
3546 | -{ | |
3547 | - if (arguments.length > 0) | |
3548 | - {YAHOO.widget.ResizePanel.superclass.constructor.call(this, el, userConfig);} | |
3549 | -}; | |
3550 | -YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE = "yui-resizepanel"; | |
3551 | -YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE = "resizehandle"; | |
3552 | -YAHOO.extend | |
3553 | -( | |
3554 | - YAHOO.widget.ResizePanel, YAHOO.widget.Panel, | |
3555 | - { | |
3556 | - init: function(el, userConfig) | |
3557 | - { | |
3558 | - YAHOO.widget.ResizePanel.superclass.init.call(this, el); | |
3559 | - this.beforeInitEvent.fire(YAHOO.widget.ResizePanel); | |
3560 | - var Dom = YAHOO.util.Dom, | |
3561 | - Event = YAHOO.util.Event, | |
3562 | - oInnerElement = this.innerElement, | |
3563 | - oResizeHandle = document.createElement("DIV"), | |
3564 | - sResizeHandleId = this.id + "_resizehandle"; | |
3565 | - oResizeHandle.id = sResizeHandleId; | |
3566 | - oResizeHandle.className = YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE; | |
3567 | - Dom.addClass(oInnerElement, YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE); | |
3568 | - this.resizeHandle = oResizeHandle; | |
3569 | - function initResizeFunctionality() | |
3570 | - { | |
3571 | - var me = this, | |
3572 | - oHeader = this.header, | |
3573 | - oBody = this.body, | |
3574 | - oFooter = this.footer, | |
3575 | - nStartWidth, | |
3576 | - nStartHeight, | |
3577 | - aStartPos, | |
3578 | - nBodyBorderTopWidth, | |
3579 | - nBodyBorderBottomWidth, | |
3580 | - nBodyTopPadding, | |
3581 | - nBodyBottomPadding, | |
3582 | - nBodyOffset; | |
3583 | - oInnerElement.appendChild(oResizeHandle); | |
3584 | - this.ddResize = new YAHOO.util.DragDrop(sResizeHandleId, this.id); | |
3585 | - this.ddResize.setHandleElId(sResizeHandleId); | |
3586 | - this.ddResize.onMouseDown = function(e) | |
3587 | - { | |
3588 | - nStartWidth = oInnerElement.offsetWidth; | |
3589 | - nStartHeight = oInnerElement.offsetHeight; | |
3590 | - if (YAHOO.env.ua.ie && document.compatMode == "BackCompat") | |
3591 | - {nBodyOffset = 0;} | |
3592 | - else | |
3593 | - { | |
3594 | - nBodyBorderTopWidth = parseInt(Dom.getStyle(oBody, "borderTopWidth"), 10), | |
3595 | - nBodyBorderBottomWidth = parseInt(Dom.getStyle(oBody, "borderBottomWidth"), 10), | |
3596 | - nBodyTopPadding = parseInt(Dom.getStyle(oBody, "paddingTop"), 10), | |
3597 | - nBodyBottomPadding = parseInt(Dom.getStyle(oBody, "paddingBottom"), 10), | |
3598 | - nBodyOffset = nBodyBorderTopWidth + nBodyBorderBottomWidth + nBodyTopPadding + nBodyBottomPadding; | |
3599 | - } | |
3600 | - me.cfg.setProperty("width", nStartWidth + "px"); | |
3601 | - aStartPos = [Event.getPageX(e), Event.getPageY(e)]; | |
3602 | - }; | |
3603 | - this.ddResize.onDrag = function(e) | |
3604 | - { | |
3605 | - var aNewPos = [Event.getPageX(e), Event.getPageY(e)], | |
3606 | - nOffsetX = aNewPos[0] - aStartPos[0], | |
3607 | - nOffsetY = aNewPos[1] - aStartPos[1], | |
3608 | - nNewWidth = Math.max(nStartWidth + nOffsetX, 10), | |
3609 | - nNewHeight = Math.max(nStartHeight + nOffsetY, 10), | |
3610 | - nBodyHeight = (nNewHeight - (oFooter.offsetHeight + oHeader.offsetHeight + nBodyOffset)); | |
3611 | - me.cfg.setProperty("width", nNewWidth + "px"); | |
3612 | - if (nBodyHeight < 0) | |
3613 | - {nBodyHeight = 0;} | |
3614 | - oBody.style.height = nBodyHeight + "px"; | |
3615 | - if ($i("wdocai")) | |
3616 | - {$i("wdocai").style.height = nBodyHeight;} | |
3617 | - }; | |
3618 | - }; | |
3619 | - function onBeforeShow() | |
3620 | - { | |
3621 | - initResizeFunctionality.call(this); | |
3622 | - this.unsubscribe("beforeShow", onBeforeShow); | |
3623 | - }; | |
3624 | - function onBeforeRender() | |
3625 | - { | |
3626 | - if (!this.footer) | |
3627 | - {this.setFooter("");} | |
3628 | - if (this.cfg.getProperty("visible")) | |
3629 | - {initResizeFunctionality.call(this);} | |
3630 | - else | |
3631 | - {this.subscribe("beforeShow", onBeforeShow);} | |
3632 | - this.unsubscribe("beforeRender", onBeforeRender); | |
3633 | - }; | |
3634 | - this.subscribe("beforeRender", onBeforeRender); | |
3635 | - if (userConfig) | |
3636 | - {this.cfg.applyConfig(userConfig, true);} | |
3637 | - this.initEvent.fire(YAHOO.widget.ResizePanel); | |
3638 | - }, | |
3639 | - toString: function() | |
3640 | - {return "ResizePanel " + this.id;} | |
3641 | - } | |
3642 | -); | |
3643 | -} | |
3644 | -catch(e){}; | |
3645 | 3312 | |
3646 | 3313 | |
3647 | 3314 | /* | ... | ... |
classesjs/i3geonaocompacto.js
classesjs/iniciamma.js
... | ... | @@ -699,7 +699,7 @@ function Mapa(e,m) |
699 | 699 | ajustaEntorno(); |
700 | 700 | } |
701 | 701 | autoRedesenho("ativa"); |
702 | - if ($i("escalanum")){$i("escalanum").value = objmapa.scale;} | |
702 | + if ($i("i3geo_escalanum")){$i("i3geo_escalanum").value = objmapa.scale;} | |
703 | 703 | if ((objmapa.geoip == "nao") && ($i("ondeestou"))) |
704 | 704 | {$i("ondeestou").style.display="none";} |
705 | 705 | } |
... | ... | @@ -876,9 +876,6 @@ function Mapa(e,m) |
876 | 876 | this.atualizaListaTemas = function(temas) |
877 | 877 | {alert("atualizaListaTemas foi depreciado. Utilize i3GEO.arvoreDeCamadas")}; |
878 | 878 | /* |
879 | - Function: atualizaFarol (depreciado) | |
880 | - */ | |
881 | - /* | |
882 | 879 | Function: criaCorpoMapa |
883 | 880 | |
884 | 881 | Cria os objetos para preenchimento com a imagem do corpo do mapa. |
... | ... | @@ -1025,6 +1022,8 @@ function Mapa(e,m) |
1025 | 1022 | { |
1026 | 1023 | do |
1027 | 1024 | { |
1025 | + var temp = g_funcoesMousemoveMapaDefault[f].replace("()", ""); | |
1026 | + if(eval('typeof ' + temp) == 'function') | |
1028 | 1027 | eval(g_funcoesMousemoveMapaDefault[f]); |
1029 | 1028 | } |
1030 | 1029 | while(f--) |
... | ... | @@ -1071,6 +1070,8 @@ function Mapa(e,m) |
1071 | 1070 | { |
1072 | 1071 | do |
1073 | 1072 | { |
1073 | + var temp = g_funcoesNevegaMapaDefault[f].replace("()", ""); | |
1074 | + if(eval('typeof ' + temp) == 'function') | |
1074 | 1075 | eval(g_funcoesNevegaMapaDefault[f]); |
1075 | 1076 | } |
1076 | 1077 | while(f--) | ... | ... |
classesjs/redesenho.js
... | ... | @@ -597,8 +597,8 @@ function ajaxIniciaParametros(retorno) |
597 | 597 | // |
598 | 598 | //arredonda o valor da escala numerica e mostra no mapa se for o caso |
599 | 599 | // |
600 | - if ($i("escalanum")) | |
601 | - {$i("escalanum").value=parseInt(mapscale);} | |
600 | + if ($i("i3geo_escalanum")) | |
601 | + {$i("i3geo_escalanum").value=parseInt(mapscale);} | |
602 | 602 | // |
603 | 603 | //atualiza a janela com o valor da extensão geográfica do mapa se for o caso |
604 | 604 | // | ... | ... |