Commit 37512081eff7ed81bb21aae3c9e0818f682a7824
1 parent
5673a5cc
Exists in
master
and in
7 other branches
--no commit message
Showing
71 changed files
with
830 additions
and
775 deletions
Show diff stats
.project
... | ... | @@ -27,7 +27,7 @@ |
27 | 27 | </natures> |
28 | 28 | <filteredResources> |
29 | 29 | <filter> |
30 | - <id>1340317937365</id> | |
30 | + <id>1341461488123</id> | |
31 | 31 | <name></name> |
32 | 32 | <type>26</type> |
33 | 33 | <matcher> |
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 | </matcher> |
37 | 37 | </filter> |
38 | 38 | <filter> |
39 | - <id>1340317937367</id> | |
39 | + <id>1341461488125</id> | |
40 | 40 | <name></name> |
41 | 41 | <type>26</type> |
42 | 42 | <matcher> |
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 | </matcher> |
46 | 46 | </filter> |
47 | 47 | <filter> |
48 | - <id>1340317937369</id> | |
48 | + <id>1341461488127</id> | |
49 | 49 | <name></name> |
50 | 50 | <type>14</type> |
51 | 51 | <matcher> |
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 | </matcher> |
55 | 55 | </filter> |
56 | 56 | <filter> |
57 | - <id>1340317937371</id> | |
57 | + <id>1341461488128</id> | |
58 | 58 | <name></name> |
59 | 59 | <type>26</type> |
60 | 60 | <matcher> |
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | </matcher> |
64 | 64 | </filter> |
65 | 65 | <filter> |
66 | - <id>1340317937389</id> | |
66 | + <id>1341461488130</id> | |
67 | 67 | <name></name> |
68 | 68 | <type>30</type> |
69 | 69 | <matcher> |
... | ... | @@ -72,7 +72,7 @@ |
72 | 72 | </matcher> |
73 | 73 | </filter> |
74 | 74 | <filter> |
75 | - <id>1340317937391</id> | |
75 | + <id>1341461488131</id> | |
76 | 76 | <name></name> |
77 | 77 | <type>22</type> |
78 | 78 | <matcher> | ... | ... |
admin/admin.db
No preview for this file type
admin/js/admin.js
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | navn = false; |
6 | 6 | navm = false; |
7 | 7 | //seta as variáveis navn e navm |
8 | -var app = navigator.appName.substring(0,1); | |
8 | +app = navigator.appName.substring(0,1); | |
9 | 9 | if (app==='N'){navn=true;}else{navm=true;} |
10 | 10 | |
11 | 11 | $mensagemAguarde = "<img src='../../imagens/aguarde.gif' />";//"<span style=color:red ><p>Aguarde...</p></span>" |
... | ... | @@ -25,7 +25,7 @@ function ativaIndice(onde) |
25 | 25 | { |
26 | 26 | ins += "<a href='#"+etrs[t].innerHTML+"'><p>"+etrs[t].innerHTML+"</p></a>"; |
27 | 27 | etrs[t].innerHTML = "<a name='"+etrs[t].innerHTML+"'>"+etrs[t].innerHTML+"</a>"; |
28 | - | |
28 | + | |
29 | 29 | } |
30 | 30 | document.getElementById(onde).innerHTML = ins+"</fieldset>"; |
31 | 31 | } | ... | ... |
admin/js/core.js
... | ... | @@ -45,26 +45,26 @@ Retorno: |
45 | 45 | |
46 | 46 | object - objeto javaScript |
47 | 47 | */ |
48 | -var $i = function(id) | |
48 | +$i = function(id) | |
49 | 49 | {return document.getElementById(id);}; |
50 | 50 | /* |
51 | 51 | Variable: $mapfiles |
52 | 52 | |
53 | 53 | Armazena o objeto com a lista de mapfiles |
54 | 54 | */ |
55 | -var $mapfiles = ""; | |
55 | +$mapfiles = ""; | |
56 | 56 | /* |
57 | 57 | Variable: $tags |
58 | 58 | |
59 | 59 | Armazena o objeto com a lista de tags |
60 | 60 | */ |
61 | -var $tags = ""; | |
61 | +$tags = ""; | |
62 | 62 | /* |
63 | 63 | Variable: $perfis |
64 | 64 | |
65 | 65 | Armazena o objeto com a lista de perfis |
66 | 66 | */ |
67 | -var $perfis = ""; | |
67 | +$perfis = ""; | |
68 | 68 | function cabecalhoGeral(id,excluir){ |
69 | 69 | var i,n,temp, |
70 | 70 | ins = "<fieldset class='cabecalhoGeral'><legend>Opções principais</legend>", | ... | ... |
admin/js/temas.js
... | ... | @@ -100,11 +100,11 @@ objalignment = [ |
100 | 100 | $i = function(i) |
101 | 101 | {return document.getElementById(i);}; |
102 | 102 | |
103 | -var retorna = function(retorno) | |
103 | +retorna = function(retorno) | |
104 | 104 | { |
105 | 105 | fontes = retorno.data; |
106 | 106 | }; |
107 | -var p = "../php/temas.php?funcao=pegaFontes"; | |
107 | +p = "../php/temas.php?funcao=pegaFontes"; | |
108 | 108 | cPaint.call(p,"",retorna); |
109 | 109 | |
110 | 110 | function iniciaAdmin() |
... | ... | @@ -122,7 +122,7 @@ function montaParametros() |
122 | 122 | $i("arquivoAtivo").innerHTML = ins; |
123 | 123 | }; |
124 | 124 | var p = "../php/menutemas.php?funcao=pegaTemas"; |
125 | - cPaint.call(p,"",retorna); | |
125 | + cPaint.call(p,"",retorna); | |
126 | 126 | } |
127 | 127 | function adicionarLayer() |
128 | 128 | { |
... | ... | @@ -134,7 +134,7 @@ function adicionarLayer() |
134 | 134 | ativaTema(codigoMap); |
135 | 135 | }; |
136 | 136 | var p = "../php/temas.php?funcao=criarNovoLayer&codigoMap="+codigoMap; |
137 | - cPaint.call(p,"",retorna); | |
137 | + cPaint.call(p,"",retorna); | |
138 | 138 | } |
139 | 139 | } |
140 | 140 | function criarNovoMap() |
... | ... | @@ -151,7 +151,7 @@ function criarNovoMap() |
151 | 151 | montaParametros(); |
152 | 152 | }; |
153 | 153 | var p = "../php/temas.php?funcao=criarNovoMap&nome="+nome+"&codigo="+codigo; |
154 | - cPaint.call(p,"",retorna); | |
154 | + cPaint.call(p,"",retorna); | |
155 | 155 | } |
156 | 156 | } |
157 | 157 | function ativaTema(codigoMap) |
... | ... | @@ -183,7 +183,7 @@ function ativaTema(codigoMap) |
183 | 183 | }; |
184 | 184 | $i("forms").style.display="block"; |
185 | 185 | var p = "../php/temas.php?funcao=pegaLayers&codigoMap="+codigoMap; |
186 | - cPaint.call(p,"",retorna); | |
186 | + cPaint.call(p,"",retorna); | |
187 | 187 | } |
188 | 188 | function pegaClasses(codigoMap,codigoLayer) |
189 | 189 | { |
... | ... | @@ -204,7 +204,7 @@ function pegaClasses(codigoMap,codigoLayer) |
204 | 204 | titulo:"name",prefixoid:"name_",id:codigoLayer+"_"+d.id,valor:"name"} |
205 | 205 | ] |
206 | 206 | }; |
207 | - | |
207 | + | |
208 | 208 | ins += "<br><fieldset><legend>+- "+d.id+"</legend><div style=display:none >"; |
209 | 209 | ins += "<p><input onclick=excluirClasse('"+codigoLayer+"','"+d.id+"',this) type=button value='Excluir classe' /></p>"; |
210 | 210 | ins += "<br><fieldset><legend>+- status</legend><div style=display:none >"; |
... | ... | @@ -214,7 +214,7 @@ function pegaClasses(codigoMap,codigoLayer) |
214 | 214 | ins += "</select>"; |
215 | 215 | ins += "<img src=../imagens/02.png style=cursor:pointer title='Aplicar' onclick='salvarClasse(\""+codigoLayer+"_"+d.id+"\",\"status\",this)'/>"; |
216 | 216 | ins += "</p></div></fieldset>"; |
217 | - | |
217 | + | |
218 | 218 | ins += "<br><fieldset><legend>+- expression</legend><div style=display:none >"; |
219 | 219 | ins += "<p class=textoAjuda style='background-color:rgb(250,250,250);'>Four types of expressions are now supported to define class membership. String comparisons, regular expressions, simple logical expressions, and string functions. If no expression is given, then all features are said to belong to this class.<br>String comparisons are case sensitive and are the fastest to evaluate. No special delimiters are necessary although string must be quoted if they contain special characters. (As a matter of good habit, it is recommended you quote all strings).<br>Regular expressions function just like previous versions of MapServer. However, you must now delimit a regular expression using /regex/. No quotes should be used.<br><br>Logical expressions allow you to build fairly complex tests based on one or more attributes and therefore are only available with shapefiles. Logical expressions are delimited by parentheses '(expression)'. Attribute names are delimited by square brackets '[ATTRIBUTE]'. These names are case sensitive and must match the items in the shapefile. For example: EXPRESSION ([POPULATION] > 50000 AND '[LANGUAGE]' eq 'FRENCH') ... The following logical operators are supported: =,>,<,<=,>=,=,or,and,lt,gt,ge,le,eq,ne. As you might expect this level of complexity is slower to process.<br>One string function exists: length(). This obviously computes the length of a string. An example follows:<br>EXPRESSION (length('[NAME_E]') < 8)<br>String comparisons and regular expressions work from the classitem defined at the layer level. You may mix expression types within the different classes of a layer.</p>"; |
220 | 220 | ins += "<p><input type=text onchange='this.style.color=\"blue\"' id='expression_"+codigoLayer+"_"+d.id+"' value=\""+d.dados.expression+"\" />"; |
... | ... | @@ -246,7 +246,7 @@ function pegaClasses(codigoMap,codigoLayer) |
246 | 246 | ins += (geraLinhas2(d.dados,param,"salvarClasse")); |
247 | 247 | ins += "</fieldset>"; |
248 | 248 | //labels |
249 | - ins += "<br><fieldset><legend style=color:brown >+- Label (para ativar, defina LABELITEM em caract. gerais)</legend><div style=display:none >"; | |
249 | + ins += "<br><fieldset><legend style=color:brown >+- Label (para ativar, defina LABELITEM em caract. gerais)</legend><div style=display:none >"; | |
250 | 250 | var param = { |
251 | 251 | "linhas":[ |
252 | 252 | {texto:"Color to draw text with.", |
... | ... | @@ -283,7 +283,7 @@ function pegaClasses(codigoMap,codigoLayer) |
283 | 283 | ins += "</select>"; |
284 | 284 | ins += "<img src=../imagens/02.png style=cursor:pointer title='Aplicar' onclick='salvarClasseLabel(\""+codigoLayer+"_"+d.id+"\",\".partials\",this)'/>"; |
285 | 285 | ins += "</p></div></fieldset>"; |
286 | - | |
286 | + | |
287 | 287 | ins += "<br><fieldset><legend>+- force</legend><div style=display:none >"; |
288 | 288 | ins += "<p class=textoAjuda style='background-color:rgb(250,250,250);'>Forces labels for a particular class on, regardless of collisions. Available only for cached labels. Default is false.</p>"; |
289 | 289 | ins += "<p><select onchange='this.style.color=\"blue\"' id='label_type_"+codigoLayer+"_"+d.id+"' >"; |
... | ... | @@ -291,7 +291,7 @@ function pegaClasses(codigoMap,codigoLayer) |
291 | 291 | ins += "</select>"; |
292 | 292 | ins += "<img src=../imagens/02.png style=cursor:pointer title='Aplicar' onclick='salvarClasseLabel(\""+codigoLayer+"_"+d.id+"\",\".force\",this)'/>"; |
293 | 293 | ins += "</p></div></fieldset>"; |
294 | - | |
294 | + | |
295 | 295 | ins += (geraLinhas2(d.dados,param,"salvarClasseLabel")); |
296 | 296 | var param = { |
297 | 297 | "linhas":[ |
... | ... | @@ -332,7 +332,7 @@ function pegaClasses(codigoMap,codigoLayer) |
332 | 332 | {texto:"Supported encoding format to be used for labels. If the format is not supported, the label will not be drawn. Requires the iconv library (present on most systems). The library is always detected if present on the system, but if not the label will not be drawn. Required for displaying international characters in MapServer. More information can be found at: http://www.foss4g.org/FOSS4G/MAPSERVER/mpsnf-i18n-en.html.", |
333 | 333 | titulo:"encoding",prefixoid:"label_encoding_",id:codigoLayer+"_"+d.id,valor:"label.encoding"} |
334 | 334 | ] |
335 | - }; | |
335 | + }; | |
336 | 336 | ins += "<br><fieldset style=background-color:#f0e68c ><legend style=color:brown >+- Mais...</legend><div style=display:none >"; |
337 | 337 | ins += (geraLinhas2(d.dados,param,"salvarClasseLabel")); |
338 | 338 | ins += "</fieldset>"; |
... | ... | @@ -384,7 +384,7 @@ function pegaEstilos(codigoMap,codigoLayer) |
384 | 384 | }; |
385 | 385 | ins += "<br><fieldset style='background-color:rgb(240,240,240)'><legend>+- "+est+"</legend>"; |
386 | 386 | ins += (geraLinhas2(d,param,"salvarEstilo")); |
387 | - | |
387 | + | |
388 | 388 | var param = { |
389 | 389 | "linhas":[ |
390 | 390 | {texto:"Height, in pixels, of the symbol/pattern to be used. Only useful with scalable symbols. Default is 1. For symbols of Type HATCH, the SIZE is the distance between hatched lines. For its use with hatched lines, see Example#8 in the SYMBOL examples.", |
... | ... | @@ -402,7 +402,7 @@ function pegaEstilos(codigoMap,codigoLayer) |
402 | 402 | {texto:"Angle, given in degrees, to draw the line work. Default is 0. For symbols of Type HATCH, this is the angle of the hatched lines. For its use with hatched lines, see Example#8 in the SYMBOL examples.", |
403 | 403 | titulo:"angle",prefixoid:"",id:"angle_"+preid,valor:"angle"}, |
404 | 404 | {texto:"For MapServer versions <5, this is the attribute/field that stores the angle to be used in rendering. Angle is given in degrees with 0 meaning no rotation.", |
405 | - titulo:"angleitem",prefixoid:"",id:"angleitem_"+preid,valor:"angleitem"}, | |
405 | + titulo:"angleitem",prefixoid:"",id:"angleitem_"+preid,valor:"angleitem"}, | |
406 | 406 | {texto:"For MapServer versions <5, this is the attribute/field that stores the size to be used in rendering. Value is given in pixels.", |
407 | 407 | titulo:"sizeitem",prefixoid:"",id:"sizeitem_"+preid,valor:"sizeitem"} |
408 | 408 | ] |
... | ... | @@ -445,7 +445,7 @@ function pegaMetadados(codigoMap,codigoLayer) |
445 | 445 | ins += "<img src=../imagens/02.png style=cursor:pointer title='Aplicar' onclick='salvarMetadados(\""+codigoLayer+"\",\"aplicaextensao\",this)'/>"; |
446 | 446 | ins += "</p></div></fieldset>"; |
447 | 447 | |
448 | - | |
448 | + | |
449 | 449 | ins += "<br><fieldset><legend>+- download</legend><div style=display:none >"; |
450 | 450 | ins += "<p class=textoAjuda style='background-color:rgb(250,250,250);'>Indica se o usuário pode fazer download do tema</p>"; |
451 | 451 | ins += "<p><select onchange='this.style.color=\"blue\"' id='download_"+codigoLayer+"' >"; |
... | ... | @@ -453,7 +453,7 @@ function pegaMetadados(codigoMap,codigoLayer) |
453 | 453 | ins += "</select>"; |
454 | 454 | ins += "<img src=../imagens/02.png style=cursor:pointer title='Aplicar' onclick='salvarMetadados(\""+codigoLayer+"\",\"download\",this)'/>"; |
455 | 455 | ins += "</p></div></fieldset>"; |
456 | - | |
456 | + | |
457 | 457 | var param = { |
458 | 458 | "linhas":[ |
459 | 459 | {texto:"Nomes das colunas da tabela de atributos do tema, que serão mostradas na ferramenta de identificação. Se for vazio, todas as colunas serão mostradas. A lista de itens deve ser separada por ',' e grafada em caixa alta no caso de shapefile.", |
... | ... | @@ -499,8 +499,8 @@ function pegaMetadados(codigoMap,codigoLayer) |
499 | 499 | ins += "</select>"; |
500 | 500 | ins += "<img src=../imagens/02.png style=cursor:pointer title='Aplicar' onclick='salvarMetadados(\""+codigoLayer+"\",\"escondido\",this)'/>"; |
501 | 501 | ins += "</p></div></fieldset>"; |
502 | - | |
503 | - ins += "<br><fieldset><legend>+- identifica</legend><div style=display:none >"; | |
502 | + | |
503 | + ins += "<br><fieldset><legend>+- identifica</legend><div style=display:none >"; | |
504 | 504 | ins += "<p class=textoAjuda style='background-color:rgb(250,250,250);'>Indica se o tema irá ser mostrado na ferramenta de identificação</p>"; |
505 | 505 | ins += "<p><select onchange='this.style.color=\"blue\"' id='identifica_"+codigoLayer+"' >"; |
506 | 506 | ins += combosimnao(retorna.data.identifica); |
... | ... | @@ -547,7 +547,7 @@ function pegaCaracteristicasGerais(codigoMap,codigoLayer) |
547 | 547 | ins += "</select>"; |
548 | 548 | ins += "<img src=../imagens/02.png style=cursor:pointer title='Aplicar' onclick='salvarLayer(\""+codigoLayer+"\",\"type\",this)'/>"; |
549 | 549 | ins += "</p></fieldset>"; |
550 | - | |
550 | + | |
551 | 551 | ins += "<br><fieldset><legend>+- connectiontype</legend><div style=display:none >"; |
552 | 552 | ins += "<p class=textoAjuda style='background-color:rgb(250,250,250);' >Type of connection. Default is local.</b></p>"; |
553 | 553 | ins += "<p><select onchange='this.style.color=\"blue\"' id='connectiontype_"+codigoLayer+"' >"; |
... | ... | @@ -592,9 +592,9 @@ function pegaCaracteristicasGerais(codigoMap,codigoLayer) |
592 | 592 | {texto:"The scale at which symbols and/or text appear full size. This allows for dynamic scaling of objects based on the scale of the map. If not set then this layer will always appear at the same size. Scaling only takes place within the limits of MINSIZE and MAXSIZE as described above. Scale is given as the denominator of the actual scale fraction, for example for a map at a scale of 1:24,000 use 24000.", |
593 | 593 | titulo:"symbolscale",prefixoid:"symbolscale_",id:codigoLayer,valor:"symbolscale"}, |
594 | 594 | {texto:"Sensitivity for point based queries (i.e. via mouse and/or map coordinates). Given in TOLERANCEUNITS. If the layer is a POINT or a LINE, the default is 3. For all other layer types, the default is 0. To restrict polygon searches so that the point must occur in the polygon set the tolerance to zero.", |
595 | - titulo:"tolerance",prefixoid:"tolerance_",id:codigoLayer,valor:"tolerance"}, | |
595 | + titulo:"tolerance",prefixoid:"tolerance_",id:codigoLayer,valor:"tolerance"}, | |
596 | 596 | {texto:" ", |
597 | - titulo:"projection",prefixoid:"projection_",id:codigoLayer,valor:"projection"} | |
597 | + titulo:"projection",prefixoid:"projection_",id:codigoLayer,valor:"projection"} | |
598 | 598 | ] |
599 | 599 | }; |
600 | 600 | |
... | ... | @@ -608,10 +608,10 @@ function pegaCaracteristicasGerais(codigoMap,codigoLayer) |
608 | 608 | ins += comboObjeto(objmapunits,"valor","texto",retorna.data.sizeunits); |
609 | 609 | ins += "</select>"; |
610 | 610 | ins += "<img src=../imagens/02.png style=cursor:pointer title='Aplicar' onclick='salvarLayer(\""+codigoLayer+"\",\"sizeunits\",this)'/>"; |
611 | - ins += "</p></div></fieldset>"; | |
611 | + ins += "</p></div></fieldset>"; | |
612 | 612 | |
613 | 613 | ins += "</div></fieldset>"; |
614 | - | |
614 | + | |
615 | 615 | ins += "</div></fieldset>"; |
616 | 616 | $i("geral_"+codigoLayer+"_"+codigoMap).innerHTML = ins; |
617 | 617 | }; |
... | ... | @@ -705,7 +705,7 @@ function adicionarClasse(codigoLayer,botao) |
705 | 705 | pegaClasses(codigoMap,codigoLayer); |
706 | 706 | }; |
707 | 707 | var p = "../php/temas.php?funcao=adicionarClasse&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer; |
708 | - cPaint.call(p,"",retorna); | |
708 | + cPaint.call(p,"",retorna); | |
709 | 709 | } |
710 | 710 | } |
711 | 711 | function adicionarEstilo(codigoLayer,codigoClasse,botao) |
... | ... | @@ -720,7 +720,7 @@ function adicionarEstilo(codigoLayer,codigoClasse,botao) |
720 | 720 | pegaEstilos(codigoMap,codigoLayer); |
721 | 721 | }; |
722 | 722 | var p = "../php/temas.php?funcao=adicionarClasse&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&codigoClasse="+codigoClasse; |
723 | - cPaint.call(p,"",retorna); | |
723 | + cPaint.call(p,"",retorna); | |
724 | 724 | } |
725 | 725 | } |
726 | 726 | function excluirClasse(codigoLayer,codigoClasse,botao) |
... | ... | @@ -737,7 +737,7 @@ function excluirClasse(codigoLayer,codigoClasse,botao) |
737 | 737 | pegaClasses(codigoMap,codigoLayer); |
738 | 738 | }; |
739 | 739 | var p = "../php/temas.php?funcao=excluirClasse&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer+"&codigoClasse="+codigoClasse; |
740 | - cPaint.call(p,"",retorna); | |
740 | + cPaint.call(p,"",retorna); | |
741 | 741 | } |
742 | 742 | } |
743 | 743 | } |
... | ... | @@ -755,7 +755,7 @@ function excluirLayer(codigoLayer,botao) |
755 | 755 | ativaTema(codigoMap); |
756 | 756 | }; |
757 | 757 | var p = "../php/temas.php?funcao=excluirLayer&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer; |
758 | - cPaint.call(p,"",retorna); | |
758 | + cPaint.call(p,"",retorna); | |
759 | 759 | } |
760 | 760 | } |
761 | 761 | } |
762 | 762 | \ No newline at end of file | ... | ... |
admin/php/login.php
... | ... | @@ -145,6 +145,28 @@ switch (strtoupper($funcao)) |
145 | 145 | } |
146 | 146 | cpjson($retorno); |
147 | 147 | break; |
148 | + case "RECUPERARSENHA": | |
149 | + $retorno = false; | |
150 | + if(!empty($usuario)){ | |
151 | + $retorno = recuperarSenha(); | |
152 | + } | |
153 | + cpjson($retorno); | |
154 | + break; | |
155 | +} | |
156 | +function recuperarSenha(){ | |
157 | + global $usuario; | |
158 | + include(__DIR__."/conexao.php"); | |
159 | + $dados = pegaDados("select * from ".$esquemaadmin."i3GEOadmin_usuarios where login = '$usuario' and ativo = 1",$locaplic); | |
160 | + if(count($dados) > 0){ | |
161 | + $to = $dados[0]["email"]; | |
162 | + $subject = 'senha i3geo'; | |
163 | + $message = $dados[0]["senha"]; | |
164 | + mail($to, $subject, $message); | |
165 | + return true; | |
166 | + } | |
167 | + else{ | |
168 | + return false; | |
169 | + } | |
148 | 170 | } |
149 | 171 | function verificaPapelSessao($id_papel){ |
150 | 172 | $resultado = false; | ... | ... |
classesjs/classe_ajuda.js
... | ... | @@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | 32 | if(typeof(i3GEO) === 'undefined'){ |
33 | - i3GEO = []; | |
33 | + var i3GEO = {}; | |
34 | 34 | } |
35 | 35 | /* |
36 | 36 | Classe: i3GEO.ajuda |
... | ... | @@ -137,9 +137,9 @@ i3GEO.ajuda = { |
137 | 137 | Function: abreDoc |
138 | 138 | |
139 | 139 | Abre a documentacao do i3geo em uma nova janela do navegador |
140 | - | |
140 | + | |
141 | 141 | Parametro: |
142 | - | |
142 | + | |
143 | 143 | url - url que será adicionada a i3GEO.configura.locaplic |
144 | 144 | */ |
145 | 145 | abreDoc: function(url){ |
... | ... | @@ -171,10 +171,10 @@ i3GEO.ajuda = { |
171 | 171 | if(corpo){pos = YU.Dom.getXY(corpo);} |
172 | 172 | else{ |
173 | 173 | corpo = $i(i3GEO.Interface.IDMAPA); |
174 | - if(corpo){pos = YU.Dom.getXY(corpo);} | |
174 | + if(corpo){pos = YU.Dom.getXY(corpo);} | |
175 | 175 | } |
176 | 176 | nx = pos[0] - largura - 3; |
177 | - ny = i3GEO.parametros.h - 78; | |
177 | + ny = i3GEO.parametros.h - 78; | |
178 | 178 | texto = '<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>'; |
179 | 179 | if(nx < 0) |
180 | 180 | {nx = 10;ny = ny - 50;} |
... | ... | @@ -182,7 +182,7 @@ i3GEO.ajuda = { |
182 | 182 | janela[2].innerHTML = texto; |
183 | 183 | YU.Event.addListener(janela[0].close, "click", i3GEO.ajuda.fechaJanela); |
184 | 184 | this.ativaCookie(); |
185 | - | |
185 | + | |
186 | 186 | } |
187 | 187 | } |
188 | 188 | catch(e){ |
... | ... | @@ -265,7 +265,7 @@ i3GEO.ajuda = { |
265 | 265 | i3GEO.util.insereCookie("g_janelaMen","nao"); |
266 | 266 | }, |
267 | 267 | /* |
268 | - Function: fechaJanela. | |
268 | + Function: fechaJanela. | |
269 | 269 | |
270 | 270 | Fecha a janela de ajuda. |
271 | 271 | */ | ... | ... |
classesjs/classe_analise.js
... | ... | @@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | 32 | if(typeof(i3GEO) === 'undefined'){ |
33 | - i3GEO = []; | |
33 | + var i3GEO = {}; | |
34 | 34 | } |
35 | 35 | /* |
36 | 36 | Classe: i3GEO.analise |
... | ... | @@ -300,7 +300,7 @@ i3GEO.analise = { |
300 | 300 | janela.moveTo(imagemxy[0]+150,imagemxy[1]); |
301 | 301 | if(navm && i3GEO.Interface.ATUAL === "googleearth" ){ |
302 | 302 | janela.moveTo(0,0); |
303 | - } | |
303 | + } | |
304 | 304 | // |
305 | 305 | //botao que abre a ferramenta de calculo de perfis. |
306 | 306 | //pontosdistobj contem as coordenadas dos pontos |
... | ... | @@ -332,7 +332,7 @@ i3GEO.analise = { |
332 | 332 | if(janela){ |
333 | 333 | YAHOO.i3GEO.janela.manager.remove(janela); |
334 | 334 | janela.destroy(); |
335 | - } | |
335 | + } | |
336 | 336 | }, |
337 | 337 | /* |
338 | 338 | Function: clique |
... | ... | @@ -549,10 +549,10 @@ i3GEO.analise = { |
549 | 549 | } |
550 | 550 | else{ |
551 | 551 | janela = YAHOO.i3GEO.janela.manager.find("mostraarea"); |
552 | - } | |
552 | + } | |
553 | 553 | janela.show(); |
554 | 554 | imagemxy = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO)); |
555 | - janela.moveTo(imagemxy[0]+150,imagemxy[1]); | |
555 | + janela.moveTo(imagemxy[0]+150,imagemxy[1]); | |
556 | 556 | }, |
557 | 557 | /* |
558 | 558 | Function: fechaJanela |
... | ... | @@ -571,7 +571,7 @@ i3GEO.analise = { |
571 | 571 | if(janela){ |
572 | 572 | YAHOO.i3GEO.janela.manager.remove(janela); |
573 | 573 | janela.destroy(); |
574 | - } | |
574 | + } | |
575 | 575 | }, |
576 | 576 | /* |
577 | 577 | Function: clique | ... | ... |
classesjs/classe_arvoredecamadas.js
classesjs/classe_arvoredetemas.js
... | ... | @@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | 32 | if(typeof(i3GEO) === 'undefined'){ |
33 | - i3GEO = []; | |
33 | + var i3GEO = {}; | |
34 | 34 | } |
35 | 35 | /* |
36 | 36 | Classe: i3GEO.arvoreDeTemas |
... | ... | @@ -44,7 +44,7 @@ i3GEO.arvoreDeTemas = { |
44 | 44 | Objeto com a definicao das propriedades que serao utilizadas na inclusao dos icones adicionais de adicao de temas e no item de descricao de cada tema. |
45 | 45 | |
46 | 46 | "uploadarquivo" quando "true" indica que sera mostrado o icone de upload de arquivos e o icoe de conexao com servicos |
47 | - | |
47 | + | |
48 | 48 | Example: |
49 | 49 | |
50 | 50 | var obj = { |
... | ... | @@ -64,13 +64,13 @@ i3GEO.arvoreDeTemas = { |
64 | 64 | conectarwmst: true, |
65 | 65 | |
66 | 66 | conectargeorss: true, |
67 | - | |
67 | + | |
68 | 68 | conectargeojson: true, |
69 | 69 | |
70 | 70 | nuvemTags: true, |
71 | 71 | |
72 | 72 | nuvemTagsFlash: true, |
73 | - | |
73 | + | |
74 | 74 | carregaKml: true, |
75 | 75 | |
76 | 76 | navegacaoDir: false, |
... | ... | @@ -88,7 +88,7 @@ i3GEO.arvoreDeTemas = { |
88 | 88 | refresh: true, |
89 | 89 | |
90 | 90 | carousel: true, |
91 | - | |
91 | + | |
92 | 92 | inde: true, |
93 | 93 | |
94 | 94 | uploadgpx: false, |
... | ... | @@ -96,13 +96,13 @@ i3GEO.arvoreDeTemas = { |
96 | 96 | comentarios: true, |
97 | 97 | |
98 | 98 | bookmark: true, |
99 | - | |
99 | + | |
100 | 100 | importarwmc: true, |
101 | - | |
101 | + | |
102 | 102 | googleearth: true, |
103 | - | |
103 | + | |
104 | 104 | uploadarquivo: true, //upload de GPX, SHAPEFILE, DBF, CSV e KML |
105 | - | |
105 | + | |
106 | 106 | flutuante: true //mostra a opcao que permite abrir o catalogo em uma janela flutuante |
107 | 107 | } |
108 | 108 | |
... | ... | @@ -144,7 +144,7 @@ i3GEO.arvoreDeTemas = { |
144 | 144 | |
145 | 145 | Valor que sera utilizado para dividir o valor bruto do numero de acessos de cada tema. |
146 | 146 | |
147 | - A divisao e utilizada para definir quantas estrelas serao mostradas na arvore de opcoes adicionais.<b> | |
147 | + A divisao e utilizada para definir quantas estrelas serao mostradas na arvore de opcoes adicionais.<b> | |
148 | 148 | |
149 | 149 | Tipo: |
150 | 150 | {Numeric} |
... | ... | @@ -349,7 +349,7 @@ i3GEO.arvoreDeTemas = { |
349 | 349 | Function: flutuante |
350 | 350 | |
351 | 351 | Abre o catalogo em uma janela flutuante |
352 | - */ | |
352 | + */ | |
353 | 353 | flutuante: function(){ |
354 | 354 | var janela,temp,cabecalho,minimiza,idold,corpo,altura; |
355 | 355 | cabecalho = function(){}; |
... | ... | @@ -391,7 +391,7 @@ i3GEO.arvoreDeTemas = { |
391 | 391 | i3GEO.arvoreDeTemas.IDHTML = "i3GEOFcatalogo_corpo"; |
392 | 392 | i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,""); |
393 | 393 | i3GEO.arvoreDeTemas.IDHTML = idold; |
394 | - }, | |
394 | + }, | |
395 | 395 | /* |
396 | 396 | Function: listaWMS |
397 | 397 | |
... | ... | @@ -416,7 +416,7 @@ i3GEO.arvoreDeTemas = { |
416 | 416 | {html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0,expanded:false,enableHighlight:false}, |
417 | 417 | node |
418 | 418 | ); |
419 | - tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS, 1); | |
419 | + tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS, 1); | |
420 | 420 | } |
421 | 421 | node.loadComplete(); |
422 | 422 | }; |
... | ... | @@ -546,7 +546,7 @@ i3GEO.arvoreDeTemas = { |
546 | 546 | m = i3GEO.arvoreDeTemas.IDSMENUS.length; |
547 | 547 | for (i=0, j=c; i<j; i += 1){ |
548 | 548 | for (k=0, jj=m; k<jj; k +=1 ){ |
549 | - if(retorno.data[i].idmenu === i3GEO.arvoreDeTemas.IDSMENUS[k]) | |
549 | + if(retorno.data[i].idmenu === i3GEO.arvoreDeTemas.IDSMENUS[k]) | |
550 | 550 | {i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i]);} |
551 | 551 | } |
552 | 552 | } |
... | ... | @@ -561,7 +561,7 @@ i3GEO.arvoreDeTemas = { |
561 | 561 | |
562 | 562 | Lista os grupos de um menu. |
563 | 563 | |
564 | - O resultado e armazenado em i3GEO.arvoreDetemas.GRUPOS | |
564 | + O resultado e armazenado em i3GEO.arvoreDetemas.GRUPOS | |
565 | 565 | |
566 | 566 | Parametros: |
567 | 567 | |
... | ... | @@ -828,7 +828,7 @@ i3GEO.arvoreDeTemas = { |
828 | 828 | /* |
829 | 829 | Function: montaArvore |
830 | 830 | |
831 | - Monta a arvore incluindo os nos do primeiro nivel. | |
831 | + Monta a arvore incluindo os nos do primeiro nivel. | |
832 | 832 | |
833 | 833 | A opcao de carga dinamica dos nos filhos e definida para a montagem dos grupos. |
834 | 834 | */ |
... | ... | @@ -921,7 +921,7 @@ i3GEO.arvoreDeTemas = { |
921 | 921 | }, |
922 | 922 | root |
923 | 923 | ); |
924 | - } | |
924 | + } | |
925 | 925 | // |
926 | 926 | //wms |
927 | 927 | // |
... | ... | @@ -1067,12 +1067,12 @@ i3GEO.arvoreDeTemas = { |
1067 | 1067 | i3GEO.arvoreDeTemas.ARVORE.draw(); |
1068 | 1068 | }; |
1069 | 1069 | i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,temp); |
1070 | - } | |
1070 | + } | |
1071 | 1071 | }, |
1072 | 1072 | /* |
1073 | 1073 | Function: montaGrupos |
1074 | 1074 | |
1075 | - Monta a lista de grupos de um no principal da arvore. | |
1075 | + Monta a lista de grupos de um no principal da arvore. | |
1076 | 1076 | |
1077 | 1077 | A opcao de carga dinamica dos nos filhos e definida para a montagem dos sub-grupos. |
1078 | 1078 | */ |
... | ... | @@ -1133,7 +1133,7 @@ i3GEO.arvoreDeTemas = { |
1133 | 1133 | /* |
1134 | 1134 | Function: montaSubGrupos |
1135 | 1135 | |
1136 | - Monta a lista de sub-grupos de um no do tipo grupo. | |
1136 | + Monta a lista de sub-grupos de um no do tipo grupo. | |
1137 | 1137 | |
1138 | 1138 | A opcao de carga dinamica dos nos filhos e definida para a montagem dos temas. |
1139 | 1139 | */ |
... | ... | @@ -1207,7 +1207,7 @@ i3GEO.arvoreDeTemas = { |
1207 | 1207 | /* |
1208 | 1208 | Function: montaTemas |
1209 | 1209 | |
1210 | - Monta a lista de temas de um no. | |
1210 | + Monta a lista de temas de um no. | |
1211 | 1211 | */ |
1212 | 1212 | montaTemas: function(node){ |
1213 | 1213 | if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeTemas.montaTemas()");} |
... | ... | @@ -1260,7 +1260,7 @@ i3GEO.arvoreDeTemas = { |
1260 | 1260 | |
1261 | 1261 | Parametro: |
1262 | 1262 | |
1263 | - node {node} - no onde sera criada a lista | |
1263 | + node {node} - no onde sera criada a lista | |
1264 | 1264 | */ |
1265 | 1265 | montaDir: function(node){ |
1266 | 1266 | if(typeof(console) !== 'undefined'){console.info("i3GEO.arvoreDeTemas.montaDir()");} |
... | ... | @@ -1390,7 +1390,7 @@ i3GEO.arvoreDeTemas = { |
1390 | 1390 | {isLeaf:true,enableHighlight:false,expanded:false,html:html}, |
1391 | 1391 | node |
1392 | 1392 | ); |
1393 | - } | |
1393 | + } | |
1394 | 1394 | if (node.data.permitecomentario && node.data.permitecomentario !== "nao" && i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios === true){ |
1395 | 1395 | html = "<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >"+$trad("x19")+"</a>"; |
1396 | 1396 | new YAHOO.widget.HTMLNode( |
... | ... | @@ -1462,7 +1462,7 @@ i3GEO.arvoreDeTemas = { |
1462 | 1462 | if(OPCOESADICIONAIS.carregaKml === true){ |
1463 | 1463 | ins += "<td><img "+estilo("carregarKml")+" onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' title='Kml'/></td>"; |
1464 | 1464 | t += 20; |
1465 | - } | |
1465 | + } | |
1466 | 1466 | if(OPCOESADICIONAIS.conectarwms === true){ |
1467 | 1467 | ins += "<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' title='"+$trad("a4")+"'/></td>"; |
1468 | 1468 | t += 20; |
... | ... | @@ -1942,7 +1942,7 @@ i3GEO.arvoreDeTemas = { |
1942 | 1942 | {ins = "<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>";} |
1943 | 1943 | else |
1944 | 1944 | {ins = "<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>";} |
1945 | - | |
1945 | + | |
1946 | 1946 | if(typeof(retorno.data) !== 'undefined') |
1947 | 1947 | {retorno = retorno.data.temas;} |
1948 | 1948 | sg = retorno.length; |
... | ... | @@ -2020,7 +2020,7 @@ i3GEO.arvoreDeTemas = { |
2020 | 2020 | " <td>KML ou KMZ</td>" + |
2021 | 2021 | " </tr>"; |
2022 | 2022 | } |
2023 | - ins += " </table>"; | |
2023 | + ins += " </table>"; | |
2024 | 2024 | $i(janela[2].id).innerHTML = ins;; |
2025 | 2025 | }, |
2026 | 2026 | /* |
... | ... | @@ -2055,7 +2055,7 @@ i3GEO.arvoreDeTemas = { |
2055 | 2055 | ins = "" + |
2056 | 2056 | " <p class=paragrafo style='width:90%' ><b>Tipo de conex&aatilde;o</b><br><br>" + |
2057 | 2057 | " <table class=lista6 style=left:20px;position:relative >"; |
2058 | - | |
2058 | + | |
2059 | 2059 | if(OPCOESADICIONAIS.carregaKml === true){ |
2060 | 2060 | ins += "<tr>" + |
2061 | 2061 | " <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' /></td>" + |
... | ... | @@ -2085,8 +2085,8 @@ i3GEO.arvoreDeTemas = { |
2085 | 2085 | " <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeojson()' /></td>" + |
2086 | 2086 | " <td>GeoJson</td>" + |
2087 | 2087 | " </tr>"; |
2088 | - } | |
2089 | - ins += " </table>"; | |
2088 | + } | |
2089 | + ins += " </table>"; | |
2090 | 2090 | $i(janela[2].id).innerHTML = ins; |
2091 | 2091 | }, |
2092 | 2092 | |
... | ... | @@ -2113,7 +2113,7 @@ i3GEO.arvoreDeTemas = { |
2113 | 2113 | */ |
2114 | 2114 | buscaInde: function(){ |
2115 | 2115 | i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/index.js","i3GEOF.buscainde.criaJanelaFlutuante()","i3GEOF.buscainde_script"); |
2116 | - }, | |
2116 | + }, | |
2117 | 2117 | /* |
2118 | 2118 | Function: nuvemTags |
2119 | 2119 | ... | ... |
classesjs/classe_barradebotoes.js
... | ... | @@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | 32 | if(typeof(i3GEO) === 'undefined'){ |
33 | - i3GEO = []; | |
33 | + var i3GEO = {}; | |
34 | 34 | } |
35 | 35 | /* |
36 | 36 | Classe: i3GEO.barradebotoes |
... | ... | @@ -56,7 +56,7 @@ i3GEO.barraDeBotoes = { |
56 | 56 | Propriedade: TIPO |
57 | 57 | |
58 | 58 | Tipo de barra. |
59 | - | |
59 | + | |
60 | 60 | Por padrão, utiliza a biblioteca YUI para construir a barra, opcionalmente pode-se utilizar o tipo "olho de peixe". |
61 | 61 | |
62 | 62 | Tipo: |
... | ... | @@ -64,7 +64,7 @@ i3GEO.barraDeBotoes = { |
64 | 64 | |
65 | 65 | Default: |
66 | 66 | {yui} |
67 | - | |
67 | + | |
68 | 68 | Valores: |
69 | 69 | {"yui","olhodepeixe"} |
70 | 70 | */ |
... | ... | @@ -73,7 +73,7 @@ i3GEO.barraDeBotoes = { |
73 | 73 | Propriedade: OFFSET |
74 | 74 | |
75 | 75 | Ajuste do deslocamento vertical da barra (válido apenas para o tipo "olhodepeixe") |
76 | - | |
76 | + | |
77 | 77 | Desloca a barra em uma determinada quantidade de pixels. Valores negativos fazem a barra subir. |
78 | 78 | |
79 | 79 | Tipo: |
... | ... | @@ -81,13 +81,13 @@ i3GEO.barraDeBotoes = { |
81 | 81 | |
82 | 82 | Default: |
83 | 83 | {-205} |
84 | - */ | |
84 | + */ | |
85 | 85 | OFFSET: -205, |
86 | 86 | /* |
87 | 87 | Propriedade: MAXBOTOES |
88 | 88 | |
89 | 89 | Número de botões iniciais (válido apenas para o tipo "olhodepeixe") |
90 | - | |
90 | + | |
91 | 91 | Se for 0, todos os botões serão mostrados |
92 | 92 | |
93 | 93 | Tipo: |
... | ... | @@ -95,7 +95,7 @@ i3GEO.barraDeBotoes = { |
95 | 95 | |
96 | 96 | Default: |
97 | 97 | {10} |
98 | - */ | |
98 | + */ | |
99 | 99 | MAXBOTOES: 11, |
100 | 100 | /* |
101 | 101 | Propriedade: AJUDA |
... | ... | @@ -119,7 +119,7 @@ i3GEO.barraDeBotoes = { |
119 | 119 | |
120 | 120 | Valores: |
121 | 121 | {"horizontal","vertical"} |
122 | - | |
122 | + | |
123 | 123 | Default: |
124 | 124 | {"vertical"} |
125 | 125 | */ |
... | ... | @@ -131,11 +131,11 @@ i3GEO.barraDeBotoes = { |
131 | 131 | |
132 | 132 | Tipo: |
133 | 133 | {numeric} |
134 | - | |
134 | + | |
135 | 135 | Default: |
136 | 136 | {350} |
137 | 137 | */ |
138 | - HORIZONTALW: 350, | |
138 | + HORIZONTALW: 350, | |
139 | 139 | /* |
140 | 140 | Propriedade: TIPOAJUDA |
141 | 141 | |
... | ... | @@ -146,7 +146,7 @@ i3GEO.barraDeBotoes = { |
146 | 146 | |
147 | 147 | Valores: |
148 | 148 | {"horizontal","vertical","balao"} |
149 | - | |
149 | + | |
150 | 150 | Default: |
151 | 151 | {"horizontal"} |
152 | 152 | */ |
... | ... | @@ -267,10 +267,10 @@ i3GEO.barraDeBotoes = { |
267 | 267 | Essa opção só funciona se i3GEO.barraDeBotoes.AUTO = true |
268 | 268 | |
269 | 269 | Vc pode também alterar a ordem dos botoes ou adicionar novos |
270 | - | |
270 | + | |
271 | 271 | Na barra de botões do tipo "yui", as chaves serão adicionadas como o atributo "id" em cada botão. Nesse caso, |
272 | 272 | é possível definir o estilo CSS para cada botão (veja em i3geo/css/botoes2.css). |
273 | - | |
273 | + | |
274 | 274 | A ativação de cada botão, ou seja, a função que é executada ao ser feito o clique, é definida em i3GEO.configura.funcoesBotoes |
275 | 275 | |
276 | 276 | Default: |
... | ... | @@ -278,9 +278,9 @@ i3GEO.barraDeBotoes = { |
278 | 278 | INCLUIBOTAO: { |
279 | 279 | |
280 | 280 | zoomli: false, |
281 | - | |
281 | + | |
282 | 282 | zoomiauto: false, |
283 | - | |
283 | + | |
284 | 284 | zoomoauto: false |
285 | 285 | |
286 | 286 | pan: false, |
... | ... | @@ -308,7 +308,7 @@ i3GEO.barraDeBotoes = { |
308 | 308 | textofid: true, |
309 | 309 | |
310 | 310 | selecao: true, |
311 | - | |
311 | + | |
312 | 312 | barraedicao: false, |
313 | 313 | |
314 | 314 | google: true, |
... | ... | @@ -326,7 +326,7 @@ i3GEO.barraDeBotoes = { |
326 | 326 | inseregrafico: true, |
327 | 327 | |
328 | 328 | v3d: true, |
329 | - | |
329 | + | |
330 | 330 | localizar: true |
331 | 331 | } |
332 | 332 | |
... | ... | @@ -346,7 +346,7 @@ i3GEO.barraDeBotoes = { |
346 | 346 | area: true, |
347 | 347 | imprimir: true, |
348 | 348 | selecao: true, |
349 | - google: true, | |
349 | + google: true, | |
350 | 350 | barraedicao: true, |
351 | 351 | referencia: true, |
352 | 352 | exten: true, |
... | ... | @@ -363,66 +363,66 @@ i3GEO.barraDeBotoes = { |
363 | 363 | }, |
364 | 364 | /* |
365 | 365 | Propriedade: ICONEBOTAO |
366 | - | |
366 | + | |
367 | 367 | Ícones utilizados em cada um dos botões da barra. |
368 | - | |
368 | + | |
369 | 369 | Esses ícones são utilizados apenas se i3GEO.barraDeBotoes.TIPO = "olhodepeixe". Para cada elemento existente em |
370 | 370 | i3GEO.barraDeBotoes.INCLUIBOTAO deve existir um elemento nesse objeto. A chave de cada elemento é a mesma do objeto INCLUIBOTAO. |
371 | 371 | O endereço da imagem será complementado pelo i3geo, adicionando no início da string o valor da variável i3GEO.configura.locaplic |
372 | - | |
372 | + | |
373 | 373 | Default: |
374 | - | |
374 | + | |
375 | 375 | ICONEBOTAO: { |
376 | - | |
376 | + | |
377 | 377 | zoomli: "/imagens/gisicons/eudock/zoom-region.png", |
378 | - | |
378 | + | |
379 | 379 | pan: "/imagens/gisicons/eudock/pan.png", |
380 | - | |
380 | + | |
381 | 381 | zoomtot: "/imagens/gisicons/eudock/zoom-extent.png", |
382 | - | |
382 | + | |
383 | 383 | identifica: "/imagens/gisicons/eudock/identify.png", |
384 | - | |
384 | + | |
385 | 385 | identificaBalao: "/imagens/gisicons/eudock/tips.png", |
386 | - | |
386 | + | |
387 | 387 | mede: "/imagens/gisicons/eudock/length-measure.png", |
388 | - | |
388 | + | |
389 | 389 | area: "/imagens/gisicons/eudock/area-measure.png", |
390 | - | |
390 | + | |
391 | 391 | imprimir: "/imagens/gisicons/eudock/print.png", |
392 | - | |
392 | + | |
393 | 393 | reinicia: "/imagens/gisicons/eudock/redraw.png", |
394 | - | |
394 | + | |
395 | 395 | exten: "/imagens/gisicons/eudock/map-extent-info.png", |
396 | - | |
396 | + | |
397 | 397 | referencia: "/imagens/gisicons/eudock/map-reference.png", |
398 | - | |
398 | + | |
399 | 399 | inserexy: "/imagens/gisicons/eudock/point-create.png", |
400 | - | |
400 | + | |
401 | 401 | textofid: "/imagens/gisicons/eudock/text-add.png", |
402 | - | |
402 | + | |
403 | 403 | selecao: "/imagens/gisicons/eudock/select.png", |
404 | - | |
404 | + | |
405 | 405 | google: "/imagens/gisicons/eudock/google-map.png", |
406 | - | |
406 | + | |
407 | 407 | buscafotos: "/imagens/gisicons/eudock/fotos.png", |
408 | - | |
408 | + | |
409 | 409 | wiki: "/imagens/gisicons/eudock/wiki.png", |
410 | - | |
410 | + | |
411 | 411 | metar: "/imagens/gisicons/eudock/metar.png", |
412 | - | |
412 | + | |
413 | 413 | lentei: "/imagens/gisicons/eudock/lente.png", |
414 | - | |
414 | + | |
415 | 415 | confluence: "/imagens/gisicons/eudock/confluence.png", |
416 | - | |
416 | + | |
417 | 417 | inseregrafico: "/imagens/gisicons/eudock/grafico.png", |
418 | - | |
418 | + | |
419 | 419 | v3d: "/imagens/gisicons/eudock/v3d.png", |
420 | - | |
420 | + | |
421 | 421 | barraedicao: "/imagens/gisicons/eudock/editopen.png", |
422 | - | |
422 | + | |
423 | 423 | localizar: "/imagens/gisicons/eudock/search.png" |
424 | - } | |
425 | - | |
424 | + } | |
425 | + | |
426 | 426 | Type: |
427 | 427 | {obj} |
428 | 428 | */ |
... | ... | @@ -453,7 +453,7 @@ i3GEO.barraDeBotoes = { |
453 | 453 | v3d: "/imagens/gisicons/eudock/v3d.png", |
454 | 454 | barraedicao: "/imagens/gisicons/eudock/editopen.png", |
455 | 455 | localizar: "/imagens/gisicons/eudock/search.png" |
456 | - }, | |
456 | + }, | |
457 | 457 | /* |
458 | 458 | Propriedade: TEMPLATEBOTAO |
459 | 459 | |
... | ... | @@ -527,7 +527,7 @@ i3GEO.barraDeBotoes = { |
527 | 527 | ativaPadrao: function(){ |
528 | 528 | if(i3GEO.barraDeBotoes.ATIVA === true){ |
529 | 529 | try{ |
530 | - var botao = i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO); | |
530 | + var botao = i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO); | |
531 | 531 | if(botao.funcaoonclick){ |
532 | 532 | botao.funcaoonclick.call(); |
533 | 533 | } |
... | ... | @@ -702,15 +702,15 @@ i3GEO.barraDeBotoes = { |
702 | 702 | }, |
703 | 703 | /* |
704 | 704 | Function: execBotao |
705 | - | |
705 | + | |
706 | 706 | Com base no código de um botão (iddiv), obtém a função armazenada em i3GEO.barraDeBotoes.LISTABOTOES e executa. |
707 | - | |
707 | + | |
708 | 708 | Parametros: |
709 | - | |
709 | + | |
710 | 710 | id {string} - identificador do botão, conforme definido no elemento iddiv de i3GEO.barraDeBotoes.LISTABOTOES |
711 | - | |
711 | + | |
712 | 712 | x {numeric} - (opcional) posição em pixels da tela onde foi feito o clique do mouse |
713 | - | |
713 | + | |
714 | 714 | y {numeric} - (opcional) posição em pixels da tela onde foi feito o clique do mouse |
715 | 715 | */ |
716 | 716 | execBotao: function(id,x,y,posX,posY){ |
... | ... | @@ -742,11 +742,11 @@ i3GEO.barraDeBotoes = { |
742 | 742 | }, |
743 | 743 | /* |
744 | 744 | Function: defBotao |
745 | - | |
745 | + | |
746 | 746 | Obtém as definições de um botão conforme o seu código (iddiv) |
747 | - | |
747 | + | |
748 | 748 | Retorno: |
749 | - | |
749 | + | |
750 | 750 | {objeto} - ver i3GEO.barraDeBotoes.LISTABOTOES |
751 | 751 | */ |
752 | 752 | defBotao: function(iddiv){ |
... | ... | @@ -762,14 +762,14 @@ i3GEO.barraDeBotoes = { |
762 | 762 | while (b--); |
763 | 763 | } |
764 | 764 | return false; |
765 | - }, | |
765 | + }, | |
766 | 766 | /* |
767 | 767 | Function: inicializaBarraOP |
768 | - | |
768 | + | |
769 | 769 | Inicializa a barra de botões quando for do tipo "olhodepeixe" |
770 | - | |
771 | - O objeto euEnv armazena todas as características da barra | |
772 | - | |
770 | + | |
771 | + O objeto euEnv armazena todas as características da barra | |
772 | + | |
773 | 773 | */ |
774 | 774 | inicializaBarraOP: function(){ |
775 | 775 | if(i3GEO.barraDeBotoes.ATIVA === false){ |
... | ... | @@ -788,18 +788,18 @@ i3GEO.barraDeBotoes = { |
788 | 788 | preload; |
789 | 789 | preload = new Image(); |
790 | 790 | preload.src = i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png"; |
791 | - dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1 + i3GEO.barraDeBotoes.OFFSET,euUP); | |
791 | + dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1 + i3GEO.barraDeBotoes.OFFSET,euUP); | |
792 | 792 | if(i3GEO.barraDeBotoes.MAXBOTOES >= chaves.length) |
793 | 793 | {temp = "dockBg-r2.png";} |
794 | 794 | dock.setBar({ |
795 | 795 | left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-l.png"}}, |
796 | 796 | horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}}, |
797 | 797 | right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}} |
798 | - }); | |
799 | - dock.setIconsOffset(7); | |
798 | + }); | |
799 | + dock.setIconsOffset(7); | |
800 | 800 | if(i3GEO.barraDeBotoes.MAXBOTOES > 0) |
801 | 801 | {n = i3GEO.barraDeBotoes.MAXBOTOES;} |
802 | - | |
802 | + | |
803 | 803 | for(i=0;i<n;i+=1){ |
804 | 804 | if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] && i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] === true){ |
805 | 805 | botao = i3GEO.barraDeBotoes.defBotao(chaves[i]); |
... | ... | @@ -815,7 +815,7 @@ i3GEO.barraDeBotoes = { |
815 | 815 | if(botao.titulo != undefined) |
816 | 816 | {titulo = botao.titulo;} |
817 | 817 | else |
818 | - {titulo = "";} | |
818 | + {titulo = "";} | |
819 | 819 | } |
820 | 820 | dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{ |
821 | 821 | mouseInsideClick : function(x,y,id,posX,posY){ |
... | ... | @@ -860,7 +860,7 @@ i3GEO.barraDeBotoes = { |
860 | 860 | if(botao.titulo != undefined) |
861 | 861 | {titulo = botao.titulo;} |
862 | 862 | else |
863 | - {titulo = "";} | |
863 | + {titulo = "";} | |
864 | 864 | } |
865 | 865 | dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{ |
866 | 866 | mouseInsideClick : function(x,y,id,posX){ |
... | ... | @@ -871,7 +871,7 @@ i3GEO.barraDeBotoes = { |
871 | 871 | titulo: titulo |
872 | 872 | }); |
873 | 873 | } |
874 | - } | |
874 | + } | |
875 | 875 | } |
876 | 876 | }; |
877 | 877 | //div que mostra o título do botão |
... | ... | @@ -892,7 +892,7 @@ i3GEO.barraDeBotoes = { |
892 | 892 | Inicializa a barra de botões |
893 | 893 | |
894 | 894 | A barra de zoom é inserida automaticamente na barra de botoes 1 se esta existir |
895 | - | |
895 | + | |
896 | 896 | Caso i3GEO.barraDeBotoes.TIPO === "olhodepeixe" os par�metros são ignorados. |
897 | 897 | |
898 | 898 | Exemplo: |
... | ... | @@ -1047,7 +1047,7 @@ i3GEO.barraDeBotoes = { |
1047 | 1047 | elementos = $i(idconteudonovo+"_").getElementsByTagName("img"); |
1048 | 1048 | nelementos = elementos.length; |
1049 | 1049 | if(i3GEO.barraDeBotoes.ORIENTACAO === "horizontal") |
1050 | - {numerobotoes = 100;} | |
1050 | + {numerobotoes = 100;} | |
1051 | 1051 | //faz o cálculo do número de botões que devem ficar visíveis em função do tamanho da barra |
1052 | 1052 | if(this.AUTOALTURA === true ||(numerobotoes < nelementos)){ |
1053 | 1053 | if(elementos[0].id === "sobeferramentas"){ |
... | ... | @@ -1232,7 +1232,7 @@ i3GEO.barraDeBotoes = { |
1232 | 1232 | |
1233 | 1233 | Parametro: |
1234 | 1234 | |
1235 | - indice {Integer} - índice do array BARRAS que guarda os objetos YAHOO com | |
1235 | + indice {Integer} - índice do array BARRAS que guarda os objetos YAHOO com | |
1236 | 1236 | as barras Se não for definido, todas as barras serão reativadas |
1237 | 1237 | */ |
1238 | 1238 | reativa: function(indice){ |
... | ... | @@ -1283,7 +1283,7 @@ i3GEO.barraDeBotoes = { |
1283 | 1283 | return; |
1284 | 1284 | } |
1285 | 1285 | var i,n,temp,novoel,barraZoom,x,y, |
1286 | - BARRAS = i3GEO.barraDeBotoes.BARRAS, | |
1286 | + BARRAS = i3GEO.barraDeBotoes.BARRAS, | |
1287 | 1287 | iu = i3GEO.util; |
1288 | 1288 | i3GEO.barraDeBotoes.BARRAS = []; |
1289 | 1289 | n = BARRAS.length; |
... | ... | @@ -1298,7 +1298,7 @@ i3GEO.barraDeBotoes = { |
1298 | 1298 | } |
1299 | 1299 | novoel = $i("barraTemporaria"+i); |
1300 | 1300 | novoel.innerHTML = $i(BARRAS[i].id+"_").innerHTML; |
1301 | - | |
1301 | + | |
1302 | 1302 | //verifica se tem o slide de zoom |
1303 | 1303 | barraZoom = false; |
1304 | 1304 | temp = $i("vertMaisZoom"); |
... | ... | @@ -1525,7 +1525,7 @@ i3GEO.barraDeBotoes = { |
1525 | 1525 | fontWeight: "normal", |
1526 | 1526 | labelAlign: "lb", |
1527 | 1527 | labelXOffset: "3", |
1528 | - labelYOffset: "3" | |
1528 | + labelYOffset: "3" | |
1529 | 1529 | }, |
1530 | 1530 | "Line": { |
1531 | 1531 | strokeWidth: "${strokeWidth}", |
... | ... | @@ -1547,7 +1547,7 @@ i3GEO.barraDeBotoes = { |
1547 | 1547 | new OpenLayers.Rule({symbolizer: sketchSymbolizers}) |
1548 | 1548 | ]); |
1549 | 1549 | i3GEO.editorOL.layergrafico = new OpenLayers.Layer.Vector("Edição",{styleMap:styleMap1,displayInLayerSwitcher:false,visibility:true}); |
1550 | - i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]); | |
1550 | + i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]); | |
1551 | 1551 | i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes); |
1552 | 1552 | } |
1553 | 1553 | } | ... | ... |
classesjs/classe_calculo.js
... | ... | @@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | 32 | if(typeof(i3GEO) === 'undefined'){ |
33 | - i3GEO = []; | |
33 | + var i3GEO = {}; | |
34 | 34 | } |
35 | 35 | /* |
36 | 36 | Classe: i3GEO.calculo |
... | ... | @@ -38,7 +38,6 @@ Classe: i3GEO.calculo |
38 | 38 | Utilitários para cálculos. |
39 | 39 | */ |
40 | 40 | i3GEO.calculo = { |
41 | - | |
42 | 41 | /* |
43 | 42 | Propriedade: metododistancia |
44 | 43 | |
... | ... | @@ -345,11 +344,11 @@ i3GEO.calculo = { |
345 | 344 | if(typeof(console) !== 'undefined'){console.info("i3GEO.calculo.distancia()");} |
346 | 345 | var dLat,dLon,a,c,d; |
347 | 346 | dLat = ((lat2-lat1))* Math.PI / 180; |
348 | - dLon = ((lon2-lon1)) * Math.PI / 180; | |
347 | + dLon = ((lon2-lon1)) * Math.PI / 180; | |
349 | 348 | a = Math.sin(dLat/2) * Math.sin(dLat/2) + |
350 | - Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * | |
351 | - Math.sin(dLon/2) * Math.sin(dLon/2); | |
352 | - c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); | |
349 | + Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * | |
350 | + Math.sin(dLon/2) * Math.sin(dLon/2); | |
351 | + c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); | |
353 | 352 | d = 6378.137 * c; |
354 | 353 | return d; |
355 | 354 | }, | ... | ... |
classesjs/classe_configura.js
classesjs/classe_coordenadas.js
... | ... | @@ -27,7 +27,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
27 | 27 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
28 | 28 | */ |
29 | 29 | if(typeof(i3GEO) === 'undefined'){ |
30 | - i3GEO = []; | |
30 | + var i3GEO = {}; | |
31 | 31 | } |
32 | 32 | /* |
33 | 33 | Classe: i3GEO.coordenadas |
... | ... | @@ -180,7 +180,7 @@ i3GEO.coordenadas = { |
180 | 180 | |
181 | 181 | i3GEO.coordenadas.PARAMETROS.mostraCoordenadas.idhtml = ""; |
182 | 182 | |
183 | - Nas versões anteriores à 4.5 do i3Geo utilizava-se um | |
183 | + Nas versões anteriores à 4.5 do i3Geo utilizava-se um | |
184 | 184 | |
185 | 185 | Default: |
186 | 186 | |
... | ... | @@ -206,7 +206,7 @@ i3GEO.coordenadas = { |
206 | 206 | }, |
207 | 207 | /* |
208 | 208 | Variavel: MODOTEXTO |
209 | - | |
209 | + | |
210 | 210 | Representação das coordenadas no modo texto |
211 | 211 | */ |
212 | 212 | MODOTEXTO: "", |
... | ... | @@ -219,7 +219,7 @@ i3GEO.coordenadas = { |
219 | 219 | |
220 | 220 | As coordenadas são obtidas por meio de uma chamada AJAX. |
221 | 221 | |
222 | - Se você não quer essa função no mapa, elimine o elemento HTML existente no mapa que contenha o | |
222 | + Se você não quer essa função no mapa, elimine o elemento HTML existente no mapa que contenha o | |
223 | 223 | id definido em i3GEO.coordenadas.PARAMETROS (mostraCoordenadasUTM) ou altere a variável i3GEO.eventos.MOUSEPARADO |
224 | 224 | |
225 | 225 | Se i3GEO.coordenadas.mostraCoordenadasUTM.idhtml for igual a i3GEO.coordenadas.mostraCoordenadasGEO.idhtml |
... | ... | @@ -291,7 +291,7 @@ i3GEO.coordenadas = { |
291 | 291 | |
292 | 292 | Obtém e mostra as coordenadas Geográficas da posição do mouse sobre o mapa. |
293 | 293 | |
294 | - Se você não quer essa função no mapa, elimine o elemento HTML que contenha o | |
294 | + Se você não quer essa função no mapa, elimine o elemento HTML que contenha o | |
295 | 295 | id definido em i3GEO.coordenadas.PARAMETROS, por default é "localizarxy" |
296 | 296 | |
297 | 297 | Parametro: |
... | ... | @@ -426,7 +426,7 @@ i3GEO.coordenadas = { |
426 | 426 | "<td>"+$inputText("","",prefixo+"X","X","12","00")+" </td>" + |
427 | 427 | "<td>Y:"+$inputText("","",prefixo+"Y","Y","12","00")+" </td>" + |
428 | 428 | "<td>Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+" </td>" + |
429 | - | |
429 | + | |
430 | 430 | "</tr></table>"; |
431 | 431 | return ins; |
432 | 432 | }, |
... | ... | @@ -650,7 +650,7 @@ i3GEO.coordenadas = { |
650 | 650 | if($i(onde)) |
651 | 651 | {$i(onde).innerHTML = "";} |
652 | 652 | onde = "i3GEOJanelaCoordenadas_corpo"; |
653 | - | |
653 | + | |
654 | 654 | ins += "<br><a href='#' style='cursor:pointer;color:blue' onclick='new YAHOO.util.KeyListener(document.body,{alt:true,keys:67},{fn: function(type, args, obj){alert(i3GEO.coordenadas.MODOTEXTO);}}).enable();' >" + |
655 | 655 | "Clique aqui para ativar Alt+C para poder capturar as coordenadas</a>"; |
656 | 656 | } |
... | ... | @@ -672,7 +672,7 @@ i3GEO.coordenadas = { |
672 | 672 | temp = i3GEO.coordenadas.config[tipos[i]]; |
673 | 673 | if(temp.ativo === true){ |
674 | 674 | if(temp.tipo === "geo"){ |
675 | - if(ativaMovimento === true){ | |
675 | + if(ativaMovimento === true){ | |
676 | 676 | if(i3GEO.Interface.TABLET === true){ |
677 | 677 | if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')") < 0) |
678 | 678 | {i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')");} |
... | ... | @@ -680,7 +680,7 @@ i3GEO.coordenadas = { |
680 | 680 | else{ |
681 | 681 | if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')") < 0) |
682 | 682 | {i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')");} |
683 | - } | |
683 | + } | |
684 | 684 | } |
685 | 685 | if(typeof(x) !== 'undefined'){ |
686 | 686 | atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0]); |
... | ... | @@ -695,7 +695,7 @@ i3GEO.coordenadas = { |
695 | 695 | else{ |
696 | 696 | if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')") < 0) |
697 | 697 | {i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')");} |
698 | - } | |
698 | + } | |
699 | 699 | } |
700 | 700 | if(typeof(x) !== 'undefined'){ |
701 | 701 | i3GEO.coordenadas.atualizaProj4(onde,tipos[i],x,y); |
... | ... | @@ -711,7 +711,7 @@ i3GEO.coordenadas = { |
711 | 711 | else{ |
712 | 712 | if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.limpaModoTexto()") < 0) |
713 | 713 | {i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.limpaModoTexto()");} |
714 | - } | |
714 | + } | |
715 | 715 | } |
716 | 716 | if(i3GEO.coordenadas.formato === "bloco") |
717 | 717 | {i3GEO.coordenadas.ativaBloco(onde);} | ... | ... |
classesjs/classe_desenho.js
... | ... | @@ -29,8 +29,8 @@ GNU junto com este programa; se n&atilde;o, escreva para a |
29 | 29 | Free Software Foundation, Inc., no endereço |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | -if (typeof(i3GEO) === 'undefined'){ | |
33 | - i3GEO = []; | |
32 | +if(typeof(i3GEO) === 'undefined'){ | |
33 | + var i3GEO = {}; | |
34 | 34 | } |
35 | 35 | /* |
36 | 36 | Classe: i3GEO.desenho |
... | ... | @@ -176,7 +176,7 @@ i3GEO.desenho = { |
176 | 176 | Function: criaDivContainer |
177 | 177 | |
178 | 178 | Cria o elemento DIV que será utilizado para renderizar os elementos gráficos. |
179 | - Nesse DIV serão incluídos os elementos de desenho em SVG ou VML | |
179 | + Nesse DIV serão incluídos os elementos de desenho em SVG ou VML | |
180 | 180 | |
181 | 181 | O DIV recebe como ID "divGeometriasTemp" |
182 | 182 | ... | ... |
classesjs/classe_eventos.js
... | ... | @@ -29,7 +29,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
29 | 29 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
30 | 30 | */ |
31 | 31 | if(typeof(i3GEO) === 'undefined'){ |
32 | - i3GEO = []; | |
32 | + var i3GEO = {}; | |
33 | 33 | } |
34 | 34 | objposicaocursor = { |
35 | 35 | ddx: "", |
... | ... | @@ -95,7 +95,7 @@ i3GEO.eventos = { |
95 | 95 | /* |
96 | 96 | Propriedade: MOUSEPARADO |
97 | 97 | |
98 | - Armazena as funções que serão executadas quando o usuário estaciona o mouse sobre o mapa | |
98 | + Armazena as funções que serão executadas quando o usuário estaciona o mouse sobre o mapa | |
99 | 99 | por alguns instantes. |
100 | 100 | |
101 | 101 | Tipo: |
... | ... | @@ -108,7 +108,7 @@ i3GEO.eventos = { |
108 | 108 | /* |
109 | 109 | Propriedade: MOUSEMOVE |
110 | 110 | |
111 | - Armazena as funções que serão executadas quando o usuário move o mouse sobre o mapa | |
111 | + Armazena as funções que serão executadas quando o usuário move o mouse sobre o mapa | |
112 | 112 | |
113 | 113 | Tipo: |
114 | 114 | {Array} |
... | ... | @@ -120,7 +120,7 @@ i3GEO.eventos = { |
120 | 120 | /* |
121 | 121 | Propriedade: MOUSEDOWN |
122 | 122 | |
123 | - Armazena as funções que serão executadas quando o usuário pressiona o botão do mouse sobre o mapa | |
123 | + Armazena as funções que serão executadas quando o usuário pressiona o botão do mouse sobre o mapa | |
124 | 124 | |
125 | 125 | Tipo: |
126 | 126 | {Array} |
... | ... | @@ -132,7 +132,7 @@ i3GEO.eventos = { |
132 | 132 | /* |
133 | 133 | Propriedade: MOUSEUP |
134 | 134 | |
135 | - Armazena as funções que serão executadas quando o usuário solta o botão do mouse sobre o mapa | |
135 | + Armazena as funções que serão executadas quando o usuário solta o botão do mouse sobre o mapa | |
136 | 136 | |
137 | 137 | Tipo: |
138 | 138 | {Array} |
... | ... | @@ -144,7 +144,7 @@ i3GEO.eventos = { |
144 | 144 | /* |
145 | 145 | Propriedade: MOUSECLIQUE |
146 | 146 | |
147 | - Armazena as funções que serão executadas quando o usuário clica sobre o mapa | |
147 | + Armazena as funções que serão executadas quando o usuário clica sobre o mapa | |
148 | 148 | |
149 | 149 | Tipo: |
150 | 150 | {Array} |
... | ... | @@ -376,7 +376,7 @@ i3GEO.eventos = { |
376 | 376 | //celula e extent são necessários para se fazer a |
377 | 377 | //conversão de coordenadas de tela para coordenadas geográficas |
378 | 378 | //esses valores são obtidos das funções ajax que redesenham ou inicializam o mapa |
379 | - // | |
379 | + // | |
380 | 380 | c = i3GEO.parametros.pixelsize; |
381 | 381 | ex = i3GEO.parametros.mapexten; |
382 | 382 | try{ | ... | ... |
classesjs/classe_gadgets.js
classesjs/classe_guias.js
... | ... | @@ -30,12 +30,12 @@ Free Software Foundation, Inc., no endere&ccedil;o |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | 32 | if(typeof(i3GEO) === 'undefined'){ |
33 | - i3GEO = []; | |
33 | + var i3GEO = {}; | |
34 | 34 | } |
35 | 35 | /* |
36 | 36 | Classe: i3GEO.guias |
37 | 37 | |
38 | -Cria e controla os blocos de opções ativados por meio de guias ou botões | |
38 | +Cria e controla os blocos de opções ativados por meio de guias ou botões | |
39 | 39 | |
40 | 40 | Para configurar as guias do mapa principal utilize i3GEO.guias.configura = ... |
41 | 41 | |
... | ... | @@ -57,16 +57,16 @@ i3GEO.guias = { |
57 | 57 | ATUAL: "temas", |
58 | 58 | /* |
59 | 59 | Propriedade: ALTURACORPOGUIAS |
60 | - | |
60 | + | |
61 | 61 | Altura em pixels que será aplicado em cada guia |
62 | - | |
62 | + | |
63 | 63 | Por default, a altura é calculada automaticamente, mas em alguns casos, pode ser necessário especificar o valor para permitir um melhor ajuste do layout do mapa |
64 | - | |
64 | + | |
65 | 65 | Mantenha como 0 para que o cálculo seja automático |
66 | - | |
66 | + | |
67 | 67 | Tipo: |
68 | 68 | {numeric} |
69 | - | |
69 | + | |
70 | 70 | Default: 0 |
71 | 71 | */ |
72 | 72 | ALTURACORPOGUIAS: 0, |
... | ... | @@ -185,7 +185,7 @@ i3GEO.guias = { |
185 | 185 | Ordem de inclusão das guias no mapa. Essa opção é mais útil no caso do tipo sanfona, pois nesse caso, |
186 | 186 | a primeira guia é sempre a que fica ativa. Se esse par�metro for uma string vazia, a ordem |
187 | 187 | utilizada será a ordem existente em i3GEO.guias.CONFIGURA. |
188 | - | |
188 | + | |
189 | 189 | Ao ser definida, apenas as guias indicadas no array serão incluídas |
190 | 190 | |
191 | 191 | Exemplo: |
... | ... | @@ -203,7 +203,7 @@ i3GEO.guias = { |
203 | 203 | Propriedade: TIPO |
204 | 204 | |
205 | 205 | Tipo de guia |
206 | - | |
206 | + | |
207 | 207 | Quando TIPO = "movel", a inicialização da guia é feita em i3GEO.inicia |
208 | 208 | Isso é ne cessário pq a guia móvel só pode ser criada após o posicionamento do corpo do mapa |
209 | 209 | |
... | ... | @@ -234,7 +234,7 @@ i3GEO.guias = { |
234 | 234 | |
235 | 235 | Cria as guias com base na variável i3GEO.guias.CONFIGURA |
236 | 236 | |
237 | - As guias podem ser definidas no HTML do mapa, sem necessariamente estarem na variável configura.<b> | |
237 | + As guias podem ser definidas no HTML do mapa, sem necessariamente estarem na variável configura.<b> | |
238 | 238 | As guias, nesse caso, devem ter como ID "guia'n'", por exemplo id="guia6". Para cada uma dessas guias |
239 | 239 | deve haver um DIV com o conteúdo. Esse DIV deve ter como ID "guia'n'obj", por exemplo id="guia6obj". |
240 | 240 | No caso de ser utilizado a guia móvel, com i3GEO.guias.TIPO = "movel" , "guia'n" não é necessário, uma vez que são |
... | ... | @@ -245,7 +245,7 @@ i3GEO.guias = { |
245 | 245 | onde {String} - id do elemento que conterá as guias |
246 | 246 | */ |
247 | 247 | cria: function(onde){ |
248 | - | |
248 | + | |
249 | 249 | if(typeof(console) !== 'undefined'){console.info("i3GEO.guias.cria()");} |
250 | 250 | // |
251 | 251 | //obtém outras guias que podem existir no mapa |
... | ... | @@ -343,7 +343,7 @@ i3GEO.guias = { |
343 | 343 | } |
344 | 344 | else |
345 | 345 | {nguiasreal = i3GEO.guias.ORDEM.length;} |
346 | - | |
346 | + | |
347 | 347 | if(navn) |
348 | 348 | {altura = i3GEO.parametros.h - (nguiasreal * 25) - 1;} |
349 | 349 | else |
... | ... | @@ -449,7 +449,7 @@ i3GEO.guias = { |
449 | 449 | }, |
450 | 450 | /* |
451 | 451 | Function: escondeGuias |
452 | - | |
452 | + | |
453 | 453 | Esconde todas as guias |
454 | 454 | */ |
455 | 455 | escondeGuias: function(){ |
... | ... | @@ -465,7 +465,7 @@ i3GEO.guias = { |
465 | 465 | height: { to: 0 }, |
466 | 466 | id: this.CONFIGURA[guias[g]].idconteudo |
467 | 467 | }; |
468 | - anim = new YAHOO.util.Anim(temp, attributes, 1, YAHOO.util.Easing.easeNone); | |
468 | + anim = new YAHOO.util.Anim(temp, attributes, 1, YAHOO.util.Easing.easeNone); | |
469 | 469 | anim.onComplete.subscribe(function(){ |
470 | 470 | var temp = $i(anim.attributes.id); |
471 | 471 | temp.style.overflow = "auto"; |
... | ... | @@ -473,14 +473,14 @@ i3GEO.guias = { |
473 | 473 | if(i3GEO.barraDeBotoes.BARRAS[0]) |
474 | 474 | {i3GEO.barraDeBotoes.BARRAS[0].show();} |
475 | 475 | }); |
476 | - anim.animate(); | |
476 | + anim.animate(); | |
477 | 477 | } |
478 | 478 | else |
479 | 479 | {temp.style.display="none";} |
480 | 480 | } |
481 | 481 | if($i(this.CONFIGURA[guias[g]].id) && i3GEO.guias.TIPO !== "movel") |
482 | 482 | {$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent";} |
483 | - } | |
483 | + } | |
484 | 484 | }, |
485 | 485 | /* |
486 | 486 | Function: mostra |
... | ... | @@ -534,7 +534,7 @@ i3GEO.guias = { |
534 | 534 | attributes = { |
535 | 535 | height: { to: i3GEO.parametros.h - 10 } |
536 | 536 | }; |
537 | - anim = new YAHOO.util.Anim(temp, attributes, 1, YAHOO.util.Easing.easeNone); | |
537 | + anim = new YAHOO.util.Anim(temp, attributes, 1, YAHOO.util.Easing.easeNone); | |
538 | 538 | anim.onComplete.subscribe(function(){ |
539 | 539 | temp.style.overflow = "auto"; |
540 | 540 | temp.style.display = "block"; |
... | ... | @@ -542,7 +542,7 @@ i3GEO.guias = { |
542 | 542 | if(DetectaMobile("DetectAndroid") === true){ |
543 | 543 | temp.style.height = ""; |
544 | 544 | temp.style.overflow = "auto"; |
545 | - } | |
545 | + } | |
546 | 546 | else |
547 | 547 | {anim.animate();} |
548 | 548 | } |
... | ... | @@ -687,22 +687,22 @@ i3GEO.guias = { |
687 | 687 | }, |
688 | 688 | /* |
689 | 689 | Function: guiaMovel |
690 | - | |
690 | + | |
691 | 691 | Controla as guias do tipo "movel", que apresenta uma janela retrátil onde as opções são mostradas |
692 | 692 | */ |
693 | 693 | guiaMovel: { |
694 | 694 | /* |
695 | 695 | Propriedade: ABERTA |
696 | - | |
696 | + | |
697 | 697 | Indica se a guia inicializará aberta |
698 | - | |
698 | + | |
699 | 699 | Type: |
700 | 700 | {boolean} |
701 | 701 | */ |
702 | 702 | ABERTA: false, |
703 | 703 | /* |
704 | 704 | Propriedade: config |
705 | - | |
705 | + | |
706 | 706 | Define os valores de posicionamento dos elementos que compõem a guia |
707 | 707 | */ |
708 | 708 | config: { |
... | ... | @@ -721,13 +721,13 @@ i3GEO.guias = { |
721 | 721 | }, |
722 | 722 | /* |
723 | 723 | Variavel: left |
724 | - | |
724 | + | |
725 | 725 | Valor de posicionamento a esquerda, calculado na inicialização |
726 | 726 | */ |
727 | 727 | left: 0, |
728 | 728 | /* |
729 | 729 | Function: inicia |
730 | - | |
730 | + | |
731 | 731 | Inicializa a guia móvel |
732 | 732 | */ |
733 | 733 | inicia: function(){ |
... | ... | @@ -735,13 +735,13 @@ i3GEO.guias = { |
735 | 735 | centroY = posMapa[1] + (i3GEO.parametros.h / 2), |
736 | 736 | config = i3GEO.guias.guiaMovel.config, |
737 | 737 | temp; |
738 | - | |
738 | + | |
739 | 739 | if(i3GEO.guias.ALTURACORPOGUIAS === 0 && config.alturaGuiaMovel === 0) |
740 | 740 | {i3GEO.guias.guiaMovel.config.alturaGuiaMovel = i3GEO.parametros.h;} |
741 | 741 | else |
742 | 742 | {i3GEO.guias.guiaMovel.config.alturaGuiaMovel = i3GEO.guias.ALTURACORPOGUIAS;} |
743 | 743 | config = i3GEO.guias.guiaMovel.config; |
744 | - | |
744 | + | |
745 | 745 | temp = $i("i3GEOguiaMovel").style; |
746 | 746 | //temp.height = config.alturaGuiaMovel + "px"; |
747 | 747 | temp.left = (posMapa[0] + i3GEO.parametros.w - config.larguraPuxador) + "px"; |
... | ... | @@ -760,19 +760,19 @@ i3GEO.guias = { |
760 | 760 | temp.width = "0px"; //config.larguraGuiaMovel + "px"; |
761 | 761 | temp.height = config.alturaGuiaMovel + "px"; |
762 | 762 | temp.backgroundColor = "white"; |
763 | - | |
763 | + | |
764 | 764 | temp = $i("i3GEOguiaMovelPuxador").style; |
765 | 765 | temp.top = ((config.alturaGuiaMovel - config.alturaPuxador) / 2 ) + "px"; |
766 | 766 | temp.left = "0px"; |
767 | 767 | temp.width = config.larguraPuxador + "px"; |
768 | 768 | temp.height = config.alturaPuxador + "px"; |
769 | - | |
769 | + | |
770 | 770 | temp = $i("i3GEOguiaMovelIcones").style; |
771 | 771 | temp.left = "1px"; |
772 | 772 | temp.top = "1px"; |
773 | 773 | temp.width = (config.larguraGuiaMovel - 1) + "px"; |
774 | 774 | temp.height = "35px"; |
775 | - | |
775 | + | |
776 | 776 | if(navm) |
777 | 777 | {temp.height = "37px";} |
778 | 778 | temp.zIndex = 5; |
... | ... | @@ -798,7 +798,7 @@ i3GEO.guias = { |
798 | 798 | $i("i3GEOguiaMovelMolde").onmouseout = function(){ |
799 | 799 | YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde", "opacity", 0.20); |
800 | 800 | if($i("i3GEOguiaMovelIcones").innerHTML === "") |
801 | - {i3GEO.guias.guiaMovel.mostraIcones();} | |
801 | + {i3GEO.guias.guiaMovel.mostraIcones();} | |
802 | 802 | }; |
803 | 803 | i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL); |
804 | 804 | if(i3GEO.guias.guiaMovel.ABERTA === true) |
... | ... | @@ -806,7 +806,7 @@ i3GEO.guias = { |
806 | 806 | }, |
807 | 807 | /* |
808 | 808 | Function: mostraIcones |
809 | - | |
809 | + | |
810 | 810 | Mostra os ícones que acionam cada guia |
811 | 811 | */ |
812 | 812 | mostraIcones: function(){ |
... | ... | @@ -827,11 +827,11 @@ i3GEO.guias = { |
827 | 827 | if($i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id)){ |
828 | 828 | $i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.backgroundColor = "#cedff2"; |
829 | 829 | $i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.boxShadow = "none"; |
830 | - } | |
830 | + } | |
831 | 831 | }, |
832 | 832 | /* |
833 | 833 | Function: desativaIcones |
834 | - | |
834 | + | |
835 | 835 | Altera a cor do fundo dos ícones, voltando ao original |
836 | 836 | */ |
837 | 837 | desativaIcones:function(){ |
... | ... | @@ -841,15 +841,15 @@ i3GEO.guias = { |
841 | 841 | for(i=0;i<n;i++){ |
842 | 842 | ims[i].style.backgroundColor = "white"; |
843 | 843 | ims[i].style.boxShadow = ""; |
844 | - } | |
844 | + } | |
845 | 845 | }, |
846 | 846 | /* |
847 | 847 | Function: ativa |
848 | - | |
848 | + | |
849 | 849 | Ativa o conteúdo de determinada guia |
850 | - | |
850 | + | |
851 | 851 | Parametro: |
852 | - | |
852 | + | |
853 | 853 | chave {string} - código da guia, definido em i3GEO.guias.CONFIGURA |
854 | 854 | */ |
855 | 855 | ativa: function(chave){ |
... | ... | @@ -866,7 +866,7 @@ i3GEO.guias = { |
866 | 866 | }, |
867 | 867 | /* |
868 | 868 | Function: reposiciona |
869 | - | |
869 | + | |
870 | 870 | Reposiciona a guia móvel quando o mapa muda de tamanho |
871 | 871 | */ |
872 | 872 | reposiciona: function(){ |
... | ... | @@ -880,14 +880,14 @@ i3GEO.guias = { |
880 | 880 | i3GEO.guias.ALTURACORPOGUIAS = 0; |
881 | 881 | $i("i3GEOguiaMovelIcones").style.display = "none"; |
882 | 882 | $i("i3GEOguiaMovelConteudo").style.display = "none"; |
883 | - $i("i3GEOguiaMovelMolde").style.display = "none"; | |
883 | + $i("i3GEOguiaMovelMolde").style.display = "none"; | |
884 | 884 | i3GEO.guias.escondeGuias(); |
885 | 885 | i3GEO.guias.guiaMovel.inicia(); |
886 | 886 | $i("i3GEOguiaMovel").style.top = temp; |
887 | 887 | }, |
888 | 888 | /* |
889 | 889 | Function: abreFecha |
890 | - | |
890 | + | |
891 | 891 | Abre ou fecha a guia móvel |
892 | 892 | */ |
893 | 893 | abreFecha: function(){ |
... | ... | @@ -908,18 +908,18 @@ i3GEO.guias = { |
908 | 908 | width: { to: 0 }, |
909 | 909 | id: "i3GEOguiaMovelMolde" |
910 | 910 | }; |
911 | - anim1 = new YAHOO.util.Anim(molde, attributes, 1, YAHOO.util.Easing.easeNone); | |
911 | + anim1 = new YAHOO.util.Anim(molde, attributes, 1, YAHOO.util.Easing.easeNone); | |
912 | 912 | anim.duration = 0.5; |
913 | 913 | anim1.duration = 0.5; |
914 | 914 | anim.animate(); |
915 | 915 | anim1.animate(); |
916 | 916 | anim1.onComplete.subscribe(function(){ |
917 | 917 | molde.style.display = "none"; |
918 | - }); | |
918 | + }); | |
919 | 919 | } |
920 | 920 | else{ |
921 | 921 | //conteudo.style.display = "block"; |
922 | - molde.style.display = "block"; | |
922 | + molde.style.display = "block"; | |
923 | 923 | attributes = { |
924 | 924 | left: { to: parseInt(guia.style.left,10) - i3GEO.guias.guiaMovel.config.larguraGuiaMovel }, |
925 | 925 | id: "i3GEOguiaMovel" |
... | ... | @@ -929,7 +929,7 @@ i3GEO.guias = { |
929 | 929 | width: { to: i3GEO.guias.guiaMovel.config.larguraGuiaMovel }, |
930 | 930 | id: "i3GEOguiaMovelMolde" |
931 | 931 | }; |
932 | - anim1 = new YAHOO.util.Anim(molde, attributes, 1, YAHOO.util.Easing.easeNone); | |
932 | + anim1 = new YAHOO.util.Anim(molde, attributes, 1, YAHOO.util.Easing.easeNone); | |
933 | 933 | anim.duration = 0.5; |
934 | 934 | anim1.duration = 0.5; |
935 | 935 | anim1.onComplete.subscribe(function(){ | ... | ... |
classesjs/classe_i3geo.js
... | ... | @@ -63,8 +63,7 @@ s&atilde;o armazenados na vari&aacute;vel i3GEO.parametros |
63 | 63 | |
64 | 64 | Nessa classe estão disponíveis variáveis internas utilizadas em várias funções, como i3GEO.temaAtivo |
65 | 65 | */ |
66 | -i3GEO = { | |
67 | - | |
66 | +var i3GEO = { | |
68 | 67 | /* |
69 | 68 | Propriedade: parametros |
70 | 69 | ... | ... |
classesjs/classe_idioma.js
... | ... | @@ -29,7 +29,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
29 | 29 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
30 | 30 | */ |
31 | 31 | if(typeof(i3GEO) === 'undefined'){ |
32 | - i3GEO = []; | |
32 | + var i3GEO = {}; | |
33 | 33 | } |
34 | 34 | /* |
35 | 35 | Classe: i3geo.idioma |
... | ... | @@ -107,8 +107,8 @@ i3GEO.idioma = { |
107 | 107 | /* |
108 | 108 | Function: define |
109 | 109 | |
110 | - Define qual o idioma em uso. O default é "pt". | |
111 | - | |
110 | + Define qual o idioma em uso. O default é "pt". | |
111 | + | |
112 | 112 | Parametro: |
113 | 113 | codigo - {String} Código do idioma. |
114 | 114 | */ |
... | ... | @@ -120,8 +120,8 @@ i3GEO.idioma = { |
120 | 120 | /* |
121 | 121 | Function: retornaAtual |
122 | 122 | |
123 | - Retorna o idioma atual. | |
124 | - | |
123 | + Retorna o idioma atual. | |
124 | + | |
125 | 125 | Returns: |
126 | 126 | {string} Código do idioma. |
127 | 127 | */ |
... | ... | @@ -132,10 +132,10 @@ i3GEO.idioma = { |
132 | 132 | Function: defineDicionario |
133 | 133 | |
134 | 134 | Define o objeto com as traduções. O default é "g_traducao" |
135 | - | |
135 | + | |
136 | 136 | Parametro: |
137 | 137 | obj - {Object} Objeto com a tradução. |
138 | - | |
138 | + | |
139 | 139 | Example: |
140 | 140 | |
141 | 141 | g_traducao = { |
... | ... | @@ -158,14 +158,14 @@ i3GEO.idioma = { |
158 | 158 | /* |
159 | 159 | Function: alteraDicionario |
160 | 160 | |
161 | - Altera um texto do dicionario ou acresecenta um novo texto para o idioma atual. | |
162 | - | |
161 | + Altera um texto do dicionario ou acresecenta um novo texto para o idioma atual. | |
162 | + | |
163 | 163 | Parametros: |
164 | 164 | |
165 | 165 | id - {String} Código do texto. |
166 | 166 | |
167 | 167 | novo - (String) Novo texto. |
168 | - | |
168 | + | |
169 | 169 | */ |
170 | 170 | alteraDicionario: function(id,novo) { |
171 | 171 | i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL] = novo; |
... | ... | @@ -174,11 +174,11 @@ i3GEO.idioma = { |
174 | 174 | Function: traduzir |
175 | 175 | |
176 | 176 | Traduz um texto para o idioma escolhido |
177 | - | |
177 | + | |
178 | 178 | Parametro: |
179 | 179 | |
180 | 180 | id - {String} Código do texto. |
181 | - | |
181 | + | |
182 | 182 | Returns: |
183 | 183 | |
184 | 184 | {String} Texto traduzido. |
... | ... | @@ -195,11 +195,11 @@ i3GEO.idioma = { |
195 | 195 | Function: adicionaDicionario |
196 | 196 | |
197 | 197 | Adiciona novos registros ao dicionário atual |
198 | - | |
198 | + | |
199 | 199 | Parametro: |
200 | 200 | |
201 | 201 | novodic - {Object} Objeto novo dicionário. |
202 | - | |
202 | + | |
203 | 203 | Example: |
204 | 204 | |
205 | 205 | var novodic ={ "pp": [{ |
... | ... | @@ -243,7 +243,7 @@ i3GEO.idioma = { |
243 | 243 | Troca o idioma atual por outro. |
244 | 244 | |
245 | 245 | A troca é baseada na definição de um cookie e reload da página. |
246 | - | |
246 | + | |
247 | 247 | Parametro: |
248 | 248 | |
249 | 249 | codigo - {String} Código do idioma (p.e. "en") |
... | ... | @@ -257,7 +257,7 @@ i3GEO.idioma = { |
257 | 257 | Function: listaIdiomas |
258 | 258 | |
259 | 259 | Lista os idiomas disponíveis no dicionário ativo |
260 | - | |
260 | + | |
261 | 261 | Returns: |
262 | 262 | {Array} Array com os códigos de idioma disponíveis. |
263 | 263 | */ |
... | ... | @@ -323,16 +323,16 @@ i3GEO.idioma = { |
323 | 323 | Function: $trad |
324 | 324 | |
325 | 325 | Atalho para a função de tradução |
326 | - | |
326 | + | |
327 | 327 | Parametro: |
328 | 328 | |
329 | 329 | id - {String} Código do texto. |
330 | - | |
330 | + | |
331 | 331 | Returns: |
332 | 332 | |
333 | 333 | {String} Texto traduzido. |
334 | 334 | */ |
335 | -var $trad = function(id) | |
335 | +$trad = function(id) | |
336 | 336 | {return (i3GEO.idioma.traduzir(id));}; |
337 | 337 | // |
338 | 338 | (function(){ | ... | ... |
classesjs/classe_interface.js
... | ... | @@ -29,7 +29,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
29 | 29 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
30 | 30 | */ |
31 | 31 | if(typeof(i3GEO) === 'undefined'){ |
32 | - i3GEO = []; | |
32 | + var i3GEO = {}; | |
33 | 33 | } |
34 | 34 | /* |
35 | 35 | Classe: i3GEO.Interface |
... | ... | @@ -48,34 +48,34 @@ O HTML deve conter as defini&ccedil;&otilde;es da interface criada e deve estar |
48 | 48 | i3GEO.Interface = { |
49 | 49 | /* |
50 | 50 | Propriedade: TABLET |
51 | - | |
51 | + | |
52 | 52 | Aplica configurações especiais para uso em tablets. |
53 | - | |
53 | + | |
54 | 54 | Altera o posicionamento da barra de botões e comportamento das guias. Veja o exemplo interface/openlayers_t.htm. |
55 | - | |
55 | + | |
56 | 56 | Type: |
57 | 57 | {boolean} |
58 | - | |
58 | + | |
59 | 59 | Default: |
60 | 60 | {false} |
61 | 61 | */ |
62 | 62 | TABLET: false, |
63 | 63 | /* |
64 | 64 | Propriedade: ALTTABLET |
65 | - | |
65 | + | |
66 | 66 | Nome do arquivo HTML com a interface alternativa utilizada quando o i3Geo detecta o uso de um dispositivo móvel |
67 | - | |
67 | + | |
68 | 68 | A detecção é aplicada automaticamente quando essa variável for definida |
69 | - | |
69 | + | |
70 | 70 | Para não aplicar a detecção, use i3GEO.Interface.ALTTABLET = "" |
71 | - | |
71 | + | |
72 | 72 | Type: |
73 | 73 | {string} |
74 | - | |
74 | + | |
75 | 75 | Default: |
76 | 76 | {openlayers_t.htm} |
77 | 77 | */ |
78 | - ALTTABLET: "openlayers_t.htm", | |
78 | + ALTTABLET: "openlayers_t.htm", | |
79 | 79 | /* |
80 | 80 | Propriedade: OUTPUTFORMAT |
81 | 81 | |
... | ... | @@ -282,7 +282,7 @@ i3GEO.Interface = { |
282 | 282 | }; |
283 | 283 | i3GEO.php.converte2openlayers(temp); |
284 | 284 | } |
285 | - }, | |
285 | + }, | |
286 | 286 | /* |
287 | 287 | Function: redesenha |
288 | 288 | |
... | ... | @@ -298,9 +298,9 @@ i3GEO.Interface = { |
298 | 298 | Function: aplicaOpacidade |
299 | 299 | |
300 | 300 | Aplica um fator de opacidade a todos os layers do mapa |
301 | - | |
301 | + | |
302 | 302 | Parametro: |
303 | - | |
303 | + | |
304 | 304 | opacidade {numerico} - 0 a 1 |
305 | 305 | */ |
306 | 306 | aplicaOpacidade: function(opacidade){ |
... | ... | @@ -404,7 +404,7 @@ i3GEO.Interface = { |
404 | 404 | //inclui o nome do usuario que esta logado |
405 | 405 | if($i(i3GEO.login.divnomelogin) && i3GEO.util.pegaCookie("i3geousuarionome")){ |
406 | 406 | $i(i3GEO.login.divnomelogin).innerHTML = i3GEO.util.pegaCookie("i3geousuarionome"); |
407 | - } | |
407 | + } | |
408 | 408 | }, |
409 | 409 | /* |
410 | 410 | Function: alteraLayers |
... | ... | @@ -437,7 +437,7 @@ i3GEO.Interface = { |
437 | 437 | |
438 | 438 | Interface com motor de navegação baseado na API OpenLayers |
439 | 439 | |
440 | - Utilizado quando | |
440 | + Utilizado quando | |
441 | 441 | |
442 | 442 | i3GEO.Interface.ATUAL = "openlayers" |
443 | 443 | |
... | ... | @@ -450,7 +450,7 @@ i3GEO.Interface = { |
450 | 450 | Propriedade: FUNDOTEMA |
451 | 451 | |
452 | 452 | Estilo "background" do nome do tema na árvore de camadas enquanto o mesmo está sendo carregado. |
453 | - | |
453 | + | |
454 | 454 | Permite destacar o nome do tema que está em processo de carregamento |
455 | 455 | |
456 | 456 | Tipo: |
... | ... | @@ -583,8 +583,8 @@ i3GEO.Interface = { |
583 | 583 | } |
584 | 584 | }), |
585 | 585 | new OpenLayers.Control.ZoomPanel() |
586 | - ] | |
587 | - }); | |
586 | + ] | |
587 | + }); | |
588 | 588 | } |
589 | 589 | else{ |
590 | 590 | bb.INCLUIBOTAO.zoomli = true; |
... | ... | @@ -661,7 +661,7 @@ i3GEO.Interface = { |
661 | 661 | i3GEO.Interface.openlayers.OLpanel = new OpenLayers.Control.Panel(); |
662 | 662 | i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]); |
663 | 663 | i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel); |
664 | - } | |
664 | + } | |
665 | 665 | if (i3GEO.configura.mapaRefDisplay !== "none"){ |
666 | 666 | if (i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")) |
667 | 667 | {i3GEO.configura.mapaRefDisplay = i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay");} |
... | ... | @@ -718,7 +718,7 @@ i3GEO.Interface = { |
718 | 718 | {eval(i3GEO.finalizaAPI);} |
719 | 719 | } |
720 | 720 | }, |
721 | - aplicaOpacidade: function(opacidade){ | |
721 | + aplicaOpacidade: function(opacidade){ | |
722 | 722 | var nlayers = i3GEO.arvoreDeCamadas.CAMADAS.length, |
723 | 723 | layer, |
724 | 724 | i, |
... | ... | @@ -766,7 +766,7 @@ i3GEO.Interface = { |
766 | 766 | if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML === false){ |
767 | 767 | i3GEO.arvoreDeCamadas.MOSTRALISTAKML = true; |
768 | 768 | i3GEO.Interface.openlayers.criaArvoreKML(); |
769 | - } | |
769 | + } | |
770 | 770 | i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml); |
771 | 771 | }, |
772 | 772 | criaArvoreKML: function(){ |
... | ... | @@ -820,7 +820,7 @@ i3GEO.Interface = { |
820 | 820 | |
821 | 821 | html += " <span style='"+estilo+"'>"+nomeOverlay+"</span>"; |
822 | 822 | d = {html:html}; |
823 | - nodekml = new YAHOO.widget.HTMLNode(d, node, true,true); | |
823 | + nodekml = new YAHOO.widget.HTMLNode(d, node, true,true); | |
824 | 824 | nodekml.enableHighlight = false; |
825 | 825 | nodekml.isleaf = true; |
826 | 826 | i3GEO.Interface.openlayers.ARVORE.draw(); |
... | ... | @@ -860,14 +860,14 @@ i3GEO.Interface = { |
860 | 860 | } |
861 | 861 | g = features[i].geometry; |
862 | 862 | i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud( |
863 | - "kml", | |
863 | + "kml", | |
864 | 864 | new OpenLayers.LonLat(g.x,g.y), |
865 | 865 | null, |
866 | 866 | html, |
867 | 867 | null, |
868 | 868 | true |
869 | 869 | )); |
870 | - | |
870 | + | |
871 | 871 | } |
872 | 872 | } |
873 | 873 | } |
... | ... | @@ -878,13 +878,13 @@ i3GEO.Interface = { |
878 | 878 | if(!obj.checked) |
879 | 879 | {eval(obj.value+".setVisibility(false);");} |
880 | 880 | else{ |
881 | - if(!(i3geoOL.getLayersByName(obj.value)[0])){ | |
881 | + if(!(i3geoOL.getLayersByName(obj.value)[0])){ | |
882 | 882 | i3GEO.Interface.openlayers.insereLayerKml(obj.value,url); |
883 | 883 | } |
884 | 884 | else |
885 | 885 | {eval(obj.value+".setVisibility(true);");} |
886 | 886 | } |
887 | - }, | |
887 | + }, | |
888 | 888 | criaLayers: function(){ |
889 | 889 | var configura = i3GEO.configura, |
890 | 890 | url = configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem, |
... | ... | @@ -963,7 +963,7 @@ i3GEO.Interface = { |
963 | 963 | layer = new OpenLayers.Layer.WMS(camada.name, urllayer,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes); |
964 | 964 | } |
965 | 965 | } |
966 | - catch(e){} | |
966 | + catch(e){} | |
967 | 967 | if(camada.escondido.toLowerCase() === "sim") |
968 | 968 | {layer.transitionEffect = "null";} |
969 | 969 | i3geoOL.addLayer(layer); |
... | ... | @@ -987,7 +987,7 @@ i3GEO.Interface = { |
987 | 987 | temp.style.zIndex = 5000; |
988 | 988 | temp.style.position = "absolute"; |
989 | 989 | temp.innerHTML = "<p class=paragrafo >"+i3GEO.parametros.copyright+"</p>"; |
990 | - $i(i3GEO.Interface.IDMAPA).appendChild(temp); | |
990 | + $i(i3GEO.Interface.IDMAPA).appendChild(temp); | |
991 | 991 | } |
992 | 992 | }, |
993 | 993 | sobeLayersGraficos: function(){ |
... | ... | @@ -1018,7 +1018,7 @@ i3GEO.Interface = { |
1018 | 1018 | layer = i3geoOL.getLayersByName(camada.name)[0]; |
1019 | 1019 | if(layer) |
1020 | 1020 | {i3geoOL.removeLayer(layer,false);} |
1021 | - } | |
1021 | + } | |
1022 | 1022 | }, |
1023 | 1023 | alteraParametroLayers: function(parametro,valor){ |
1024 | 1024 | var layers = i3geoOL.layers, |
... | ... | @@ -1037,10 +1037,10 @@ i3GEO.Interface = { |
1037 | 1037 | } |
1038 | 1038 | }, |
1039 | 1039 | loadStartLayer: function(event){ |
1040 | - var p = $i("i3GEOprogressoDiv"); | |
1040 | + var p = $i("i3GEOprogressoDiv"); | |
1041 | 1041 | if($i("ArvoreTituloTema"+event.object.name)){ |
1042 | 1042 | i3GEO.Interface.STATUS.atualizando.push(event.object.name); |
1043 | - YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA); | |
1043 | + YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA); | |
1044 | 1044 | if(p){ |
1045 | 1045 | p.style.display = "block"; |
1046 | 1046 | i3GEO.arvoreDeCamadas.progressBar.set('maxValue',i3GEO.Interface.STATUS.atualizando.length); |
... | ... | @@ -1119,7 +1119,7 @@ i3GEO.Interface = { |
1119 | 1119 | ativaFundo: function(id){ |
1120 | 1120 | i3geoOL.setBaseLayer(i3geoOL.getLayer(id)); |
1121 | 1121 | i3GEO.Interface.openlayers.OLpanzoombar.div.style.top = i3GEO.Interface.BARRADEZOOMTOP+"px"; |
1122 | - i3GEO.Interface.openlayers.OLpanzoombar.div.style.left = i3GEO.Interface.BARRADEZOOMLEFT+"px"; | |
1122 | + i3GEO.Interface.openlayers.OLpanzoombar.div.style.left = i3GEO.Interface.BARRADEZOOMLEFT+"px"; | |
1123 | 1123 | }, |
1124 | 1124 | atualizaMapa:function(){ |
1125 | 1125 | var layers = i3geoOL.layers, |
... | ... | @@ -1129,7 +1129,7 @@ i3GEO.Interface = { |
1129 | 1129 | if(layers[i].url){ |
1130 | 1130 | layers[i].mergeNewParams({r:Math.random()}); |
1131 | 1131 | layers[i].url = layers[i].url.replace("&&&&&&&&&&&&&&",""); |
1132 | - layers[i].url = layers[i].url+"&&"; | |
1132 | + layers[i].url = layers[i].url+"&&"; | |
1133 | 1133 | if(layers[i].visibility === true){ |
1134 | 1134 | layers[i].redraw(); |
1135 | 1135 | } |
... | ... | @@ -1169,8 +1169,8 @@ i3GEO.Interface = { |
1169 | 1169 | var xy; |
1170 | 1170 | modoAtual = "move"; |
1171 | 1171 | xy = i3GEO.navega.centroDoMapa(); |
1172 | - i3GEO.navega.marcaCentroDoMapa(xy); | |
1173 | - }); | |
1172 | + i3GEO.navega.marcaCentroDoMapa(xy); | |
1173 | + }); | |
1174 | 1174 | i3geoOL.events.register("moveend",i3geoOL,function(e){ |
1175 | 1175 | var xy; |
1176 | 1176 | modoAtual = ""; |
... | ... | @@ -1248,7 +1248,7 @@ i3GEO.Interface = { |
1248 | 1248 | |
1249 | 1249 | Interface com motor de navegação baseado na API Google Maps |
1250 | 1250 | |
1251 | - Utilizado quando | |
1251 | + Utilizado quando | |
1252 | 1252 | |
1253 | 1253 | i3GEO.Interface.ATUAL = "googlemaps" |
1254 | 1254 | |
... | ... | @@ -1260,11 +1260,11 @@ i3GEO.Interface = { |
1260 | 1260 | Propriedade: MAPOPTIONS |
1261 | 1261 | |
1262 | 1262 | Objeto contendo opções que serão utilizadas no construtor do mapa conforme a API do GoogleMaps |
1263 | - | |
1263 | + | |
1264 | 1264 | Exemplo de uso |
1265 | - | |
1265 | + | |
1266 | 1266 | i3GEO.Interface.googlemaps.MAPOPTIONS = {maxZoom:5}; |
1267 | - | |
1267 | + | |
1268 | 1268 | https://developers.google.com/maps/documentation/javascript/reference#MapOptions |
1269 | 1269 | |
1270 | 1270 | Tipo: |
... | ... | @@ -1359,7 +1359,7 @@ i3GEO.Interface = { |
1359 | 1359 | if(typeof(console) !== 'undefined'){console.error(e+" "+camada.name);} |
1360 | 1360 | } |
1361 | 1361 | } |
1362 | - } | |
1362 | + } | |
1363 | 1363 | }, |
1364 | 1364 | redesenha: function(){ |
1365 | 1365 | i3GEO.Interface.googlemaps.posfixo += 1; |
... | ... | @@ -1460,7 +1460,7 @@ i3GEO.Interface = { |
1460 | 1460 | else{ |
1461 | 1461 | if(i3GEO.finalizaAPI != "") |
1462 | 1462 | {eval(i3GEO.finalizaAPI);} |
1463 | - } | |
1463 | + } | |
1464 | 1464 | }; |
1465 | 1465 | i3GEO.php.googlemaps(montaMapa); |
1466 | 1466 | }, |
... | ... | @@ -1481,7 +1481,7 @@ i3GEO.Interface = { |
1481 | 1481 | } |
1482 | 1482 | }, |
1483 | 1483 | criaImageMap: function(nomeLayer){ |
1484 | - var i3GEOTileO = "",s; | |
1484 | + var i3GEOTileO = "",s; | |
1485 | 1485 | s = "i3GEOTileO = new google.maps.ImageMapType({ "+ |
1486 | 1486 | "getTileUrl: function(coord, zoom) {" + |
1487 | 1487 | " var url = '" + i3GEO.configura.locaplic +"/classesphp/mapa_googlemaps.php?g_sid=" + i3GEO.configura.sid + |
... | ... | @@ -1508,7 +1508,7 @@ i3GEO.Interface = { |
1508 | 1508 | var xy; |
1509 | 1509 | modoAtual = "move"; |
1510 | 1510 | xy = i3GEO.navega.centroDoMapa(); |
1511 | - i3GEO.navega.marcaCentroDoMapa(xy); | |
1511 | + i3GEO.navega.marcaCentroDoMapa(xy); | |
1512 | 1512 | }); |
1513 | 1513 | google.maps.event.addListener(i3GeoMap, "dragend", function() { |
1514 | 1514 | var xy; |
... | ... | @@ -1520,7 +1520,7 @@ i3GEO.Interface = { |
1520 | 1520 | //permite que a coordenada do centro mapa seja mostrada no formulário de coordenadas |
1521 | 1521 | // |
1522 | 1522 | xy = i3GEO.navega.centroDoMapa(); |
1523 | - i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1]); | |
1523 | + i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1]); | |
1524 | 1524 | }); |
1525 | 1525 | google.maps.event.addListener(i3GeoMap, "tilesloaded", function() { |
1526 | 1526 | i3GEO.Interface.googlemaps.recalcPar(); |
... | ... | @@ -1535,13 +1535,13 @@ i3GEO.Interface = { |
1535 | 1535 | //permite que a coordenada do centro mapa seja mostrada no formulário de coordenadas |
1536 | 1536 | // |
1537 | 1537 | xy = i3GEO.navega.centroDoMapa(); |
1538 | - i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1]); | |
1538 | + i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1]); | |
1539 | 1539 | }); |
1540 | 1540 | pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)); |
1541 | 1541 | google.maps.event.addListener(i3GeoMap, "mousemove", function(ponto) { |
1542 | 1542 | var teladms,tela; |
1543 | 1543 | if(modoAtual === "move") |
1544 | - {return;} | |
1544 | + {return;} | |
1545 | 1545 | ponto = ponto.latLng; |
1546 | 1546 | teladms = i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat()); |
1547 | 1547 | tela = i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto); |
... | ... | @@ -1667,8 +1667,8 @@ i3GEO.Interface = { |
1667 | 1667 | if ($i("barraDeBotoes2") || i3GEO.barraDeBotoes.AUTO === true) |
1668 | 1668 | {i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2);} |
1669 | 1669 | i3GEO.barraDeBotoes.ativaBotoes(); |
1670 | - }, | |
1671 | - aplicaOpacidade: function(opacidade){ | |
1670 | + }, | |
1671 | + aplicaOpacidade: function(opacidade){ | |
1672 | 1672 | var nlayers = i3GEO.arvoreDeCamadas.CAMADAS.length, |
1673 | 1673 | i, |
1674 | 1674 | camada, |
... | ... | @@ -1776,7 +1776,7 @@ i3GEO.Interface = { |
1776 | 1776 | if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML === false){ |
1777 | 1777 | i3GEO.arvoreDeCamadas.MOSTRALISTAKML = true; |
1778 | 1778 | i3GEO.Interface.googlemaps.criaArvoreKML(); |
1779 | - } | |
1779 | + } | |
1780 | 1780 | i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml); |
1781 | 1781 | }, |
1782 | 1782 | adicionaListaKml: function(){ |
... | ... | @@ -1831,7 +1831,7 @@ i3GEO.Interface = { |
1831 | 1831 | |
1832 | 1832 | html += " <span style='"+estilo+"'>"+nomeOverlay+"</span>"; |
1833 | 1833 | d = {html:html}; |
1834 | - nodekml = new YAHOO.widget.HTMLNode(d, node, true,true); | |
1834 | + nodekml = new YAHOO.widget.HTMLNode(d, node, true,true); | |
1835 | 1835 | nodekml.enableHighlight = false; |
1836 | 1836 | nodekml.isleaf = true; |
1837 | 1837 | i3GEO.Interface.googlemaps.ARVORE.draw(); |
... | ... | @@ -1867,7 +1867,7 @@ i3GEO.Interface = { |
1867 | 1867 | }, |
1868 | 1868 | node |
1869 | 1869 | ); |
1870 | - } | |
1870 | + } | |
1871 | 1871 | }, |
1872 | 1872 | /* |
1873 | 1873 | Function: ativaDesativaCamadaKml |
... | ... | @@ -1900,7 +1900,7 @@ i3GEO.Interface = { |
1900 | 1900 | |
1901 | 1901 | Interface com motor de navegação baseado na API Google Earth |
1902 | 1902 | |
1903 | - Utilizado quando | |
1903 | + Utilizado quando | |
1904 | 1904 | |
1905 | 1905 | i3GEO.Interface.ATUAL = "googleearth" |
1906 | 1906 | |
... | ... | @@ -2120,7 +2120,7 @@ i3GEO.Interface = { |
2120 | 2120 | |
2121 | 2121 | var options = i3GeoMap.getOptions(), |
2122 | 2122 | layerRoot = i3GeoMap.getLayerRoot(); |
2123 | - | |
2123 | + | |
2124 | 2124 | options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled); |
2125 | 2125 | options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility); |
2126 | 2126 | options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility); |
... | ... | @@ -2207,13 +2207,13 @@ i3GEO.Interface = { |
2207 | 2207 | else |
2208 | 2208 | {return false;} |
2209 | 2209 | }, |
2210 | - aplicaOpacidade: function(opacidade){ | |
2210 | + aplicaOpacidade: function(opacidade){ | |
2211 | 2211 | var n = i3GeoMap.getFeatures().getChildNodes().getLength(), |
2212 | 2212 | i; |
2213 | 2213 | for(i=0;i<n;i++){ |
2214 | 2214 | i3GeoMap.getFeatures().getChildNodes().item(i).setOpacity(opacidade); |
2215 | 2215 | } |
2216 | - }, | |
2216 | + }, | |
2217 | 2217 | retornaObjetoLayer: function(nomeLayer){ |
2218 | 2218 | var n = i3GeoMap.getFeatures().getChildNodes().getLength(), |
2219 | 2219 | indice = false, |
... | ... | @@ -2441,7 +2441,7 @@ i3GEO.Interface = { |
2441 | 2441 | if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML === false){ |
2442 | 2442 | i3GEO.arvoreDeCamadas.MOSTRALISTAKML = true; |
2443 | 2443 | i3GEO.Interface.googleearth.criaArvoreKML(); |
2444 | - } | |
2444 | + } | |
2445 | 2445 | i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml); |
2446 | 2446 | }, |
2447 | 2447 | adicionaListaKml: function(){ |
... | ... | @@ -2491,7 +2491,7 @@ i3GEO.Interface = { |
2491 | 2491 | html += "/>"; |
2492 | 2492 | html += " <span style='cursor:move'>"+nomeOverlay+"</span>"; |
2493 | 2493 | d = {html:html}; |
2494 | - nodekml = new YAHOO.widget.HTMLNode(d, node, true,true); | |
2494 | + nodekml = new YAHOO.widget.HTMLNode(d, node, true,true); | |
2495 | 2495 | nodekml.enableHighlight = false; |
2496 | 2496 | nodekml.isleaf = true; |
2497 | 2497 | i3GEO.Interface.googleearth.ARVORE.draw(); |
... | ... | @@ -2525,7 +2525,7 @@ i3GEO.Interface = { |
2525 | 2525 | }, |
2526 | 2526 | node |
2527 | 2527 | ); |
2528 | - } | |
2528 | + } | |
2529 | 2529 | }, |
2530 | 2530 | existeLink: function(url){ |
2531 | 2531 | var existe = false, |
... | ... | @@ -2596,22 +2596,22 @@ i3GEO.Interface = { |
2596 | 2596 | lng1 = (ret[2]*1); |
2597 | 2597 | lat1 = (ret[1]*1); |
2598 | 2598 | lat2 = (ret[3]*1); |
2599 | - camera.setLatitude((lat1 + lat2) / 2.0); | |
2600 | - camera.setLongitude((lng1 + lng2) / 2.0); | |
2601 | - camera.setHeading(0.0); | |
2602 | - camera.setTilt(0.0); | |
2599 | + camera.setLatitude((lat1 + lat2) / 2.0); | |
2600 | + camera.setLongitude((lng1 + lng2) / 2.0); | |
2601 | + camera.setHeading(0.0); | |
2602 | + camera.setTilt(0.0); | |
2603 | 2603 | // determine if the rectangle is portrait or landscape |
2604 | - dy = Math.max(lat1, lat2) - Math.min(lat1, lat2); | |
2605 | - dx = Math.max(lng1, lng2) - Math.min(lng1, lng2); | |
2604 | + dy = Math.max(lat1, lat2) - Math.min(lat1, lat2); | |
2605 | + dx = Math.max(lng1, lng2) - Math.min(lng1, lng2); | |
2606 | 2606 | // find the longest side |
2607 | - d = Math.max(dy, dx); | |
2607 | + d = Math.max(dy, dx); | |
2608 | 2608 | // convert the longest side degrees to radians |
2609 | - d = d * Math.PI/180.0; | |
2609 | + d = d * Math.PI/180.0; | |
2610 | 2610 | // find half the chord length |
2611 | - dist = r * Math.tan(d / 2); | |
2611 | + dist = r * Math.tan(d / 2); | |
2612 | 2612 | // get the altitude using the chord length |
2613 | - alt = dist/(Math.tan(fov * Math.PI / 180.0)); | |
2614 | - camera.setAltitude(alt); | |
2613 | + alt = dist/(Math.tan(fov * Math.PI / 180.0)); | |
2614 | + camera.setAltitude(alt); | |
2615 | 2615 | i3GeoMap.getView().setAbstractView(camera); |
2616 | 2616 | }, |
2617 | 2617 | alteraParametroLayers: function(parametro,valor){ | ... | ... |
classesjs/classe_janela.js
... | ... | @@ -29,7 +29,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
29 | 29 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
30 | 30 | */ |
31 | 31 | if(typeof(i3GEO) === 'undefined'){ |
32 | - i3GEO = []; | |
32 | + var i3GEO = {}; | |
33 | 33 | } |
34 | 34 | /* |
35 | 35 | Objeto: YAHOO.i3GEO.janela |
... | ... | @@ -176,7 +176,7 @@ i3GEO.janela = { |
176 | 176 | Default: |
177 | 177 | {50} |
178 | 178 | */ |
179 | - OPACIDADEAGUARDE: 50, | |
179 | + OPACIDADEAGUARDE: 50, | |
180 | 180 | /* |
181 | 181 | Variavel: TIPS |
182 | 182 | |
... | ... | @@ -417,7 +417,7 @@ i3GEO.janela = { |
417 | 417 | Parametros: |
418 | 418 | |
419 | 419 | event {objeto} - objeto YUI do evento que gerou o fechament da janela |
420 | - | |
420 | + | |
421 | 421 | args {objeto} - parametros do evento que fechou a janela |
422 | 422 | */ |
423 | 423 | fecha: function(event,args){ |
... | ... | @@ -447,14 +447,14 @@ i3GEO.janela = { |
447 | 447 | Parametros: |
448 | 448 | |
449 | 449 | id {string} - id da janela |
450 | - */ | |
450 | + */ | |
451 | 451 | destroi: function(id){ |
452 | 452 | var janela = YAHOO.i3GEO.janela.manager.find(id); |
453 | 453 | i3GEO.util.removeScriptTag(id+"_script"); |
454 | 454 | if(janela){ |
455 | 455 | YAHOO.i3GEO.janela.manager.remove(janela); |
456 | 456 | janela.destroy(); |
457 | - } | |
457 | + } | |
458 | 458 | }, |
459 | 459 | /* |
460 | 460 | Function: alteraTamanho |
... | ... | @@ -546,7 +546,7 @@ i3GEO.janela = { |
546 | 546 | janela.destroy(); |
547 | 547 | } |
548 | 548 | } |
549 | - }, | |
549 | + }, | |
550 | 550 | /* |
551 | 551 | Function: ativaAlerta |
552 | 552 | |
... | ... | @@ -614,12 +614,12 @@ i3GEO.janela = { |
614 | 614 | }); |
615 | 615 | YAHOO.i3GEO.janela.manager.register(janela); |
616 | 616 | janela.setHeader(cabecalho); |
617 | - janela.render(document.body); | |
617 | + janela.render(document.body); | |
618 | 618 | } |
619 | 619 | janela.setHeader(cabecalho); |
620 | 620 | janela.cfg.setProperty("text",texto); |
621 | 621 | janela.show(); |
622 | - }, | |
622 | + }, | |
623 | 623 | /* |
624 | 624 | Function: tip |
625 | 625 | |
... | ... | @@ -727,11 +727,11 @@ i3GEO.janela = { |
727 | 727 | janela[2].appendChild(novoel); |
728 | 728 | Event = YAHOO.util.Event; |
729 | 729 | bg="slider-bg"; |
730 | - thumb="slider-thumb"; | |
730 | + thumb="slider-thumb"; | |
731 | 731 | novoel.style.position = "relative"; |
732 | 732 | novoel.style.background= 'url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat'; |
733 | 733 | novoel.style.height = "28px"; |
734 | - novoel.style.width= "228px"; | |
734 | + novoel.style.width= "228px"; | |
735 | 735 | // The slider can move 0 pixels up |
736 | 736 | topConstraint = 0; |
737 | 737 | // The slider can move 200 pixels down |
... | ... | @@ -758,20 +758,20 @@ i3GEO.janela = { |
758 | 758 | }, |
759 | 759 | /* |
760 | 760 | Function: comboCabecalhoTemas |
761 | - | |
761 | + | |
762 | 762 | Adiciona no cabeçalho da janela um combo com a lista de temas para janelas abertas por ferramentas |
763 | - | |
763 | + | |
764 | 764 | Essa função é utilizada pelas ferramentas que operam sobre um determinado tema. O combo permite que o usuário |
765 | 765 | selecione um tema e ative a ferramenta para funcionar com esse tema |
766 | - | |
766 | + | |
767 | 767 | Parametros: |
768 | - | |
768 | + | |
769 | 769 | idDiv {string} - id do elemento HTML que receberá o combo |
770 | - | |
770 | + | |
771 | 771 | idCombo {string} - id do combo que será criado |
772 | - | |
772 | + | |
773 | 773 | ferramenta {string} - nome da ferramenta (namespace da classe, por exemplo "tabela" para a classe i3GEOF.tabela |
774 | - | |
774 | + | |
775 | 775 | tipo {string} - tipo de combo |
776 | 776 | */ |
777 | 777 | comboCabecalhoTemas: function(idDiv,idCombo,ferramenta,tipo){ |
... | ... | @@ -805,10 +805,10 @@ i3GEO.janela = { |
805 | 805 | c.onchange = function(){ |
806 | 806 | var valor = $i(idCombo).value; |
807 | 807 | if(valor !== ""){ |
808 | - i3GEO.mapa.ativaTema(valor); | |
808 | + i3GEO.mapa.ativaTema(valor); | |
809 | 809 | i3GEOF[ferramenta].tema = valor; |
810 | 810 | $i("i3GEOF."+ferramenta+"_corpo").innerHTML = ""; |
811 | - eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');"); | |
811 | + eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');"); | |
812 | 812 | } |
813 | 813 | }; |
814 | 814 | }, |
... | ... | @@ -816,18 +816,18 @@ i3GEO.janela = { |
816 | 816 | "", |
817 | 817 | false, |
818 | 818 | tipo |
819 | - ); | |
819 | + ); | |
820 | 820 | } |
821 | 821 | temp = "i3GEO.janela.comboCabecalhoTemas('"+idDiv+"','"+idCombo+"','"+ferramenta+"','"+tipo+"')"; |
822 | 822 | if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(temp) < 0) |
823 | - {i3GEO.eventos.ATUALIZAARVORECAMADAS.push(temp);} | |
824 | - } | |
823 | + {i3GEO.eventos.ATUALIZAARVORECAMADAS.push(temp);} | |
824 | + } | |
825 | 825 | }; |
826 | 826 | try{ |
827 | 827 | //controle dos painéis que podem ser redimensionados |
828 | 828 | YAHOO.widget.ResizePanel = function(el, userConfig) |
829 | 829 | { |
830 | - if (arguments.length > 0) | |
830 | + if (arguments.length > 0) | |
831 | 831 | {YAHOO.widget.ResizePanel.superclass.constructor.call(this, el, userConfig);} |
832 | 832 | }; |
833 | 833 | YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE = "yui-resizepanel"; | ... | ... |
classesjs/classe_login.js
... | ... | @@ -26,10 +26,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
26 | 26 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
27 | 27 | */ |
28 | 28 | if(typeof(i3GEO) === 'undefined'){ |
29 | - i3GEO = []; | |
30 | -} | |
31 | -if(typeof(i3GEOF) === 'undefined'){ | |
32 | - i3GEOF = []; | |
29 | + var i3GEO = {}; | |
33 | 30 | } |
34 | 31 | /* |
35 | 32 | Classe: i3GEO.login | ... | ... |
classesjs/classe_mapa.js
... | ... | @@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
30 | 30 | |
31 | 31 | */ |
32 | 32 | if(typeof(i3GEO) === 'undefined'){ |
33 | - i3GEO = []; | |
33 | + var i3GEO = {}; | |
34 | 34 | } |
35 | 35 | /* |
36 | 36 | Classe: i3GEO.mapa |
... | ... | @@ -43,12 +43,12 @@ como cor de fundo, tipo de imagem, legenda etc. |
43 | 43 | i3GEO.mapa = { |
44 | 44 | /* |
45 | 45 | Propriedade: AUTORESIZE |
46 | - | |
46 | + | |
47 | 47 | Indica se o tamanho do mapa sera ajustado toda vez que o navegador for redimensionado |
48 | - | |
48 | + | |
49 | 49 | Type: |
50 | 50 | {boolean} |
51 | - | |
51 | + | |
52 | 52 | Default: |
53 | 53 | {false} |
54 | 54 | */ |
... | ... | @@ -63,13 +63,13 @@ i3GEO.mapa = { |
63 | 63 | GEOXML: [], |
64 | 64 | /* |
65 | 65 | Function: insereDobraPagina |
66 | - | |
66 | + | |
67 | 67 | Insere o icone do tipo "dobra de pagina" que permite alterar o renderizador do mapa |
68 | - | |
68 | + | |
69 | 69 | Parametros: |
70 | - | |
70 | + | |
71 | 71 | tipo {string} - tipo de icone googlemaps|openlayers |
72 | - | |
72 | + | |
73 | 73 | imagem {string} - endereco da imagem que sera utilizada no icone |
74 | 74 | */ |
75 | 75 | insereDobraPagina: function(tipo,imagem){ |
... | ... | @@ -93,7 +93,7 @@ i3GEO.mapa = { |
93 | 93 | }, |
94 | 94 | /* |
95 | 95 | Function: reposicionaDobraPagina |
96 | - | |
96 | + | |
97 | 97 | Reposiciona o icone do tipo "dobra de pagina" |
98 | 98 | */ |
99 | 99 | reposicionaDobraPagina: function(){ |
... | ... | @@ -103,12 +103,12 @@ i3GEO.mapa = { |
103 | 103 | } |
104 | 104 | novoel.style.top = i3GEO.parametros.h - 35 + "px"; |
105 | 105 | novoel.style.left = i3GEO.parametros.w - 35 + "px"; |
106 | - }, | |
106 | + }, | |
107 | 107 | /* |
108 | 108 | Function: ativaAutoResize |
109 | - | |
109 | + | |
110 | 110 | Ativa o redimensionamento automatico do mapa sempre que o navegador for redimensionado |
111 | - | |
111 | + | |
112 | 112 | e definido como um evento do elemento window |
113 | 113 | */ |
114 | 114 | ativaAutoResize: function(){ |
... | ... | @@ -121,7 +121,7 @@ i3GEO.mapa = { |
121 | 121 | } |
122 | 122 | if(Math.abs(Dh - i3GEO.tamanhodoc[1]) > 50){ |
123 | 123 | r = true; |
124 | - } | |
124 | + } | |
125 | 125 | if(r === false) |
126 | 126 | {return;} |
127 | 127 | i3GEO.tamanhodoc = [Dw,Dh]; |
... | ... | @@ -181,7 +181,7 @@ i3GEO.mapa = { |
181 | 181 | Altera a variavel i3GEO.temaAtivo e atualiza a interface em funcao do novo tema que for ativado |
182 | 182 | |
183 | 183 | O tema anteriormente ativo tem sua cor alterada para a cor normal e o novo tema e destacado com uma cor diferente |
184 | - | |
184 | + | |
185 | 185 | Executa tambem as funcoes armazenadas em i3GEO.eventos.ATIVATEMA |
186 | 186 | |
187 | 187 | Parametros: |
... | ... | @@ -470,7 +470,7 @@ i3GEO.mapa = { |
470 | 470 | |
471 | 471 | Controla a obtencao da legenda do mapa na forma de uma imagem |
472 | 472 | |
473 | - e utilizado principalmente para armazenar as imagens para a funcao de | |
473 | + e utilizado principalmente para armazenar as imagens para a funcao de | |
474 | 474 | obtencao do historico do mapa |
475 | 475 | */ |
476 | 476 | legendaIMAGEM:{ |
... | ... | @@ -772,9 +772,9 @@ i3GEO.mapa = { |
772 | 772 | eval("var link = ds[s]."+tips[r]+".link"); |
773 | 773 | eval("var img = ds[s]."+tips[r]+".img"); |
774 | 774 | if (tipotip === "completo" || tipotip === "balao"){ |
775 | - if(valor !== "" && link === "") | |
775 | + if(valor !== "" && link === "") | |
776 | 776 | {ins += "<span class='tiptexto' style='text-align:left;font-size:8pt'>" + alias + " :" + valor + "</span><br>";} |
777 | - if(valor !== "" && link !== "") | |
777 | + if(valor !== "" && link !== "") | |
778 | 778 | {ins += "<span class='tiptexto' style='text-align:left;font-size:8pt'>" + alias + " : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >" + valor + "</a></span><br>";} |
779 | 779 | if(img !== "") |
780 | 780 | {ins += img+"<br>";} |
... | ... | @@ -829,7 +829,7 @@ i3GEO.mapa = { |
829 | 829 | document.body.removeChild(balloon.getEventTarget(e)); |
830 | 830 | balloon.hideTooltip(); |
831 | 831 | }; |
832 | - | |
832 | + | |
833 | 833 | } |
834 | 834 | } |
835 | 835 | } | ... | ... |
classesjs/classe_maparef.js
... | ... | @@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | 32 | if(typeof(i3GEO) === 'undefined'){ |
33 | - i3GEO = []; | |
33 | + var i3GEO = {}; | |
34 | 34 | } |
35 | 35 | /* |
36 | 36 | Classe: i3GEO.maparef |
... | ... | @@ -145,7 +145,7 @@ i3GEO.maparef = { |
145 | 145 | */ |
146 | 146 | inicia: function(){ |
147 | 147 | if(typeof(console) !== 'undefined'){console.info("i3GEO.maparef.inicia()");} |
148 | - var r,pos,novoel,ins,temp,moveX,moveY,escondeRef,janela; | |
148 | + var r,pos,novoel,ins,temp,moveX,moveY,escondeRef,janela; | |
149 | 149 | if($i("i3geo_winRef")){ |
150 | 150 | janela = YAHOO.i3GEO.janela.manager.find("i3geo_winRef"); |
151 | 151 | janela.show(); | ... | ... |
classesjs/classe_navega.js
... | ... | @@ -29,7 +29,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
29 | 29 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
30 | 30 | */ |
31 | 31 | if(typeof(i3GEO) === 'undefined'){ |
32 | - i3GEO = []; | |
32 | + var i3GEO = {}; | |
33 | 33 | } |
34 | 34 | /* |
35 | 35 | Classe: i3GEO.navega |
... | ... | @@ -76,11 +76,11 @@ i3GEO.navega = { |
76 | 76 | timerNavega: null, |
77 | 77 | /* |
78 | 78 | Function: centroDoMapa |
79 | - | |
79 | + | |
80 | 80 | Obtém as coordenadas geográficas do centro do mapa |
81 | - | |
81 | + | |
82 | 82 | Retorno: |
83 | - | |
83 | + | |
84 | 84 | {array|false} - false se falhar ou [x,y] se não falhar |
85 | 85 | */ |
86 | 86 | centroDoMapa: function(){ |
... | ... | @@ -104,7 +104,7 @@ i3GEO.navega = { |
104 | 104 | break; |
105 | 105 | default: |
106 | 106 | return false; |
107 | - } | |
107 | + } | |
108 | 108 | }, |
109 | 109 | marcaCentroDoMapa: function(xy){ |
110 | 110 | if(typeof(console) !== 'undefined'){console.info("i3GEO.navega.marcaCentroDoMapa()");} |
... | ... | @@ -493,7 +493,7 @@ i3GEO.navega = { |
493 | 493 | |
494 | 494 | A rosa permite que o usuário navegue no mapa sem ter de alterar a opção atual de navegação. |
495 | 495 | |
496 | - A rosa é mostrada apenas se a variável i3GEO.configura.mostraRosaDosVentos for = a "sim".<b> | |
496 | + A rosa é mostrada apenas se a variável i3GEO.configura.mostraRosaDosVentos for = a "sim".<b> | |
497 | 497 | |
498 | 498 | Para que a rosa seja mostrada, é necessário que esta função esteja registrada em |
499 | 499 | |
... | ... | @@ -1342,9 +1342,9 @@ i3GEO.navega = { |
1342 | 1342 | Function: google |
1343 | 1343 | |
1344 | 1344 | Abre a janela de diálogo da ferramenta google permitindo a navegação integrada com o GoogleMaps |
1345 | - | |
1345 | + | |
1346 | 1346 | Parametros: |
1347 | - | |
1347 | + | |
1348 | 1348 | coordenadas {array} - array com os pares de coordenadas x,y que serão adicionados ao mapa do google (opcional) |
1349 | 1349 | */ |
1350 | 1350 | google: function(coordenadas){ | ... | ... |
classesjs/classe_php.js
... | ... | @@ -29,7 +29,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
29 | 29 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
30 | 30 | */ |
31 | 31 | if(typeof(i3GEO) === 'undefined'){ |
32 | - i3GEO = []; | |
32 | + var i3GEO = {}; | |
33 | 33 | } |
34 | 34 | /* |
35 | 35 | Propriedade: cpJSON |
... | ... | @@ -157,7 +157,7 @@ i3GEO.php = { |
157 | 157 | excluitema: function(funcao,temas){ |
158 | 158 | var layer,retorno,p,n,i,par; |
159 | 159 | i3GEO.php.verifica(); |
160 | - retorno = function(retorno){ | |
160 | + retorno = function(retorno){ | |
161 | 161 | i3GEO.janela.fechaAguarde("excluitema"); |
162 | 162 | n = temas.length; |
163 | 163 | for(i=0;i<n;i++){ |
... | ... | @@ -212,9 +212,12 @@ i3GEO.php = { |
212 | 212 | } |
213 | 213 | if(arguments.length === 2) |
214 | 214 | {template = "legenda2.htm";} |
215 | - var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php", | |
216 | - par = "funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid; | |
217 | - cpJSON.call(p,"criaLegendaHTML",funcao,par); | |
215 | + cpJSON.call( | |
216 | + i3GEO.configura.locaplic+"/classesphp/mapa_controle.php", | |
217 | + "criaLegendaHTML", | |
218 | + funcao, | |
219 | + "funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid | |
220 | + ); | |
218 | 221 | }, |
219 | 222 | /* |
220 | 223 | Function: inverteStatusClasse |
... | ... | @@ -624,7 +627,7 @@ i3GEO.php = { |
624 | 627 | if(atualiza === undefined) |
625 | 628 | {atualiza = true;} |
626 | 629 | if(ext === undefined) |
627 | - {alert("extensao nao definida");return;} | |
630 | + {alert("extensao nao definida");return;} | |
628 | 631 | retorno = function(retorno){ |
629 | 632 | switch(i3GEO.Interface.ATUAL) |
630 | 633 | { |
... | ... | @@ -826,7 +829,7 @@ i3GEO.php = { |
826 | 829 | p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php"; |
827 | 830 | par = "funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid; |
828 | 831 | i3GEO.janela.abreAguarde("zoomtema",$trad("o1")); |
829 | - cpJSON.call(p,"zoomtema",retorno,par); | |
832 | + cpJSON.call(p,"zoomtema",retorno,par); | |
830 | 833 | }, |
831 | 834 | /* |
832 | 835 | Function: zoomsel |
... | ... | @@ -1196,7 +1199,7 @@ i3GEO.php = { |
1196 | 1199 | Function: converte2googlemaps |
1197 | 1200 | |
1198 | 1201 | <CONVERTE2GOOGLEMAPS> |
1199 | - */ | |
1202 | + */ | |
1200 | 1203 | converte2googlemaps: function(funcao){ |
1201 | 1204 | i3GEO.php.verifica(); |
1202 | 1205 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php", |
... | ... | @@ -1206,13 +1209,13 @@ i3GEO.php = { |
1206 | 1209 | funcao.call(funcao,retorno); |
1207 | 1210 | }; |
1208 | 1211 | i3GEO.janela.abreAguarde("converte2googlemaps",$trad("o1")); |
1209 | - cpJSON.call(p,"converte2googlemaps",retorno,par); | |
1212 | + cpJSON.call(p,"converte2googlemaps",retorno,par); | |
1210 | 1213 | }, |
1211 | 1214 | /* |
1212 | 1215 | Function: converte2openlayers |
1213 | 1216 | |
1214 | 1217 | <CONVERTE2OPENLAYERS> |
1215 | - */ | |
1218 | + */ | |
1216 | 1219 | converte2openlayers: function(funcao){ |
1217 | 1220 | i3GEO.php.verifica(); |
1218 | 1221 | var p = i3GEO.configura.locaplic+"/classesphp/mapa_controle.php", |
... | ... | @@ -1222,7 +1225,7 @@ i3GEO.php = { |
1222 | 1225 | funcao.call(funcao,retorno); |
1223 | 1226 | }; |
1224 | 1227 | i3GEO.janela.abreAguarde("converte2openlayers",$trad("o1")); |
1225 | - cpJSON.call(p,"converte2openlayers",retorno,par); | |
1228 | + cpJSON.call(p,"converte2openlayers",retorno,par); | |
1226 | 1229 | }, |
1227 | 1230 | /* |
1228 | 1231 | Function: criamapa | ... | ... |
classesjs/classe_selecao.js
classesjs/classe_social.js
classesjs/classe_tema.js
... | ... | @@ -27,7 +27,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
27 | 27 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
28 | 28 | */ |
29 | 29 | if(typeof(i3GEO) === 'undefined'){ |
30 | - i3GEO = []; | |
30 | + var i3GEO = {}; | |
31 | 31 | } |
32 | 32 | /* |
33 | 33 | Classe: i3GEO.tema |
... | ... | @@ -39,9 +39,9 @@ Em i3GEO.tema.dialogo estao as funcoes de abertura dos dialogos para alteracao d |
39 | 39 | i3GEO.tema = { |
40 | 40 | /* |
41 | 41 | Variable: TEMPORIZADORESID |
42 | - | |
42 | + | |
43 | 43 | Objeto que contem os identificadores dos temporizadores (setInterval) estabelecidos para cada camada |
44 | - | |
44 | + | |
45 | 45 | Type: |
46 | 46 | {objeto} - {idtema:{idtemporizador:,tempo:}} |
47 | 47 | */ |
... | ... | @@ -59,9 +59,8 @@ i3GEO.tema = { |
59 | 59 | if(typeof(console) !== 'undefined'){console.info("i3GEO.tema.exclui()");} |
60 | 60 | g_operacao = "excluitema"; |
61 | 61 | //remove o tema do DOM e seus filhos |
62 | - var p; | |
63 | 62 | try{ |
64 | - p = document.getElementById("idx"+tema).parentNode.parentNode.parentNode; | |
63 | + var p = document.getElementById("idx"+tema).parentNode.parentNode.parentNode; | |
65 | 64 | do |
66 | 65 | {p.removeChild(p.childNodes[0]);} |
67 | 66 | while |
... | ... | @@ -99,17 +98,19 @@ i3GEO.tema = { |
99 | 98 | sobe: function(tema){ |
100 | 99 | if(typeof(console) !== 'undefined'){console.info("i3GEO.tema.sobe()");} |
101 | 100 | i3GEO.mapa.ativaTema(tema); |
102 | - var temp = function(retorno){ | |
103 | - // | |
104 | - //atualiza apenas remonta a arvore | |
105 | - //no caso de interfaces como openlayers | |
106 | - //e necessario mover o DIV tbm | |
107 | - // | |
108 | - i3GEO.atualiza(retorno); | |
109 | - if(i3GEO.Interface.ATUAL === "openlayers") | |
110 | - {i3GEO.Interface.openlayers.ordenaLayers();} | |
111 | - }; | |
112 | - i3GEO.php.sobetema(temp,tema); | |
101 | + i3GEO.php.sobetema( | |
102 | + function(retorno){ | |
103 | + // | |
104 | + //atualiza apenas remonta a arvore | |
105 | + //no caso de interfaces como openlayers | |
106 | + //e necessario mover o DIV tbm | |
107 | + // | |
108 | + i3GEO.atualiza(retorno); | |
109 | + if(i3GEO.Interface.ATUAL === "openlayers") | |
110 | + {i3GEO.Interface.openlayers.ordenaLayers();} | |
111 | + }, | |
112 | + tema | |
113 | + ); | |
113 | 114 | }, |
114 | 115 | /* |
115 | 116 | Function: desce |
... | ... | @@ -123,17 +124,19 @@ i3GEO.tema = { |
123 | 124 | desce: function(tema){ |
124 | 125 | if(typeof(console) !== 'undefined'){console.info("i3GEO.tema.desce()");} |
125 | 126 | i3GEO.mapa.ativaTema(tema); |
126 | - var temp = function(retorno){ | |
127 | - // | |
128 | - //atualiza apenas remonta a arvore | |
129 | - //no caso de interfaces como openlayers | |
130 | - //e necessario mover o DIV tbm | |
131 | - // | |
132 | - i3GEO.atualiza(retorno); | |
133 | - if(i3GEO.Interface.ATUAL === "openlayers") | |
134 | - {i3GEO.Interface.openlayers.ordenaLayers();} | |
135 | - }; | |
136 | - i3GEO.php.descetema(temp,tema); | |
127 | + i3GEO.php.descetema( | |
128 | + function(retorno){ | |
129 | + // | |
130 | + //atualiza apenas remonta a arvore | |
131 | + //no caso de interfaces como openlayers | |
132 | + //e necessario mover o DIV tbm | |
133 | + // | |
134 | + i3GEO.atualiza(retorno); | |
135 | + if(i3GEO.Interface.ATUAL === "openlayers") | |
136 | + {i3GEO.Interface.openlayers.ordenaLayers();} | |
137 | + }, | |
138 | + tema | |
139 | + ); | |
137 | 140 | }, |
138 | 141 | /* |
139 | 142 | Function: zoom |
... | ... | @@ -176,11 +179,13 @@ i3GEO.tema = { |
176 | 179 | if(typeof(console) !== 'undefined'){console.info("i3GEO.tema.limpasel()");} |
177 | 180 | i3GEO.mapa.ativaTema(tema); |
178 | 181 | g_operacao = "limpasel"; |
179 | - var temp = function(retorno){ | |
180 | - i3GEO.atualiza(retorno); | |
181 | - i3GEO.Interface.atualizaTema(retorno,tema); | |
182 | - }; | |
183 | - i3GEO.php.limpasel(temp,tema); | |
182 | + i3GEO.php.limpasel( | |
183 | + function(retorno){ | |
184 | + i3GEO.atualiza(retorno); | |
185 | + i3GEO.Interface.atualizaTema(retorno,tema); | |
186 | + }, | |
187 | + tema | |
188 | + ); | |
184 | 189 | }, |
185 | 190 | /* |
186 | 191 | Function: mudatransp |
... | ... | @@ -195,16 +200,19 @@ i3GEO.tema = { |
195 | 200 | if(typeof(console) !== 'undefined'){console.info("i3GEO.tema.mudatransp()");} |
196 | 201 | i3GEO.mapa.ativaTema(idtema); |
197 | 202 | g_operacao = "transparencia"; |
198 | - var valor = "", | |
199 | - temp = function(retorno){ | |
200 | - i3GEO.atualiza(retorno); | |
201 | - i3GEO.Interface.atualizaTema(retorno,idtema); | |
202 | - }; | |
203 | + var valor = ""; | |
203 | 204 | //o campo input com o valor possui o prefixo 'tr' seguido pelo codigo do tema |
204 | 205 | if ($i("tr"+idtema)) |
205 | 206 | {valor = $i("tr"+idtema).value;} |
206 | 207 | if (valor !== ""){ |
207 | - i3GEO.php.mudatransp(temp,idtema,valor); | |
208 | + i3GEO.php.mudatransp( | |
209 | + function(retorno){ | |
210 | + i3GEO.atualiza(retorno); | |
211 | + i3GEO.Interface.atualizaTema(retorno,idtema); | |
212 | + }, | |
213 | + idtema, | |
214 | + valor | |
215 | + ); | |
208 | 216 | } |
209 | 217 | else |
210 | 218 | {alert($trad("x16"));} |
... | ... | @@ -223,11 +231,13 @@ i3GEO.tema = { |
223 | 231 | alert($trad("x17")); |
224 | 232 | i3GEO.mapa.ativaTema(idtema); |
225 | 233 | g_operacao = "transparencia"; |
226 | - var temp = function(retorno){ | |
227 | - i3GEO.atualiza(retorno); | |
228 | - i3GEO.arvoreDeCamadas.atualiza(); | |
229 | - }; | |
230 | - i3GEO.php.invertestatuslegenda(temp,idtema); | |
234 | + i3GEO.php.invertestatuslegenda( | |
235 | + function(retorno){ | |
236 | + i3GEO.atualiza(retorno); | |
237 | + i3GEO.arvoreDeCamadas.atualiza(); | |
238 | + }, | |
239 | + idtema | |
240 | + ); | |
231 | 241 | }, |
232 | 242 | /* |
233 | 243 | Function: alteracorclasse |
... | ... | @@ -245,12 +255,16 @@ i3GEO.tema = { |
245 | 255 | alteracorclasse: function(idtema,idclasse,rgb){ |
246 | 256 | if(typeof(console) !== 'undefined'){console.info("i3GEO.tema.alteracorclasse()");} |
247 | 257 | i3GEO.mapa.ativaTema(idtema); |
248 | - var temp = function(){ | |
249 | - i3GEO.atualiza(); | |
250 | - i3GEO.Interface.atualizaTema("",idtema); | |
251 | - i3GEO.arvoreDeCamadas.atualizaLegenda(idtema); | |
252 | - }; | |
253 | - i3GEO.php.aplicaCorClasseTema(temp,idtema,idclasse,rgb); | |
258 | + i3GEO.php.aplicaCorClasseTema( | |
259 | + temp = function(){ | |
260 | + i3GEO.atualiza(); | |
261 | + i3GEO.Interface.atualizaTema("",idtema); | |
262 | + i3GEO.arvoreDeCamadas.atualizaLegenda(idtema); | |
263 | + }, | |
264 | + idtema, | |
265 | + idclasse, | |
266 | + rgb | |
267 | + ); | |
254 | 268 | }, |
255 | 269 | /* |
256 | 270 | Function: mudanome |
... | ... | @@ -301,8 +315,6 @@ i3GEO.tema = { |
301 | 315 | */ |
302 | 316 | mostralegendajanela: function(idtema,nome,tipoOperacao){ |
303 | 317 | if(typeof(console) !== 'undefined'){console.info("i3GEO.tema.mostralegendajanela()");} |
304 | - //alert(idtema+" "+status) | |
305 | - var retorna,janela; | |
306 | 318 | if(tipoOperacao === "ativatimer"){ |
307 | 319 | mostralegendajanelaTimer = setTimeout("i3GEO.tema.mostralegendajanela('"+idtema+"','"+nome+"','abrejanela')",4000); |
308 | 320 | } |
... | ... | @@ -311,16 +323,19 @@ i3GEO.tema = { |
311 | 323 | catch(e){ |
312 | 324 | if(typeof(console) !== 'undefined'){console.error(e);} |
313 | 325 | } |
314 | - retorna = function(retorno){ | |
315 | - $i("janelaLegenda"+idtema+"_corpo").innerHTML = retorno.data.legenda; | |
316 | - }; | |
317 | 326 | if(!$i("janelaLegenda"+idtema)){ |
318 | - janela = i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false); | |
327 | + var janela = i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false); | |
319 | 328 | janela[2].style.textAlign="left"; |
320 | 329 | janela[2].style.background="white"; |
321 | 330 | janela[2].innerHTML = $trad("o1"); |
322 | 331 | } |
323 | - i3GEO.php.criaLegendaHTML(retorna,idtema,"legenda3.htm"); | |
332 | + i3GEO.php.criaLegendaHTML( | |
333 | + function(retorno){ | |
334 | + $i("janelaLegenda"+idtema+"_corpo").innerHTML = retorno.data.legenda; | |
335 | + }, | |
336 | + idtema, | |
337 | + "legenda3.htm" | |
338 | + ); | |
324 | 339 | } |
325 | 340 | if(tipoOperacao === "desativatimer"){ |
326 | 341 | clearTimeout(mostralegendajanelaTimer); |
... | ... | @@ -350,7 +365,7 @@ i3GEO.tema = { |
350 | 365 | } |
351 | 366 | catch(e){} |
352 | 367 | } |
353 | - }, | |
368 | + }, | |
354 | 369 | /* |
355 | 370 | Classe: i3GEO.tema.dialogo |
356 | 371 | |
... | ... | @@ -428,8 +443,7 @@ i3GEO.tema = { |
428 | 443 | if(arguments.lenght === 1) |
429 | 444 | {tipo = "kml";} |
430 | 445 | if(typeof(i3GEOF.converteKml) === 'undefined'){ |
431 | - var js = i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js"; | |
432 | - i3GEO.util.scriptTag(js,"i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script"); | |
446 | + i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js","i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script"); | |
433 | 447 | } |
434 | 448 | else |
435 | 449 | {i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo);} | ... | ... |
classesjs/classe_util.js
... | ... | @@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&ccedil;o |
30 | 30 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
31 | 31 | */ |
32 | 32 | if(typeof(i3GEO) === 'undefined'){ |
33 | - i3GEO = []; | |
33 | + var i3GEO = {}; | |
34 | 34 | } |
35 | 35 | /* |
36 | 36 | Propriedade: navm |
... | ... | @@ -108,7 +108,7 @@ g_tipoacao = "zoomli"; |
108 | 108 | Function: $i |
109 | 109 | |
110 | 110 | Obtem um elemento DOM a partir de seu id |
111 | - | |
111 | + | |
112 | 112 | Parametros: |
113 | 113 | |
114 | 114 | id - {String} ID do elemento. |
... | ... | @@ -188,14 +188,14 @@ i3GEO.util = { |
188 | 188 | /* |
189 | 189 | Function: insereCookie |
190 | 190 | |
191 | - Cria um novo cookie. | |
192 | - | |
191 | + Cria um novo cookie. | |
192 | + | |
193 | 193 | Parametros: |
194 | 194 | |
195 | 195 | nome - {String} Nome do cookie. |
196 | 196 | |
197 | 197 | valor - {String} Valor do cookie |
198 | - | |
198 | + | |
199 | 199 | expira - {numerico} Dias que levara para expirar |
200 | 200 | */ |
201 | 201 | insereCookie: function(nome,valor,expira) { |
... | ... | @@ -210,8 +210,8 @@ i3GEO.util = { |
210 | 210 | /* |
211 | 211 | Function: pegaCookie |
212 | 212 | |
213 | - Pega o valor de um cookie. | |
214 | - | |
213 | + Pega o valor de um cookie. | |
214 | + | |
215 | 215 | Parametros: |
216 | 216 | |
217 | 217 | nome - {String} Nome do cookie. |
... | ... | @@ -235,8 +235,8 @@ i3GEO.util = { |
235 | 235 | /* |
236 | 236 | Function: listaChaves |
237 | 237 | |
238 | - Lista as chaves de um objeto. | |
239 | - | |
238 | + Lista as chaves de um objeto. | |
239 | + | |
240 | 240 | Parametros: |
241 | 241 | |
242 | 242 | obj - {Object} |
... | ... | @@ -261,7 +261,7 @@ i3GEO.util = { |
261 | 261 | Cria um botao flutuante do tipo aplicar. |
262 | 262 | |
263 | 263 | O novo botao e adicionado no DOM com ID "i3geo_aplicar" e posicionado sobre o objeto definido |
264 | - | |
264 | + | |
265 | 265 | Parametros: |
266 | 266 | |
267 | 267 | nomeFuncao - {String} Nome da funcao que sera executada quando o botao for cllicado |
... | ... | @@ -505,7 +505,7 @@ i3GEO.util = { |
505 | 505 | Os cursores disponiveis sao definidos por default em classe_configura.js |
506 | 506 | |
507 | 507 | Exemplo i3GEO.util.mudaCursor("","crosshair") |
508 | - | |
508 | + | |
509 | 509 | Parametros: |
510 | 510 | |
511 | 511 | cursores {i3GEO.configura.cursores} - objeto JSON com as URIs de cada cursor (veja i3GEO.configura.cursores) |
... | ... | @@ -664,13 +664,13 @@ i3GEO.util = { |
664 | 664 | Parametros: |
665 | 665 | |
666 | 666 | id {string} - id do elemento que sera posicionado |
667 | - | |
667 | + | |
668 | 668 | x {posicao do pixel} - se nao for definida ou for vazia, sera utilizado o valor de objposicaocursor.telax |
669 | - | |
669 | + | |
670 | 670 | y {posicao do pixel} - se nao for definida ou for vazia, sera utilizado o valor de objposicaocursor.telay |
671 | - | |
671 | + | |
672 | 672 | Return: |
673 | - | |
673 | + | |
674 | 674 | array[top,left] - valores em pixel da posicao calculada da imagem |
675 | 675 | */ |
676 | 676 | posicionaImagemNoMapa: function(id,x,y){ |
... | ... | @@ -742,7 +742,7 @@ i3GEO.util = { |
742 | 742 | valor {String} - valor do input |
743 | 743 | |
744 | 744 | nome {String} - name do input |
745 | - | |
745 | + | |
746 | 746 | onch {String} - (opcional) string que sera inserida no evento "onchange" |
747 | 747 | |
748 | 748 | */ |
... | ... | @@ -835,7 +835,7 @@ i3GEO.util = { |
835 | 835 | |
836 | 836 | yi {Numeric} - coordenada y no mapa (imagem). |
837 | 837 | |
838 | - funcaoOnclick {String} - funcao que sera executada quando a marca | |
838 | + funcaoOnclick {String} - funcao que sera executada quando a marca | |
839 | 839 | for clicada, se for "", o container sera esvaziado ao ser clicado na marca |
840 | 840 | |
841 | 841 | container {String} - id do container que recebera os pontos. Se nao existir um elemento com esse ID, sera criado um novo DIV. No caso da interface google Earth, e utilizado na definicao do nome da marca (setname). |
... | ... | @@ -1311,7 +1311,7 @@ i3GEO.util = { |
1311 | 1311 | scriptTag: function(js,ini,id,aguarde){ |
1312 | 1312 | if(typeof(console) !== 'undefined'){console.info("i3GEO.util.scriptTag()");} |
1313 | 1313 | if(!aguarde){aguarde = false;} |
1314 | - var head,script, | |
1314 | + var head,script, | |
1315 | 1315 | tipojanela = i3GEO.janela.ESTILOAGUARDE; |
1316 | 1316 | |
1317 | 1317 | if(!$i(id) || id === ""){ |
... | ... | @@ -1556,7 +1556,7 @@ i3GEO.util = { |
1556 | 1556 | temp = i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS); |
1557 | 1557 | temp1 = i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp); |
1558 | 1558 | temp2 = i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp); |
1559 | - monta(temp1.concat(temp2)); | |
1559 | + monta(temp1.concat(temp2)); | |
1560 | 1560 | } |
1561 | 1561 | else |
1562 | 1562 | {i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid);} |
... | ... | @@ -2040,7 +2040,7 @@ i3GEO.util = { |
2040 | 2040 | onclick:{fn: function(){ |
2041 | 2041 | eval(anterior+"()"); |
2042 | 2042 | }, |
2043 | - lazyloadmenu:true | |
2043 | + lazyloadmenu:true | |
2044 | 2044 | }}); |
2045 | 2045 | new YAHOO.widget.Button(idatual+"proxima_", |
2046 | 2046 | {onclick:{fn: function(){ |
... | ... | @@ -2333,17 +2333,17 @@ i3GEO.util = { |
2333 | 2333 | }, |
2334 | 2334 | /* |
2335 | 2335 | Function: multiStep |
2336 | - | |
2336 | + | |
2337 | 2337 | Implementa a tecnica de particionamento para execussao de funcoes no modo assincrono |
2338 | - | |
2338 | + | |
2339 | 2339 | Conforme pagina 144 do livro "Javascript de alto desempenho, Nicholas Zakas |
2340 | - | |
2340 | + | |
2341 | 2341 | Parametros: |
2342 | - | |
2342 | + | |
2343 | 2343 | steps {array} - funcoes que serao executadas |
2344 | - | |
2344 | + | |
2345 | 2345 | args {array} - array de arrays com os argumentos de cada funcao |
2346 | - | |
2346 | + | |
2347 | 2347 | callback {function} - funcao que sera executada ao terminar os processos |
2348 | 2348 | */ |
2349 | 2349 | multiStep: function(steps,args,callback){ |
... | ... | @@ -2361,9 +2361,9 @@ i3GEO.util = { |
2361 | 2361 | }, |
2362 | 2362 | /* |
2363 | 2363 | Function: tamanhoBrowser |
2364 | - | |
2364 | + | |
2365 | 2365 | Calcula o tamanho da area util do navegador considerando-se as propriedades nativas do objeto window |
2366 | - | |
2366 | + | |
2367 | 2367 | Return: |
2368 | 2368 | {[w,h]} |
2369 | 2369 | */ |
... | ... | @@ -2398,11 +2398,11 @@ i3GEO.util = { |
2398 | 2398 | }, |
2399 | 2399 | /* |
2400 | 2400 | Function: detectaTablet |
2401 | - | |
2401 | + | |
2402 | 2402 | Verifica se esta em uso um dispositivo do tipo movel |
2403 | - | |
2403 | + | |
2404 | 2404 | Se for detectado, utiliza a interface alternativa definida em i3GEO.Interface.ALTTABLET |
2405 | - | |
2405 | + | |
2406 | 2406 | A deteccao e feita com base em i3geo/pacotes/mobileesp/mdetect.js |
2407 | 2407 | */ |
2408 | 2408 | detectaTablet: function(){ |
... | ... | @@ -2418,9 +2418,9 @@ i3GEO.util = { |
2418 | 2418 | }, |
2419 | 2419 | /* |
2420 | 2420 | Function: calculaDPI |
2421 | - | |
2421 | + | |
2422 | 2422 | Calcula o valor de DPI do monitor. |
2423 | - | |
2423 | + | |
2424 | 2424 | O valor e aproximado e utilizado principalmente na interface OpenLayers |
2425 | 2425 | */ |
2426 | 2426 | calculaDPI: function(){ |
... | ... | @@ -2440,7 +2440,7 @@ i3GEO.util = { |
2440 | 2440 | }, |
2441 | 2441 | /* |
2442 | 2442 | Function: ajustaDocType |
2443 | - | |
2443 | + | |
2444 | 2444 | Ajusta o DOCTYPE do HTML para funcionar com CSS3 |
2445 | 2445 | */ |
2446 | 2446 | ajustaDocType: function(){ |
... | ... | @@ -2460,9 +2460,9 @@ i3GEO.util = { |
2460 | 2460 | }, |
2461 | 2461 | /* |
2462 | 2462 | Function: versaoNavegador |
2463 | - | |
2463 | + | |
2464 | 2464 | Retorna algumas versoes de navegador |
2465 | - */ | |
2465 | + */ | |
2466 | 2466 | versaoNavegador: function(){ |
2467 | 2467 | if(navm && navigator.userAgent.toLowerCase().indexOf('msie 8.') > -1) |
2468 | 2468 | {return "IE8";} |
... | ... | @@ -2472,18 +2472,18 @@ i3GEO.util = { |
2472 | 2472 | }, |
2473 | 2473 | /* |
2474 | 2474 | Function: decimalPlaces |
2475 | - | |
2475 | + | |
2476 | 2476 | Arredonda um numero |
2477 | - | |
2477 | + | |
2478 | 2478 | Obtido de |
2479 | - | |
2479 | + | |
2480 | 2480 | http://stackoverflow.com/questions/4868556/how-do-i-stop-parsefloat-from-stripping-zeroes-to-right-of-decimal/4868718#4868718 |
2481 | 2481 | |
2482 | 2482 | |
2483 | 2483 | Parameters: |
2484 | - | |
2484 | + | |
2485 | 2485 | float {numer} - numero que sera arredondado |
2486 | - | |
2486 | + | |
2487 | 2487 | length {number} - numero de casas decimais |
2488 | 2488 | */ |
2489 | 2489 | decimalPlaces: function(float,length) { |
... | ... | @@ -2505,7 +2505,7 @@ i3GEO.util = { |
2505 | 2505 | } |
2506 | 2506 | } |
2507 | 2507 | return ret; |
2508 | - } | |
2508 | + } | |
2509 | 2509 | }; |
2510 | 2510 | // |
2511 | 2511 | // YUI ACCORDION |
... | ... | @@ -2567,7 +2567,7 @@ try{ |
2567 | 2567 | YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties); |
2568 | 2568 | } |
2569 | 2569 | parentObj = headers[this.properties.ativa].parentNode; |
2570 | - headers = parentObj.getElementsByTagName("dd"); | |
2570 | + headers = parentObj.getElementsByTagName("dd"); | |
2571 | 2571 | header = headers[this.properties.ativa]; |
2572 | 2572 | |
2573 | 2573 | this.expand(header); | ... | ... |
classesjs/compactados/classe_ajuda_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.ajuda={ATIVAJANELA:true,DIVAJUDA:"i3geo_ajuda",DIVLETREIRO:"i3geo_letreiro",MENSAGEMPADRAO:$trad("p1"),TRANSICAOSUAVE:true,OPACIDADE:20,abreDoc:function(url){if(!url){url="/documentacao/index.html"}window.open(i3GEO.configura.locaplic+url)},abreJanela:function(){try{var nx,ny,corpo,texto,janela,temp,largura=262,YU=YAHOO.util,pos=[20,i3GEO.parametros.h/2];if(this.ATIVAJANELA===false){return}temp=$i("contemFerramentas");if(temp){largura=parseInt(temp.style.width,10)-5}if(!$i("janelaMenTexto")){corpo=$i(i3GEO.Interface.IDCORPO);if(corpo){pos=YU.Dom.getXY(corpo)}else{corpo=$i(i3GEO.Interface.IDMAPA);if(corpo){pos=YU.Dom.getXY(corpo)}}nx=pos[0]-largura-3;ny=i3GEO.parametros.h-78;texto='<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>';if(nx<0){nx=10;ny=ny-50}janela=i3GEO.janela.cria(largura-3,"auto","",nx,ny," ","i3geo_janelaMensagens",false,"hd","","",true);janela[2].innerHTML=texto;YU.Event.addListener(janela[0].close,"click",i3GEO.ajuda.fechaJanela);this.ativaCookie()}}catch(e){}},ativaCookie:function(){var i=i3GEO.util.insereCookie;i("g_janelaMen","sim");i("botoesAjuda","sim")},ativaLetreiro:function(mensagem){var l;if($i(i3GEO.ajuda.DIVLETREIRO)){if(arguments.length===0){mensagem=i3GEO.parametros.mensagens}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.ajuda.ativaLetreiro()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.ajuda.ativaLetreiro()")}try{clearTimeout(i3GEO.ajuda.tempoLetreiro)}catch(e){i3GEO.ajuda.tempoLetreiro=""}l=$i(i3GEO.ajuda.DIVLETREIRO);if(l.style.display==="none"){return}l.style.cursor="pointer";if(mensagem===""){l.value="";return}if(l.size===1){l.size=i3GEO.parametros.w/8}BMessage=mensagem+" ---Clique para parar--- ";l.onclick=function(){l.style.display="none"};if(BMessage!==" ---Clique para parar--- "){BQuantas=0;BSize=l.size;BPos=BSize;BSpeed=1;BSpaces="";i3GEO.ajuda.mostraLetreiro()}i3GEO.ajuda.mostraLetreiro(mensagem)}},desativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","nao")},fechaJanela:function(){i3GEO.ajuda.desativaCookie();i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body)},mostraJanela:function(texto){var j=$i(this.DIVAJUDA),k=$i("janelaMenTexto"),jm=$i("i3geo_janelaMensagens"),Dom=YAHOO.util.Dom,h=parseInt(Dom.getStyle(jm,"height"),10);if(j){j.innerHTML=texto===""?"-":texto}else{if(h){Dom.setY("i3geo_janelaMensagens",Dom.getY(jm)+h)}if(k){k.innerHTML=texto}if(this.TRANSICAOSUAVE){texto!==""?Dom.setStyle(jm,"opacity","1"):Dom.setStyle(jm,"opacity",(this.OPACIDADE/100))}h=parseInt(Dom.getStyle(jm,"height"),10);if(h){Dom.setY(jm,Dom.getY(jm)-h)}}},mostraLetreiro:function(){for(var count=0;count<BPos;count+=1){BSpaces+=" "}if(BPos<1){$i(i3GEO.ajuda.DIVLETREIRO).value=BMessage.substring(Math.abs(BPos),BMessage.length);if(BPos+BMessage.length<1){BPos=BSize;BQuantas=BQuantas+1}}else{$i(i3GEO.ajuda.DIVLETREIRO).value=BSpaces+BMessage}BPos-=BSpeed;if(BQuantas<2){i3GEO.ajuda.tempoLetreiro=setTimeout(function(){i3GEO.ajuda.mostraLetreiro()},140)}},redesSociais:function(){i3GEO.janela.cria("400px","400px",i3GEO.configura.locaplic+"/ferramentas/redessociais/index.php","","",$trad("u5c"),YAHOO.util.Dom.generateId(null,"redes"))}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.ajuda={ATIVAJANELA:true,DIVAJUDA:"i3geo_ajuda",DIVLETREIRO:"i3geo_letreiro",MENSAGEMPADRAO:$trad("p1"),TRANSICAOSUAVE:true,OPACIDADE:20,abreDoc:function(url){if(!url){url="/documentacao/index.html"}window.open(i3GEO.configura.locaplic+url)},abreJanela:function(){try{var nx,ny,corpo,texto,janela,temp,largura=262,YU=YAHOO.util,pos=[20,i3GEO.parametros.h/2];if(this.ATIVAJANELA===false){return}temp=$i("contemFerramentas");if(temp){largura=parseInt(temp.style.width,10)-5}if(!$i("janelaMenTexto")){corpo=$i(i3GEO.Interface.IDCORPO);if(corpo){pos=YU.Dom.getXY(corpo)}else{corpo=$i(i3GEO.Interface.IDMAPA);if(corpo){pos=YU.Dom.getXY(corpo)}}nx=pos[0]-largura-3;ny=i3GEO.parametros.h-78;texto='<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>';if(nx<0){nx=10;ny=ny-50}janela=i3GEO.janela.cria(largura-3,"auto","",nx,ny," ","i3geo_janelaMensagens",false,"hd","","",true);janela[2].innerHTML=texto;YU.Event.addListener(janela[0].close,"click",i3GEO.ajuda.fechaJanela);this.ativaCookie()}}catch(e){}},ativaCookie:function(){var i=i3GEO.util.insereCookie;i("g_janelaMen","sim");i("botoesAjuda","sim")},ativaLetreiro:function(mensagem){var l;if($i(i3GEO.ajuda.DIVLETREIRO)){if(arguments.length===0){mensagem=i3GEO.parametros.mensagens}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.ajuda.ativaLetreiro()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.ajuda.ativaLetreiro()")}try{clearTimeout(i3GEO.ajuda.tempoLetreiro)}catch(e){i3GEO.ajuda.tempoLetreiro=""}l=$i(i3GEO.ajuda.DIVLETREIRO);if(l.style.display==="none"){return}l.style.cursor="pointer";if(mensagem===""){l.value="";return}if(l.size===1){l.size=i3GEO.parametros.w/8}BMessage=mensagem+" ---Clique para parar--- ";l.onclick=function(){l.style.display="none"};if(BMessage!==" ---Clique para parar--- "){BQuantas=0;BSize=l.size;BPos=BSize;BSpeed=1;BSpaces="";i3GEO.ajuda.mostraLetreiro()}i3GEO.ajuda.mostraLetreiro(mensagem)}},desativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","nao")},fechaJanela:function(){i3GEO.ajuda.desativaCookie();i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body)},mostraJanela:function(texto){var j=$i(this.DIVAJUDA),k=$i("janelaMenTexto"),jm=$i("i3geo_janelaMensagens"),Dom=YAHOO.util.Dom,h=parseInt(Dom.getStyle(jm,"height"),10);if(j){j.innerHTML=texto===""?"-":texto}else{if(h){Dom.setY("i3geo_janelaMensagens",Dom.getY(jm)+h)}if(k){k.innerHTML=texto}if(this.TRANSICAOSUAVE){texto!==""?Dom.setStyle(jm,"opacity","1"):Dom.setStyle(jm,"opacity",(this.OPACIDADE/100))}h=parseInt(Dom.getStyle(jm,"height"),10);if(h){Dom.setY(jm,Dom.getY(jm)-h)}}},mostraLetreiro:function(){for(var count=0;count<BPos;count+=1){BSpaces+=" "}if(BPos<1){$i(i3GEO.ajuda.DIVLETREIRO).value=BMessage.substring(Math.abs(BPos),BMessage.length);if(BPos+BMessage.length<1){BPos=BSize;BQuantas=BQuantas+1}}else{$i(i3GEO.ajuda.DIVLETREIRO).value=BSpaces+BMessage}BPos-=BSpeed;if(BQuantas<2){i3GEO.ajuda.tempoLetreiro=setTimeout(function(){i3GEO.ajuda.mostraLetreiro()},140)}},redesSociais:function(){i3GEO.janela.cria("400px","400px",i3GEO.configura.locaplic+"/ferramentas/redessociais/index.php","","",$trad("u5c"),YAHOO.util.Dom.generateId(null,"redes"))}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_analise_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.analise={dialogo:{graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},linhaDoTempo:function(){i3GEO.janela.cria("450px","300px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' > </a>");atualizaLinhaDoTempo=function(){var doc="";try{if(navn){if($i("wdocai")){doc=$i("wdocai").contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){i3GEO.parametros.r==="nao"?alert($trad("x22")):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="1px"}g_tipoacao="mede"}else{if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.richdraw.fecha()}var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='<div class="hd" style="font-size:11px"> Distância aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" > </a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td> </td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td> Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td> <input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:"330px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeDistancia.fechaJanela)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","");janela=YAHOO.i3GEO.janela.manager.find("mostradistancia")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1]);if(navm&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var janela;i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostradistancia");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},clique:function(){var n,d,decimal,dd;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> "+$trad("x23")+" (DMS)= "+r;texto+="<br>"+$trad("x24")+": "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};var x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;g_areapixel<0?alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >Área aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" > </a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostraarea",{width:"220px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeArea.fechaJanela)}else{janela=YAHOO.i3GEO.janela.manager.find("mostraarea")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1])},fechaJanela:function(){var janela;i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostraarea");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},clique:function(){var n,m;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{if(navn){pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1)}}catch(men){}m=i3GEO.calculo.area(pontosdistobj,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.analise={dialogo:{graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},linhaDoTempo:function(){i3GEO.janela.cria("450px","300px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' > </a>");atualizaLinhaDoTempo=function(){var doc="";try{if(navn){if($i("wdocai")){doc=$i("wdocai").contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){i3GEO.parametros.r==="nao"?alert($trad("x22")):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="1px"}g_tipoacao="mede"}else{if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.richdraw.fecha()}var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='<div class="hd" style="font-size:11px"> Distância aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" > </a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td> </td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td> Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td> <input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:"330px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeDistancia.fechaJanela)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","");janela=YAHOO.i3GEO.janela.manager.find("mostradistancia")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1]);if(navm&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var janela;i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostradistancia");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},clique:function(){var n,d,decimal,dd;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> "+$trad("x23")+" (DMS)= "+r;texto+="<br>"+$trad("x24")+": "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};var x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;g_areapixel<0?alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >Área aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" > </a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostraarea",{width:"220px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeArea.fechaJanela)}else{janela=YAHOO.i3GEO.janela.manager.find("mostraarea")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1])},fechaJanela:function(){var janela;i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostraarea");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},clique:function(){var n,m;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{if(navn){pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1)}}catch(men){}m=i3GEO.calculo.area(pontosdistobj,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_arvoredecamadas_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeCamadas={BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:true,finaliza:"",EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:true,ANIMAMAPA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true},CAMADAS:"",CAMADASINICIAIS:"",ARVORE:null,IDHTML:"listaTemas",SID:null,LOCAPLIC:null,ATIVATEMA:"",cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=(i3GEO.parametros.w/2)-75+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){eval(i3GEO.arvoreDeCamadas.finaliza)}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,newVal,root,tempNode,titulo,d,c,ltema,temaNode,i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("a7")+"</b></td><td>";titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode);estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:noGrupo,expanded:d},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var ins="",imb=i3GEO.util.$im("branco.gif"),estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(this.ARRASTARLIXEIRA===true){ins+="<img "+estilo("i3geo_lixeira")+" onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='"+$trad("t2")+"' />"}if(this.FILTRAR===true){ins+="<img "+estilo("i3geo_filtro")+" onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' />"}if(this.ABRELEGENDA===true){ins+="<img "+estilo("soltaleg2")+" onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' />"}if(this.ALTERAOPACIDADE===true){ins+="<img "+estilo("opacidadeMapa")+" onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='"+$trad("t20")+"' />"}if(this.ANIMAMAPA===true&&(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps")){ins+="<img "+estilo("animaMapa")+" onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='"+$trad("p21")+"' />"}if(this.LIGARDESLIGARTODOS===true){ins+=" <img "+estilo("olhoAberto")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' />";ins+=" <img "+estilo("olhoFechado")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' />"}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick.call()}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var opcoesNode,idtema,ltema,farol,mfarol,tnome="",imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+=" <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+=" <img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+=" <img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+=" <img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.fonte===true){tnome+=" <img class='fonte' src='"+imb+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(funcoes.zoomtema===true)){tnome+=" <img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node);if(funcoes.compartilhar===true&<ema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:false,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&<ema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;if(funcoes.opacidade===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+" <a class='tic' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+" <a class='tic' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","8","")+" <a class='tic' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' href='#' />"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","10","")+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if((ltema.type<4||ltema.type===8)&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&<ema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&<ema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&<ema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}if(funcoes.tme===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t49"),$trad("t49"),'i3GEO.tema.dialogo.tme(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar){desativar=original.data.desativar;nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.configura.templateLegenda!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.configura.templateLegenda)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name)};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:top;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' >";estilo=navm?"cursor:pointer;vertical-align:15%;":"cursor:pointer;";html+="<input class=inputsb style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:20%;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img style='"+estilo+"' src='"+tema.iconetema+"' />"}if(tema.contextoescala.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+=" <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:20%;color:black;";if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA){html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};try{clearTimeout(tempoBotaoAplicar)}catch(erro){}tempoBotaoAplicar="";if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(idtema,camadas){var i;if(!camadas){camadas=i3GEO.arvoreDeCamadas.CAMADAS}i=camadas.length;while(i>0){i-=1;if(camadas[i].name===idtema){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}if(operador==="menor"){if(temp<valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:true,finaliza:"",EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:true,ANIMAMAPA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true},CAMADAS:"",CAMADASINICIAIS:"",ARVORE:null,IDHTML:"listaTemas",SID:null,LOCAPLIC:null,ATIVATEMA:"",cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=(i3GEO.parametros.w/2)-75+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){eval(i3GEO.arvoreDeCamadas.finaliza)}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,newVal,root,tempNode,titulo,d,c,ltema,temaNode,i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("a7")+"</b></td><td>";titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode);estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:noGrupo,expanded:d},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var ins="",imb=i3GEO.util.$im("branco.gif"),estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(this.ARRASTARLIXEIRA===true){ins+="<img "+estilo("i3geo_lixeira")+" onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='"+$trad("t2")+"' />"}if(this.FILTRAR===true){ins+="<img "+estilo("i3geo_filtro")+" onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' />"}if(this.ABRELEGENDA===true){ins+="<img "+estilo("soltaleg2")+" onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' />"}if(this.ALTERAOPACIDADE===true){ins+="<img "+estilo("opacidadeMapa")+" onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='"+$trad("t20")+"' />"}if(this.ANIMAMAPA===true&&(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps")){ins+="<img "+estilo("animaMapa")+" onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='"+$trad("p21")+"' />"}if(this.LIGARDESLIGARTODOS===true){ins+=" <img "+estilo("olhoAberto")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' />";ins+=" <img "+estilo("olhoFechado")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' />"}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick.call()}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var opcoesNode,idtema,ltema,farol,mfarol,tnome="",imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+=" <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+=" <img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+=" <img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+=" <img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.fonte===true){tnome+=" <img class='fonte' src='"+imb+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(funcoes.zoomtema===true)){tnome+=" <img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node);if(funcoes.compartilhar===true&<ema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:false,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&<ema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;if(funcoes.opacidade===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+" <a class='tic' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+" <a class='tic' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","8","")+" <a class='tic' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' href='#' />"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","10","")+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if((ltema.type<4||ltema.type===8)&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&<ema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&<ema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&<ema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.login.verificaCookieLogin()&&i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}if(funcoes.tme===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t49"),$trad("t49"),'i3GEO.tema.dialogo.tme(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar){desativar=original.data.desativar;nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.configura.templateLegenda!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.configura.templateLegenda)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name)};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:top;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' >";estilo=navm?"cursor:pointer;vertical-align:15%;":"cursor:pointer;";html+="<input class=inputsb style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:20%;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img style='"+estilo+"' src='"+tema.iconetema+"' />"}if(tema.contextoescala.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+=" <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:20%;color:black;";if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA){html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};try{clearTimeout(tempoBotaoAplicar)}catch(erro){}tempoBotaoAplicar="";if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(idtema,camadas){var i;if(!camadas){camadas=i3GEO.arvoreDeCamadas.CAMADAS}i=camadas.length;while(i>0){i-=1;if(camadas[i].name===idtema){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}if(operador==="menor"){if(temp<valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_arvoredetemas_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:true,uploadlocal:true,uploadarquivo:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,conectargeojson:true,nuvemTags:true,nuvemTagsFlash:false,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true,carousel:true,inde:true,uploadgpx:true,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true,flutuante:true},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:false,IDSMENUS:[],RETORNAGUIA:"",IDHTML:"arvoreAdicionaTema",LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,flutuante:function(){var janela,temp,cabecalho,minimiza,idold,corpo,altura;cabecalho=function(){};if($i("i3GEOFcatalogo_corpo")){return}minimiza=function(){i3GEO.janela.minimiza("i3GEOFcatalogo")};altura=i3GEO.parametros.w-150;if(altura>500){altura=500}janela=i3GEO.janela.cria("360px",altura+"px","","","",$trad("g1a"),"i3GEOFcatalogo",false,"hd",cabecalho,minimiza);temp=function(){delete(i3GEO.arvoreDeTemas.ARVORE)};YAHOO.util.Event.addListener(janela[0].close,"click",temp,janela[0].panel,{id:janela[0].id},true);corpo=$i("i3GEOFcatalogo_corpo");corpo.style.backgroundColor="white";corpo.innerHTML=$trad("o1");corpo.style.overflow="auto";if($i(i3GEO.arvoreDeTemas.IDHTML)){$i(i3GEO.arvoreDeTemas.IDHTML).innerHTML=""}idold=i3GEO.arvoreDeTemas.IDHTML;delete(i3GEO.arvoreDeTemas.ARVORE);i3GEO.arvoreDeTemas.IDHTML="i3GEOFcatalogo_corpo";i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"");i3GEO.arvoreDeTemas.IDHTML=idold},listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos não definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0,expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,temp;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.arvoreDeTemas.checked=false;i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\")";html+="onclick='javascript:"+adiciona+"' "+" type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >"+layer+" - "+titulo+"</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){var c,m,i,k,jj,j;if(i3GEO.arvoreDeTemas.IDSMENUS.length===0){i3GEO.arvoreDeTemas.MENUS=retorno.data}else{i3GEO.arvoreDeTemas.MENUS=[];c=retorno.data.length;m=i3GEO.arvoreDeTemas.IDSMENUS.length;for(i=0,j=c;i<j;i+=1){for(k=0,jj=m;k<jj;k+=1){if(retorno.data[i].idmenu===i3GEO.arvoreDeTemas.IDSMENUS[k]){i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i])}}}}if(funcao!==""){eval(funcao+"(retorno)")}};i3GEO.php.pegalistademenus(retorno)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data[0];if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var montanos=function(retorno){try{var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight:false},node)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red'>Nada encontrado<br><br></span>",isLeaf:true,expanded:false,enableHighlight:false},node)}}}node.loadComplete()}catch(e){}};i3GEO.php.procurartemasestrela(montanos,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1)},cria:function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes,tipoBotao){if(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.IDHTML)},montaArvore:function(){var tempNode,tempNode1,retorno,root,insp,outrasOpcoes,dados,c,i,j,conteudo,editor;(function(){function changeIconMode(){buildTree()}function buildTree(){i3GEO.arvoreDeTemas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<br><br><table><tr>"+"<td><span style='font-size:12px'> "+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' > </a></span></td>"+"<td><input onclick='javascript:this.select();' class='digitar' type='text' id='i3geo_buscatema' size='15' value='' /></td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table> ";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+" <br>",isLeaf:true,enableHighlight:false,expanded:false,hasIcon:false},root)}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin' target=blank >Sistema de administração</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/arvore.html' target=blank >Editar árvore</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='opção visível apenas para editores' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >Editar menus</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php?tipoxml=kml' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/visual/default/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.flutuante===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='#' onclick='i3GEO.arvoreDeTemas.flutuante()' >Abrir em janela flutuante</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<b> OGC-WMS</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>"+editor,idwms:"raiz",expanded:false,enableHighlight:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<b> "+$trad("t46")+"</b> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' > </a>",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+$im("e"+ig+".png")+"' />",enableHighlight:false,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<b> <span title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<b> <span title='nao publicado' ><s>"+dados[i].nomemenu+"</s></span>"+editor}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu,enableHighlight:false,expanded:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,1);if(dados[i].status==="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"<b>Sistemas</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' > </a>",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<s>"+sis[ig].NOME+"</s>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','Sistemas')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt);if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}}},adicionaNoNavegacaoDir:function(){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){var temp=function(){var drives,iglt,ig,drive,tempNode;drives=i3GEO.arvoreDeTemas.DRIVES;if(drives==undefined||drives==""||drives.length===0){i3GEO.arvoreDeTemas.ARVORE.draw();return}iglt=drives.length;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' > </a>",enableHighlight:false,expanded:false},i3GEO.arvoreDeTemas.ARVORE.getRoot());ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho,enableHighlight:false,expanded:false},tempNode);drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig+=1}while(ig<iglt);i3GEO.arvoreDeTemas.ARVORE.draw()};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,temp)}},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra&&raiz[i].nome!=""){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&grupos[i].nome!=undefined){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' ><s>"+grupos[i].nome+"</s></span>"}}d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos,1);tempNode.isLeaf=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&subgrupos[i].nome!=undefined){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' ><s>"+subgrupos[i].nome+"</s></span>"}}d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaSubGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' ><s>"+temas[i].nome+"</s></span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,conteudo,dirs,tempNode,arquivos;dirs=retorno.data.diretorios;for(ig=0;ig<dirs.length;ig+=1){tempNode=new YAHOO.widget.HTMLNode({html:dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='i3GEO.util.adicionaSHP(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:conteudo,caminho:node.data.caminho+"/"+conteudo},node)}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html,estilo="",clique;if(navm){estilo="padding-top:1px;"}html="<td style='"+estilo+"'><span>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img title='"+tema.tid+"' src='"+$im("down1.gif")+"'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{if(i3GEO.arvoreDeTemas.ATIVATEMAIMEDIATO===false){clique="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeTemas.adicionaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicar\",this)'"}else{clique="onclick='i3GEO.arvoreDeTemas.adicionaTemas([\""+tema.tid+"\"])'"}}html+=clique;if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="</td><td title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='cursor:pointer;font-size:11px;text-align:left;color:"+cor+";padding-left:0px;' "+clique+">";html+=tema.nome;html+="</td></span>";return(html)},propTemas:function(node){var html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >"+$trad("x19")+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface=openlayers_t.htm&temasa="+node.data.idtema+"&layers="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface=openlayers_t.htm&temasa="+node.data.idtema+"&layers="+node.data.idtema;new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>":"<img src='"+i3GEO.util.$im("e0.png")+"'/>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0,imb=i3GEO.util.$im("branco.gif"),OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS,estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(OPCOESADICIONAIS.refresh===true){ins+="<td><img "+estilo("refresh")+" onclick='i3GEO.arvoreDeTemas.atualiza()' title='Refresh'/></td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectaservico()' title='"+$trad("a15")+"'/></td>";t+=20;ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' title='"+$trad("a14")+"'/></td>";t+=20}else{if(OPCOESADICIONAIS.uploadgpx===true){ins+="<td><img "+estilo("uploadgpx")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' title='upload GPX'/></td>";t+=20}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<td><img "+estilo("uploaddbf")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' title='"+$trad("a2b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.uploadlocal===true){ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.upload()' title='"+$trad("a2")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carregaKml===true){ins+="<td><img "+estilo("carregarKml")+" onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' title='Kml'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwms===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' title='"+$trad("a4")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<td><img "+estilo("conectarwmst")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' title='"+$trad("a4b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<td><img "+estilo("conectargeorss")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' title='"+$trad("a5")+"'/></td>";t+=20}}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img "+estilo("download")+" onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' title='"+$trad("a3")+"'/></td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img "+estilo("importarwmc")+" onclick='i3GEO.arvoreDeTemas.dialogo.importarwmc()' title='"+$trad("a3a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img "+estilo("carouselTemas")+" onclick='i3GEO.arvoreDeTemas.dialogo.carouselTemas()' title='Miniaturas'/></td>";t+=20}if(OPCOESADICIONAIS.inde===true){ins+="<td><img "+estilo("buscaInde")+" onclick='i3GEO.arvoreDeTemas.dialogo.buscaInde()' title='Pesquisa na INDE'/></td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk="";if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,html:d,expanded:false},nodePalavra)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,expanded:false,html:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var temp;try{clearTimeout(tempoBotaoAplicar)}catch(e){}tempoBotaoAplicar="";i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length===1&&i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){temp=window.confirm("O tema existe no mapa. Adiciona novamente?");if(!temp){return}}if(tsl.length>0){temp=function(retorno){i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!==i3GEO.guias.ATUAL){i3GEO.guias.escondeGuias();i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.php.adtema(temp,tsl.toString())}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig+=1){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFuploadarquivo")};titulo="Upload de arquivo</a>";janela=i3GEO.janela.cria("250px","150px","","","",titulo,"i3GEOFuploadarquivo",false,"hd",cabecalho,minimiza);$i("i3GEOFuploadarquivo_corpo").style.backgroundColor="white";$i("i3GEOFuploadarquivo_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de arquivo</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.uploadlocal===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.upload()' /></td>"+" <td>Shape file</td>"+" </tr>"}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' /></td>"+" <td>DBF ou CSV</td>"+" </tr>"}if(OPCOESADICIONAIS.uploadgpx===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' /></td>"+" <td>GPX</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadkml()' /></td>"+" <td>KML ou KMZ</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},conectaservico:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFconectaservico")};titulo="Conexão com serviços</a>";janela=i3GEO.janela.cria("260px","150px","","","",titulo,"i3GEOFconectaservico",false,"hd",cabecalho,minimiza);$i("i3GEOFconectaservico_corpo").style.backgroundColor="white";$i("i3GEOFconectaservico_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de conex&aatilde;o</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.carregaKml===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' /></td>"+" <td>KML</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwms===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' /></td>"+" <td>WMS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' /></td>"+" <td>WMS-T</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' /></td>"+" <td>GeoRSS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeojson===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeojson()' /></td>"+" <td>GeoJson</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},carregaKml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carregakml/index.js","i3GEOF.carregakml.criaJanelaFlutuante()","i3GEOF.carregakml_script")},carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},buscaInde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/index.js","i3GEOF.buscainde.criaJanelaFlutuante()","i3GEOF.buscainde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.js","i3GEOF.nuvemtags.criaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","","Nuvem Flash")},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","Diretórios")},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/index.js","i3GEOF.importarwmc.criaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' > </a>")},conectarwmst:function(){var l,a;if(i3GEO.parametros.w){l=i3GEO.parametros.w+150}else{l=400}if(i3GEO.parametros.h){a=i3GEO.parametros.h+200}else{a=350}i3GEO.janela.cria(l/2+"px",a/2+"px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' > </a>")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeojson:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectargeojson/index.js","i3GEOF.conectargeojson.criaJanelaFlutuante()","i3GEOF.conectargeojson_script")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=29' > </a>")},upload:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js","i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")},uploaddbf:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js","i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")},uploadgpx:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadgpx/index.js","i3GEOF.uploadgpx.criaJanelaFlutuante()","i3GEOF.uploadgpx_script")},uploadkml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadkml/index.js","i3GEOF.uploadkml.criaJanelaFlutuante()","i3GEOF.uploadkml_script")}},abrejanelaIframe:function(w,h,s){var janelaeditor=i3GEO.janela.cria(w,h,s,parseInt(Math.random()*100,10),10,s,"janela"+i3GEO.util.randomRGB(),false);YAHOO.util.Event.addListener(janelaeditor[0].close,"click",i3GEO.arvoreDeTemas.atualiza,janelaeditor[0].panel,{id:janelaeditor[0].id},true)}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:true,uploadlocal:true,uploadarquivo:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,conectargeojson:true,nuvemTags:true,nuvemTagsFlash:false,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true,carousel:true,inde:true,uploadgpx:true,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true,flutuante:true},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:false,IDSMENUS:[],RETORNAGUIA:"",IDHTML:"arvoreAdicionaTema",LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,flutuante:function(){var janela,temp,cabecalho,minimiza,idold,corpo,altura;cabecalho=function(){};if($i("i3GEOFcatalogo_corpo")){return}minimiza=function(){i3GEO.janela.minimiza("i3GEOFcatalogo")};altura=i3GEO.parametros.w-150;if(altura>500){altura=500}janela=i3GEO.janela.cria("360px",altura+"px","","","",$trad("g1a"),"i3GEOFcatalogo",false,"hd",cabecalho,minimiza);temp=function(){delete(i3GEO.arvoreDeTemas.ARVORE)};YAHOO.util.Event.addListener(janela[0].close,"click",temp,janela[0].panel,{id:janela[0].id},true);corpo=$i("i3GEOFcatalogo_corpo");corpo.style.backgroundColor="white";corpo.innerHTML=$trad("o1");corpo.style.overflow="auto";if($i(i3GEO.arvoreDeTemas.IDHTML)){$i(i3GEO.arvoreDeTemas.IDHTML).innerHTML=""}idold=i3GEO.arvoreDeTemas.IDHTML;delete(i3GEO.arvoreDeTemas.ARVORE);i3GEO.arvoreDeTemas.IDHTML="i3GEOFcatalogo_corpo";i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"");i3GEO.arvoreDeTemas.IDHTML=idold},listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos não definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0,expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,temp;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.arvoreDeTemas.checked=false;i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\")";html+="onclick='javascript:"+adiciona+"' "+" type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >"+layer+" - "+titulo+"</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){var c,m,i,k,jj,j;if(i3GEO.arvoreDeTemas.IDSMENUS.length===0){i3GEO.arvoreDeTemas.MENUS=retorno.data}else{i3GEO.arvoreDeTemas.MENUS=[];c=retorno.data.length;m=i3GEO.arvoreDeTemas.IDSMENUS.length;for(i=0,j=c;i<j;i+=1){for(k=0,jj=m;k<jj;k+=1){if(retorno.data[i].idmenu===i3GEO.arvoreDeTemas.IDSMENUS[k]){i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i])}}}}if(funcao!==""){eval(funcao+"(retorno)")}};i3GEO.php.pegalistademenus(retorno)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data[0];if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var montanos=function(retorno){try{var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight:false},node)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red'>Nada encontrado<br><br></span>",isLeaf:true,expanded:false,enableHighlight:false},node)}}}node.loadComplete()}catch(e){}};i3GEO.php.procurartemasestrela(montanos,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1)},cria:function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes,tipoBotao){if(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.IDHTML)},montaArvore:function(){var tempNode,tempNode1,retorno,root,insp,outrasOpcoes,dados,c,i,j,conteudo,editor;(function(){function changeIconMode(){buildTree()}function buildTree(){i3GEO.arvoreDeTemas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<br><br><table><tr>"+"<td><span style='font-size:12px'> "+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' > </a></span></td>"+"<td><input onclick='javascript:this.select();' class='digitar' type='text' id='i3geo_buscatema' size='15' value='' /></td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table> ";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+" <br>",isLeaf:true,enableHighlight:false,expanded:false,hasIcon:false},root)}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin' target=blank >Sistema de administração</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/arvore.html' target=blank >Editar árvore</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='opção visível apenas para editores' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >Editar menus</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php?tipoxml=kml' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/visual/default/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.flutuante===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='#' onclick='i3GEO.arvoreDeTemas.flutuante()' >Abrir em janela flutuante</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<b> OGC-WMS</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>"+editor,idwms:"raiz",expanded:false,enableHighlight:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<b> "+$trad("t46")+"</b> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' > </a>",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+$im("e"+ig+".png")+"' />",enableHighlight:false,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<b> <span title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<b> <span title='nao publicado' ><s>"+dados[i].nomemenu+"</s></span>"+editor}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu,enableHighlight:false,expanded:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,1);if(dados[i].status==="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"<b>Sistemas</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' > </a>",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<s>"+sis[ig].NOME+"</s>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','Sistemas')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt);if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}}},adicionaNoNavegacaoDir:function(){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){var temp=function(){var drives,iglt,ig,drive,tempNode;drives=i3GEO.arvoreDeTemas.DRIVES;if(drives==undefined||drives==""||drives.length===0){i3GEO.arvoreDeTemas.ARVORE.draw();return}iglt=drives.length;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' > </a>",enableHighlight:false,expanded:false},i3GEO.arvoreDeTemas.ARVORE.getRoot());ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho,enableHighlight:false,expanded:false},tempNode);drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig+=1}while(ig<iglt);i3GEO.arvoreDeTemas.ARVORE.draw()};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,temp)}},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra&&raiz[i].nome!=""){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&grupos[i].nome!=undefined){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' ><s>"+grupos[i].nome+"</s></span>"}}d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos,1);tempNode.isLeaf=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&subgrupos[i].nome!=undefined){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' ><s>"+subgrupos[i].nome+"</s></span>"}}d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaSubGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' ><s>"+temas[i].nome+"</s></span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,conteudo,dirs,tempNode,arquivos;dirs=retorno.data.diretorios;for(ig=0;ig<dirs.length;ig+=1){tempNode=new YAHOO.widget.HTMLNode({html:dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='i3GEO.util.adicionaSHP(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:conteudo,caminho:node.data.caminho+"/"+conteudo},node)}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html,estilo="",clique;if(navm){estilo="padding-top:1px;"}html="<td style='"+estilo+"'><span>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img title='"+tema.tid+"' src='"+$im("down1.gif")+"'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{if(i3GEO.arvoreDeTemas.ATIVATEMAIMEDIATO===false){clique="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeTemas.adicionaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicar\",this)'"}else{clique="onclick='i3GEO.arvoreDeTemas.adicionaTemas([\""+tema.tid+"\"])'"}}html+=clique;if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="</td><td title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='cursor:pointer;font-size:11px;text-align:left;color:"+cor+";padding-left:0px;' "+clique+">";html+=tema.nome;html+="</td></span>";return(html)},propTemas:function(node){var html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >"+$trad("x19")+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface=openlayers_t.htm&temasa="+node.data.idtema+"&layers="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface=openlayers_t.htm&temasa="+node.data.idtema+"&layers="+node.data.idtema;new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>":"<img src='"+i3GEO.util.$im("e0.png")+"'/>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0,imb=i3GEO.util.$im("branco.gif"),OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS,estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(OPCOESADICIONAIS.refresh===true){ins+="<td><img "+estilo("refresh")+" onclick='i3GEO.arvoreDeTemas.atualiza()' title='Refresh'/></td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectaservico()' title='"+$trad("a15")+"'/></td>";t+=20;ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' title='"+$trad("a14")+"'/></td>";t+=20}else{if(OPCOESADICIONAIS.uploadgpx===true){ins+="<td><img "+estilo("uploadgpx")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' title='upload GPX'/></td>";t+=20}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<td><img "+estilo("uploaddbf")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' title='"+$trad("a2b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.uploadlocal===true){ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.upload()' title='"+$trad("a2")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carregaKml===true){ins+="<td><img "+estilo("carregarKml")+" onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' title='Kml'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwms===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' title='"+$trad("a4")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<td><img "+estilo("conectarwmst")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' title='"+$trad("a4b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<td><img "+estilo("conectargeorss")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' title='"+$trad("a5")+"'/></td>";t+=20}}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img "+estilo("download")+" onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' title='"+$trad("a3")+"'/></td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img "+estilo("importarwmc")+" onclick='i3GEO.arvoreDeTemas.dialogo.importarwmc()' title='"+$trad("a3a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img "+estilo("carouselTemas")+" onclick='i3GEO.arvoreDeTemas.dialogo.carouselTemas()' title='Miniaturas'/></td>";t+=20}if(OPCOESADICIONAIS.inde===true){ins+="<td><img "+estilo("buscaInde")+" onclick='i3GEO.arvoreDeTemas.dialogo.buscaInde()' title='Pesquisa na INDE'/></td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk="";if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,html:d,expanded:false},nodePalavra)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,expanded:false,html:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var temp;try{clearTimeout(tempoBotaoAplicar)}catch(e){}tempoBotaoAplicar="";i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length===1&&i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){temp=window.confirm("O tema existe no mapa. Adiciona novamente?");if(!temp){return}}if(tsl.length>0){temp=function(retorno){i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!==i3GEO.guias.ATUAL){i3GEO.guias.escondeGuias();i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.php.adtema(temp,tsl.toString())}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig+=1){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFuploadarquivo")};titulo="Upload de arquivo</a>";janela=i3GEO.janela.cria("250px","150px","","","",titulo,"i3GEOFuploadarquivo",false,"hd",cabecalho,minimiza);$i("i3GEOFuploadarquivo_corpo").style.backgroundColor="white";$i("i3GEOFuploadarquivo_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de arquivo</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.uploadlocal===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.upload()' /></td>"+" <td>Shape file</td>"+" </tr>"}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' /></td>"+" <td>DBF ou CSV</td>"+" </tr>"}if(OPCOESADICIONAIS.uploadgpx===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' /></td>"+" <td>GPX</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadkml()' /></td>"+" <td>KML ou KMZ</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},conectaservico:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFconectaservico")};titulo="Conexão com serviços</a>";janela=i3GEO.janela.cria("260px","150px","","","",titulo,"i3GEOFconectaservico",false,"hd",cabecalho,minimiza);$i("i3GEOFconectaservico_corpo").style.backgroundColor="white";$i("i3GEOFconectaservico_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de conex&aatilde;o</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.carregaKml===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' /></td>"+" <td>KML</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwms===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' /></td>"+" <td>WMS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' /></td>"+" <td>WMS-T</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' /></td>"+" <td>GeoRSS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeojson===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeojson()' /></td>"+" <td>GeoJson</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},carregaKml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carregakml/index.js","i3GEOF.carregakml.criaJanelaFlutuante()","i3GEOF.carregakml_script")},carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},buscaInde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/index.js","i3GEOF.buscainde.criaJanelaFlutuante()","i3GEOF.buscainde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.js","i3GEOF.nuvemtags.criaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","","Nuvem Flash")},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","Diretórios")},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/index.js","i3GEOF.importarwmc.criaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' > </a>")},conectarwmst:function(){var l,a;if(i3GEO.parametros.w){l=i3GEO.parametros.w+150}else{l=400}if(i3GEO.parametros.h){a=i3GEO.parametros.h+200}else{a=350}i3GEO.janela.cria(l/2+"px",a/2+"px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' > </a>")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeojson:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectargeojson/index.js","i3GEOF.conectargeojson.criaJanelaFlutuante()","i3GEOF.conectargeojson_script")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=29' > </a>")},upload:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js","i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")},uploaddbf:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js","i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")},uploadgpx:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadgpx/index.js","i3GEOF.uploadgpx.criaJanelaFlutuante()","i3GEOF.uploadgpx_script")},uploadkml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadkml/index.js","i3GEOF.uploadkml.criaJanelaFlutuante()","i3GEOF.uploadkml_script")}},abrejanelaIframe:function(w,h,s){var janelaeditor=i3GEO.janela.cria(w,h,s,parseInt(Math.random()*100,10),10,s,"janela"+i3GEO.util.randomRGB(),false);YAHOO.util.Event.addListener(janelaeditor[0].close,"click",i3GEO.arvoreDeTemas.atualiza,janelaeditor[0].panel,{id:janelaeditor[0].id},true)}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_barradebotoes_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={ATIVA:true,TIPO:"yui",OFFSET:-205,MAXBOTOES:11,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{localizar:true,zoomli:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,selecao:true,google:true,barraedicao:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.Interface.ATUAL==="openlayers"){try{i3GEO.Interface.openlayers.OLzoom.deactivate()}catch(e){}}var estilo,temp,ist,cor,ko;this.BOTAOCLICADO=icone;ko=this.LISTABOTOES.length-1;if(this.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(this.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(this.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(this.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(this.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(this.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(this.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){if(i3GEO.barraDeBotoes.ATIVA===false){return}var temp,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43+"px";temp.style.left=posX+18+"px"}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{temp=l[b].iddiv;if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){if(i3GEO.barraDeBotoes.ATIVA===false){return}i3GEO.barraDeBotoes.AJUDA=false;euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(),temp="dockBg-r.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP);if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="dockBg-r2.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-l.png"}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.ATIVAJANELA=true;i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}};if(!$i("euDockMensagem")){temp=document.createElement("div");temp.style.top="38px";temp.style.color="gray";temp.style.textAlign="center";temp.style.fontSize="10px";temp.innerHTML="";temp.id="euDockMensagem";euEnv.euDockArray.euDock_0.div.appendChild(temp)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,e,wj,recuo,novoel,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.i3GEO.janela.botoes=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})}else{YAHOO.i3GEO.janela.botoes=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})}}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","hd2")}},ativaMenuContexto:function(idbarra){if(i3GEO.barraDeBotoes.ATIVA===false){return}var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:" <span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+idbarra;$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){i3GEO.barraDeBotoes.BARRAS[i].show()}}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var i,n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i]&&BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){i3GEO.barraDeBotoes.editor.carregaJs("janelaEditorVetorial")},carregaJs:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js","i3GEO.barraDeBotoes.editor.ativaPainel('"+idjanela+"')","openlayers.js",true)}else{if(!i3GEO.editorOL.layergrafico){i3GEO.editorOL.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="Editor vetorial";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}"}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.editorOL.layergrafico=new OpenLayers.Layer.Vector("Edição",{styleMap:styleMap1,displayInLayerSwitcher:false,visibility:true});i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]);i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={ATIVA:true,TIPO:"yui",OFFSET:-205,MAXBOTOES:11,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{localizar:true,zoomli:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,selecao:true,google:true,barraedicao:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.Interface.ATUAL==="openlayers"){try{i3GEO.Interface.openlayers.OLzoom.deactivate()}catch(e){}}var estilo,temp,ist,cor,ko;this.BOTAOCLICADO=icone;ko=this.LISTABOTOES.length-1;if(this.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(this.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(this.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(this.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(this.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(this.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(this.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){if(i3GEO.barraDeBotoes.ATIVA===false){return}var temp,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43+"px";temp.style.left=posX+18+"px"}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{temp=l[b].iddiv;if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){if(i3GEO.barraDeBotoes.ATIVA===false){return}i3GEO.barraDeBotoes.AJUDA=false;euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(),temp="dockBg-r.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP);if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="dockBg-r2.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-l.png"}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.ATIVAJANELA=true;i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}};if(!$i("euDockMensagem")){temp=document.createElement("div");temp.style.top="38px";temp.style.color="gray";temp.style.textAlign="center";temp.style.fontSize="10px";temp.innerHTML="";temp.id="euDockMensagem";euEnv.euDockArray.euDock_0.div.appendChild(temp)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,e,wj,recuo,novoel,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.i3GEO.janela.botoes=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})}else{YAHOO.i3GEO.janela.botoes=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})}}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","hd2")}},ativaMenuContexto:function(idbarra){if(i3GEO.barraDeBotoes.ATIVA===false){return}var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:" <span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+idbarra;$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){i3GEO.barraDeBotoes.BARRAS[i].show()}}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var i,n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i]&&BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){i3GEO.barraDeBotoes.editor.carregaJs("janelaEditorVetorial")},carregaJs:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js","i3GEO.barraDeBotoes.editor.ativaPainel('"+idjanela+"')","openlayers.js",true)}else{if(!i3GEO.editorOL.layergrafico){i3GEO.editorOL.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="Editor vetorial";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}"}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.editorOL.layergrafico=new OpenLayers.Layer.Vector("Edição",{styleMap:styleMap1,displayInLayerSwitcher:false,visibility:true});i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]);i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_calculo_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.parametros.mapexten;cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{alert("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.parametros.mapexten;cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{alert("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_configura_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.configura={grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"},{nome:$trad("u15a"),id:"ferramentas"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu1",text:$trad("u1"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u4a"),url:"javascript:i3GEO.ajuda.abreDoc('/documentacao/manual-i3geo-4_7-pt.pdf')"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"javascript:i3GEO.ajuda.abreDoc('/ajuda_usuario.php')"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("d27")+'</b></span>',url:"#"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Serviços WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperbólica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}],"ferramentas":[{id:"omenudataFerramentas0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("g4a")+'</b></span>',url:"#"},{id:"omenudataFerramentas4a",text:$trad("g1a"),url:"javascript:i3GEO.arvoreDeTemas.flutuante()"},{id:"omenudataFerramentas1a",text:$trad("t20"),url:"javascript:i3GEO.mapa.dialogo.opacidade()"},{id:"omenudataFerramentas2a",text:$trad("p21"),url:"javascript:i3GEO.mapa.dialogo.animacao()"},{id:"omenudataFerramentas3a",text:$trad("d24t"),url:"javascript:i3GEO.mapa.dialogo.selecao();"},{id:"omenudataFerramentas0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a7")+'</b></span>',url:"#"},{id:"omenudataFerramentas1b",text:$trad("t31"),url:"javascript:i3GEO.tema.dialogo.tabela()"},{id:"omenudataFerramentas2b",text:$trad("t23"),url:"javascript:i3GEO.tema.dialogo.procuraratrib()"},{id:"omenudataFerramentas3b",text:$trad("t25"),url:"javascript:i3GEO.tema.dialogo.toponimia()"},{id:"omenudataFerramentas4b",text:$trad("t27"),url:"javascript:i3GEO.tema.dialogo.etiquetas()"},{id:"omenudataFerramentas5b",text:$trad("t29"),url:"javascript:i3GEO.tema.dialogo.filtro()"},{id:"omenudataFerramentas6b",text:$trad("t33"),url:"javascript:i3GEO.tema.dialogo.editaLegenda()"},{id:"omenudataFerramentas7b",text:$trad("t42"),url:"javascript:i3GEO.tema.dialogo.cortina()"},{id:"omenudataFerramentas8b",text:$trad("t37a"),url:"javascript:i3GEO.tema.dialogo.graficotema()"},{id:"omenudataFerramentas9b",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataFerramentas10b",text:$trad("t49"),url:"javascript:i3GEO.tema.dialogo.tme()"},{id:"omenudataFerramentas0c",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a15")+'</b></span>',url:"#"},{id:"omenudataFerramentas1c",text:$trad("a16"),url:"javascript:i3GEO.arvoreDeTemas.dialogo.conectaservico()"},{id:"omenudataFerramentas0d",text:'<span style=color:gray;text-decoration:underline; ><b>Upload</b></span>',url:"#"},{id:"omenudataFerramentas3d",text:"Vetor (shp,dbf,csv,gpx,kml)",url:"javascript:i3GEO.arvoreDeTemas.dialogo.uploadarquivo()"}]}},tipoimagem:"nenhum",ajustaDocType:true,tipotip:"balao",alturatip:"200px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:70,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:1800,iniciaJanelaMensagens:false,mostraRosaDosVentos:"nao",liberaGuias:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:"",constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),titulo:$trad("d2t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"localizar",tipo:"",dica:$trad("o2"),titulo:$trad("o2"),funcaoonclick:function(){if(!$i("janelaBuscaRapida")){var janela=i3GEO.janela.cria("258px","20px","","","","Busca rápida","janelaBuscaRapida",false,"hd","","");$i("janelaBuscaRapida_corpo").style.backgroundColor="white";i3GEO.gadgets.mostraBuscaRapida(janela[2].id)}}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),titulo:$trad("d3t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.mensagemSimples("Pressione a tecla CTRL junto com o botão esquerdo do mouse e arraste para definir a área de zoom","?");g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}var temp;temp="zoom";i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);g_operacao='navega';g_tipoacao='zoomli';i3GEO.barraDeBotoes.ativaIcone("zoomli");marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLzoom);return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}if(i3GEO.eventos.MOUSEDOWN.toString().search("i3GEO.navega.zoomBox.inicia()")<0){i3GEO.eventos.MOUSEDOWN.push("i3GEO.navega.zoomBox.inicia()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}i3GEO.barraDeBotoes.BOTAOPADRAO="zoomli"}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),titulo:$trad("d4t"),funcaoonclick:function(){var temp;g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="pan";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="pan_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}return}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),titulo:$trad("d5t"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),titulo:$trad("d6t"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),titulo:$trad("d7t"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");g_tipoacao='identifica';g_operacao='identifica';cliqueIdentifica=function(){if(g_operacao==="identifica"||i3GEO.barraDeBotoes.BOTAOPADRAO==="identifica"){g_operacao="identifica";eval(i3GEO.configura.funcaoIdentifica)}var temp=function(){},i;i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp);i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica");i=$i("i3GEOmarcaIdentifica");if(i){i.style.display="block"}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")<0){i3GEO.eventos.MOUSECLIQUE.push("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSECLIQUE.remove("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),titulo:$trad("d7at"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){alert($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");g_tipoacao='identifica';g_operacao='identifica';verificaTip=function(){if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}if($i("marcaIdentifica")){return}if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoTip)}else{i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")>0){i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSECLIQUE.push("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSEPARADO.push("verificaTip()")}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),titulo:$trad("d8t"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),titulo:$trad("d9t"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),titulo:$trad("d11t"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),titulo:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",titulo:"fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),titulo:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),titulo:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),titulo:$trad("d15t"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),titulo:$trad("d16t"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),titulo:$trad("d17t"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),titulo:$trad("d18t"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),titulo:$trad("d20t"),funcaoonclick:function(){var temp=function(){var url=(window.location.href.split("?"));window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),titulo:$trad("d21t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),titulo:$trad("d21at"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"barraedicao",tipo:"",dica:$trad("u29"),titulo:$trad("u29"),funcaoonclick:function(){i3GEO.barraDeBotoes.editor.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),titulo:$trad("d22t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),titulo:$trad("d24t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),titulo:$trad("d25t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",titulo:"roteamento",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","Rota");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="Não foi possível criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);alert("Clique o ponto de origem da rota")}}]}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.configura={grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"},{nome:$trad("u15a"),id:"ferramentas"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu1",text:$trad("u1"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u4a"),url:"javascript:i3GEO.ajuda.abreDoc('/documentacao/manual-i3geo-4_7-pt.pdf')"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"javascript:i3GEO.ajuda.abreDoc('/ajuda_usuario.php')"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("d27")+'</b></span>',url:"#"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Serviços WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperbólica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}],"ferramentas":[{id:"omenudataFerramentas0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("g4a")+'</b></span>',url:"#"},{id:"omenudataFerramentas4a",text:$trad("g1a"),url:"javascript:i3GEO.arvoreDeTemas.flutuante()"},{id:"omenudataFerramentas1a",text:$trad("t20"),url:"javascript:i3GEO.mapa.dialogo.opacidade()"},{id:"omenudataFerramentas2a",text:$trad("p21"),url:"javascript:i3GEO.mapa.dialogo.animacao()"},{id:"omenudataFerramentas3a",text:$trad("d24t"),url:"javascript:i3GEO.mapa.dialogo.selecao();"},{id:"omenudataFerramentas0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a7")+'</b></span>',url:"#"},{id:"omenudataFerramentas1b",text:$trad("t31"),url:"javascript:i3GEO.tema.dialogo.tabela()"},{id:"omenudataFerramentas2b",text:$trad("t23"),url:"javascript:i3GEO.tema.dialogo.procuraratrib()"},{id:"omenudataFerramentas3b",text:$trad("t25"),url:"javascript:i3GEO.tema.dialogo.toponimia()"},{id:"omenudataFerramentas4b",text:$trad("t27"),url:"javascript:i3GEO.tema.dialogo.etiquetas()"},{id:"omenudataFerramentas5b",text:$trad("t29"),url:"javascript:i3GEO.tema.dialogo.filtro()"},{id:"omenudataFerramentas6b",text:$trad("t33"),url:"javascript:i3GEO.tema.dialogo.editaLegenda()"},{id:"omenudataFerramentas7b",text:$trad("t42"),url:"javascript:i3GEO.tema.dialogo.cortina()"},{id:"omenudataFerramentas8b",text:$trad("t37a"),url:"javascript:i3GEO.tema.dialogo.graficotema()"},{id:"omenudataFerramentas9b",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataFerramentas10b",text:$trad("t49"),url:"javascript:i3GEO.tema.dialogo.tme()"},{id:"omenudataFerramentas0c",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a15")+'</b></span>',url:"#"},{id:"omenudataFerramentas1c",text:$trad("a16"),url:"javascript:i3GEO.arvoreDeTemas.dialogo.conectaservico()"},{id:"omenudataFerramentas0d",text:'<span style=color:gray;text-decoration:underline; ><b>Upload</b></span>',url:"#"},{id:"omenudataFerramentas3d",text:"Vetor (shp,dbf,csv,gpx,kml)",url:"javascript:i3GEO.arvoreDeTemas.dialogo.uploadarquivo()"}]}},tipoimagem:"nenhum",ajustaDocType:true,tipotip:"balao",alturatip:"200px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:70,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:1800,iniciaJanelaMensagens:false,mostraRosaDosVentos:"nao",liberaGuias:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:"",constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),titulo:$trad("d2t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"localizar",tipo:"",dica:$trad("o2"),titulo:$trad("o2"),funcaoonclick:function(){if(!$i("janelaBuscaRapida")){var janela=i3GEO.janela.cria("258px","20px","","","","Busca rápida","janelaBuscaRapida",false,"hd","","");$i("janelaBuscaRapida_corpo").style.backgroundColor="white";i3GEO.gadgets.mostraBuscaRapida(janela[2].id)}}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),titulo:$trad("d3t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.mensagemSimples("Pressione a tecla CTRL junto com o botão esquerdo do mouse e arraste para definir a área de zoom","?");g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}var temp;temp="zoom";i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);g_operacao='navega';g_tipoacao='zoomli';i3GEO.barraDeBotoes.ativaIcone("zoomli");marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLzoom);return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}if(i3GEO.eventos.MOUSEDOWN.toString().search("i3GEO.navega.zoomBox.inicia()")<0){i3GEO.eventos.MOUSEDOWN.push("i3GEO.navega.zoomBox.inicia()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}i3GEO.barraDeBotoes.BOTAOPADRAO="zoomli"}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),titulo:$trad("d4t"),funcaoonclick:function(){var temp;g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="pan";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="pan_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}return}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),titulo:$trad("d5t"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),titulo:$trad("d6t"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),titulo:$trad("d7t"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");g_tipoacao='identifica';g_operacao='identifica';cliqueIdentifica=function(){if(g_operacao==="identifica"||i3GEO.barraDeBotoes.BOTAOPADRAO==="identifica"){g_operacao="identifica";eval(i3GEO.configura.funcaoIdentifica)}var temp=function(){},i;i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp);i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica");i=$i("i3GEOmarcaIdentifica");if(i){i.style.display="block"}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")<0){i3GEO.eventos.MOUSECLIQUE.push("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSECLIQUE.remove("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),titulo:$trad("d7at"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){alert($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");g_tipoacao='identifica';g_operacao='identifica';verificaTip=function(){if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}if($i("marcaIdentifica")){return}if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoTip)}else{i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")>0){i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSECLIQUE.push("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSEPARADO.push("verificaTip()")}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),titulo:$trad("d8t"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),titulo:$trad("d9t"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),titulo:$trad("d11t"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),titulo:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",titulo:"fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),titulo:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),titulo:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),titulo:$trad("d15t"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),titulo:$trad("d16t"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),titulo:$trad("d17t"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),titulo:$trad("d18t"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),titulo:$trad("d20t"),funcaoonclick:function(){var temp=function(){var url=(window.location.href.split("?"));window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),titulo:$trad("d21t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),titulo:$trad("d21at"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"barraedicao",tipo:"",dica:$trad("u29"),titulo:$trad("u29"),funcaoonclick:function(){i3GEO.barraDeBotoes.editor.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),titulo:$trad("d22t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),titulo:$trad("d24t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),titulo:$trad("d25t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",titulo:"roteamento",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","Rota");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="Não foi possível criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);alert("Clique o ponto de origem da rota")}}]}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_coordenadas_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.coordenadas={formato:"bloco",padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"Déc. de grau",ativo:true,defepsg:""},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"}},MODOTEXTO:"",mostraCoordenadasUTM:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasUTM.idhtml}else{this.PARAMETROS.mostraCoordenadasUTM.idhtml=id}if(!$i(id)||this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}atualizaCoordenadasUTM=function(){if(this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}if(i3GEO.Interface.STATUS.atualizando.length>0){return}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10){return}if($i("wdoca")){return}if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}var tempUtm=function(retorno){var funcao,temp,texto;funcao="$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';"+"if(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml == i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml)"+"{$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml).style.display='block';i3GEO.coordenadas.mostraCoordenadasGEO();}";idSetTimeoutMostraUTM=setTimeout(funcao,3400);temp=$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml);if(retorno.data){temp.style.display="block";texto="<div onclick='javascript:clearTimeout(idSetTimeoutMostraUTM);i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml = \"\";i3GEO.coordenadas.mostraCoordenadasGEO();' style='width:300px;font-size:10px;' >UTM: x="+retorno.data.x+" y="+retorno.data.y+" zn="+retorno.data.zona+" "+retorno.data.datum+" <img class='x' src='"+i3GEO.util.$im("branco.gif")+"' /></div>";temp.innerHTML=texto}};i3GEO.php.geo2utm(tempUtm,objposicaocursor.ddx,objposicaocursor.ddy)};if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")<0){i3GEO.eventos.MOUSEPARADO.push("atualizaCoordenadasUTM()")}}catch(e){alert("mostraCoordenadasUtm: "+e.description)}},mostraCoordenadasGEO:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasGEO.idhtml}else{this.PARAMETROS.mostraCoordenadasGEO.idhtml=id}if($i(id)){if(!$i("coordgeotabela")){$i(id).innerHTML=i3GEO.coordenadas.criaMascaraDMS("coordgeotabela");atualizaLocalizarGeo=function(){var temp=$i("coordgeotabela");if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"coordgeotabela")}};if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo()")}}}}}catch(e){alert("mostraCoordenadasGeo: "+e.description)}},geo2zonaUtm:function(long){long=(long*1)+180;long=long/6;return parseInt(long,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins='<table id='+prefixo+' style=display:block;text-align:center;width:295px ><tr style="border-bottom:2px solid white" >'+"<td>"+caixa+" </td>"+'<td style=width:10px;text-align:right > X:</td>'+'<td>'+$inputText('','',prefixo+'xg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'xm','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'xs','segundo','4','00.00')+'</td>'+'<td>Y:'+$inputText('','',prefixo+'yg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'ym','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'ys','segundo','4','00.00')+'</td>',temp='var '+prefixo+'xxx = i3GEO.calculo.dms2dd($i(\''+prefixo+'xg\').value,$i(\''+prefixo+'xm\').value,$i(\''+prefixo+'xs\').value);'+'var '+prefixo+'yyy = i3GEO.calculo.dms2dd($i(\''+prefixo+'yg\').value,$i(\''+prefixo+'ym\').value,$i(\''+prefixo+'ys\').value);'+'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);';ins+='<td><img class=tic title=zoom onclick="'+temp+'" src="'+i3GEO.util.$im("branco.gif")+'" /></td>'+"</tr></table>";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");$i(prefixo+"xg").value=x[0];$i(prefixo+"xm").value=x[1];$i(prefixo+"xs").value=x[2];$i(prefixo+"yg").value=y[0];$i(prefixo+"ym").value=y[1];$i(prefixo+"ys").value=y[2];i3GEO.coordenadas.MODOTEXTO+="DMS - Latitude: "+y[0]+" "+y[1]+" "+y[2]+" Longitude: "+x[0]+" "+x[1]+" "+x[2]+"<br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<table id="+prefixo+" style=display:block;text-align:center;;width:415px ><tr style='border-bottom:2px solid white' >"+"<td>"+caixa+" <td>"+"<td style=width:100px;text-align:right >"+titulo+" X: </td>"+"<td>"+$inputText("","",prefixo+"X","X","12","00")+" </td>"+"<td>Y:"+$inputText("","",prefixo+"Y","Y","12","00")+" </td>"+"<td>Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+" </td>"+"</tr></table>";return ins},atualizaProj4:function(onde,configProj,x,y){var zona,temp,p,destino="",iu=i3GEO.util;try{if(!$i(onde+configProj+"ZN")){return}}catch(e){return}temp=i3GEO.coordenadas.config[configProj];try{if($i(onde+configProj).style.display==="none"){return}}catch(men){}if(temp.tipo==="metrica"){destino=temp.defepsg}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipo==="utm"){zona=i3GEO.coordenadas.geo2zonaUtm(x);$i(onde+configProj+"ZN").value=zona;if(objposicaocursor.ddy*1>0){destino=temp.zona[zona+"N"]}else{destino=temp.zona[zona+"S"]}if(typeof(destino)==='undefined'){iu.defineValor(onde+configProj+"X","value","?");iu.defineValor(onde+configProj+"Y","value","?");return}}if(temp.defepsg===""&&temp.tipo==="metrica"){p={x:x,y:y}}else{p=i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y)}iu.defineValor(onde+configProj+"X","value",p.x);iu.defineValor(onde+configProj+"Y","value",p.y);i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" - X: "+p.x+" Y: "+p.y+"<br>"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};Proj4js.getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/proj4js/lib/"};var source=new Proj4js.Proj("ORIGEM"),dest=new Proj4js.Proj("DESTINO"),p=new Proj4js.Point(x,y);Proj4js.transform(source,dest,p);return p},ativaBloco:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0;for(i=0;i<n;i++){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(tipos[i]===this.padrao){$i(prefixo+tipos[i]).style.display="block"}else{$i(prefixo+tipos[i]).style.display="none"}}}},mudaTipo:function(obj,onde){if(obj.value==="janela"){this.formato="janela";this.mostraCoordenadas();return}this.padrao=obj.value;obj.selectedIndex=0;i3GEO.coordenadas.ativaBloco(onde)},mostraCoordenadas:function(ativaMovimento,onde,x,y){try{var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela;i3GEO.coordenadas.MODOTEXTO="";if(arguments.length===0){ativaMovimento=true;onde=""}if(onde===""){onde=i3GEO.coordenadas.config[tipos[0]].idhtml}caixa="<select onchange='javascript:i3GEO.coordenadas.mudaTipo(this,\""+onde+"\");' style='border: 1px solid #B4B4B4;color: #B4B4B4;margin-left:3px;font-size:10px;height:16px;width:40px;' ><option>---</option><option value='janela' >janela</option>";for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){caixa+="<option value='"+tipos[i]+"'>"+temp.titulo+"</option>"}}caixa+="</select>";if(i3GEO.coordenadas.formato!=="bloco"){caixa=""}for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){ins+=i3GEO.coordenadas.criaMascaraDMS(onde+tipos[i],temp.titulo,caixa);if(i3GEO.coordenadas.formato==="separado"){try{$i(temp.idhtml).innerHTML=ins}catch(e){}ins=""}}else{ins+=i3GEO.coordenadas.criaMascaraMetrica(onde+tipos[i],temp.titulo,caixa)}}}if(this.formato==="janela"){janela=i3GEO.janela.cria("450px","120px","","","","Coordenadas aproximadas","i3GEOJanelaCoordenadas",false,"hd","","");YAHOO.util.Event.addListener(janela[0].close,"click",function(){i3GEO.coordenadas.formato="bloco",i3GEO.coordenadas.mostraCoordenadas()});temp=$i("i3GEOJanelaCoordenadas_corpo");temp.style.backgroundColor="white";temp.style.textAlign="left";temp=$i("i3GEOJanelaCoordenadas");temp.onmouseover="";temp.onmouseout="";if($i(onde)){$i(onde).innerHTML=""}onde="i3GEOJanelaCoordenadas_corpo";ins+="<br><a href='#' style='cursor:pointer;color:blue' onclick='new YAHOO.util.KeyListener(document.body,{alt:true,keys:67},{fn: function(type, args, obj){alert(i3GEO.coordenadas.MODOTEXTO);}}).enable();' >"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas</a>"}if(onde!==""&&$i(onde)){$i(onde).innerHTML=ins}atualizaLocalizarGeo=function(id,x,y){if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}};for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0])}}else{if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){i3GEO.coordenadas.atualizaProj4(onde,tipos[i],x,y)}}}}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.limpaModoTexto()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.limpaModoTexto()")}}}if(i3GEO.coordenadas.formato==="bloco"){i3GEO.coordenadas.ativaBloco(onde)}}catch(men){}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.coordenadas={formato:"bloco",padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"Déc. de grau",ativo:true,defepsg:""},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"}},MODOTEXTO:"",mostraCoordenadasUTM:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasUTM.idhtml}else{this.PARAMETROS.mostraCoordenadasUTM.idhtml=id}if(!$i(id)||this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}atualizaCoordenadasUTM=function(){if(this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}if(i3GEO.Interface.STATUS.atualizando.length>0){return}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10){return}if($i("wdoca")){return}if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}var tempUtm=function(retorno){var funcao,temp,texto;funcao="$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';"+"if(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml == i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml)"+"{$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml).style.display='block';i3GEO.coordenadas.mostraCoordenadasGEO();}";idSetTimeoutMostraUTM=setTimeout(funcao,3400);temp=$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml);if(retorno.data){temp.style.display="block";texto="<div onclick='javascript:clearTimeout(idSetTimeoutMostraUTM);i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml = \"\";i3GEO.coordenadas.mostraCoordenadasGEO();' style='width:300px;font-size:10px;' >UTM: x="+retorno.data.x+" y="+retorno.data.y+" zn="+retorno.data.zona+" "+retorno.data.datum+" <img class='x' src='"+i3GEO.util.$im("branco.gif")+"' /></div>";temp.innerHTML=texto}};i3GEO.php.geo2utm(tempUtm,objposicaocursor.ddx,objposicaocursor.ddy)};if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")<0){i3GEO.eventos.MOUSEPARADO.push("atualizaCoordenadasUTM()")}}catch(e){alert("mostraCoordenadasUtm: "+e.description)}},mostraCoordenadasGEO:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasGEO.idhtml}else{this.PARAMETROS.mostraCoordenadasGEO.idhtml=id}if($i(id)){if(!$i("coordgeotabela")){$i(id).innerHTML=i3GEO.coordenadas.criaMascaraDMS("coordgeotabela");atualizaLocalizarGeo=function(){var temp=$i("coordgeotabela");if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"coordgeotabela")}};if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo()")}}}}}catch(e){alert("mostraCoordenadasGeo: "+e.description)}},geo2zonaUtm:function(long){long=(long*1)+180;long=long/6;return parseInt(long,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins='<table id='+prefixo+' style=display:block;text-align:center;width:295px ><tr style="border-bottom:2px solid white" >'+"<td>"+caixa+" </td>"+'<td style=width:10px;text-align:right > X:</td>'+'<td>'+$inputText('','',prefixo+'xg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'xm','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'xs','segundo','4','00.00')+'</td>'+'<td>Y:'+$inputText('','',prefixo+'yg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'ym','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'ys','segundo','4','00.00')+'</td>',temp='var '+prefixo+'xxx = i3GEO.calculo.dms2dd($i(\''+prefixo+'xg\').value,$i(\''+prefixo+'xm\').value,$i(\''+prefixo+'xs\').value);'+'var '+prefixo+'yyy = i3GEO.calculo.dms2dd($i(\''+prefixo+'yg\').value,$i(\''+prefixo+'ym\').value,$i(\''+prefixo+'ys\').value);'+'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);';ins+='<td><img class=tic title=zoom onclick="'+temp+'" src="'+i3GEO.util.$im("branco.gif")+'" /></td>'+"</tr></table>";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");$i(prefixo+"xg").value=x[0];$i(prefixo+"xm").value=x[1];$i(prefixo+"xs").value=x[2];$i(prefixo+"yg").value=y[0];$i(prefixo+"ym").value=y[1];$i(prefixo+"ys").value=y[2];i3GEO.coordenadas.MODOTEXTO+="DMS - Latitude: "+y[0]+" "+y[1]+" "+y[2]+" Longitude: "+x[0]+" "+x[1]+" "+x[2]+"<br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<table id="+prefixo+" style=display:block;text-align:center;;width:415px ><tr style='border-bottom:2px solid white' >"+"<td>"+caixa+" <td>"+"<td style=width:100px;text-align:right >"+titulo+" X: </td>"+"<td>"+$inputText("","",prefixo+"X","X","12","00")+" </td>"+"<td>Y:"+$inputText("","",prefixo+"Y","Y","12","00")+" </td>"+"<td>Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+" </td>"+"</tr></table>";return ins},atualizaProj4:function(onde,configProj,x,y){var zona,temp,p,destino="",iu=i3GEO.util;try{if(!$i(onde+configProj+"ZN")){return}}catch(e){return}temp=i3GEO.coordenadas.config[configProj];try{if($i(onde+configProj).style.display==="none"){return}}catch(men){}if(temp.tipo==="metrica"){destino=temp.defepsg}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipo==="utm"){zona=i3GEO.coordenadas.geo2zonaUtm(x);$i(onde+configProj+"ZN").value=zona;if(objposicaocursor.ddy*1>0){destino=temp.zona[zona+"N"]}else{destino=temp.zona[zona+"S"]}if(typeof(destino)==='undefined'){iu.defineValor(onde+configProj+"X","value","?");iu.defineValor(onde+configProj+"Y","value","?");return}}if(temp.defepsg===""&&temp.tipo==="metrica"){p={x:x,y:y}}else{p=i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y)}iu.defineValor(onde+configProj+"X","value",p.x);iu.defineValor(onde+configProj+"Y","value",p.y);i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" - X: "+p.x+" Y: "+p.y+"<br>"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};Proj4js.getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/proj4js/lib/"};var source=new Proj4js.Proj("ORIGEM"),dest=new Proj4js.Proj("DESTINO"),p=new Proj4js.Point(x,y);Proj4js.transform(source,dest,p);return p},ativaBloco:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0;for(i=0;i<n;i++){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(tipos[i]===this.padrao){$i(prefixo+tipos[i]).style.display="block"}else{$i(prefixo+tipos[i]).style.display="none"}}}},mudaTipo:function(obj,onde){if(obj.value==="janela"){this.formato="janela";this.mostraCoordenadas();return}this.padrao=obj.value;obj.selectedIndex=0;i3GEO.coordenadas.ativaBloco(onde)},mostraCoordenadas:function(ativaMovimento,onde,x,y){try{var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela;i3GEO.coordenadas.MODOTEXTO="";if(arguments.length===0){ativaMovimento=true;onde=""}if(onde===""){onde=i3GEO.coordenadas.config[tipos[0]].idhtml}caixa="<select onchange='javascript:i3GEO.coordenadas.mudaTipo(this,\""+onde+"\");' style='border: 1px solid #B4B4B4;color: #B4B4B4;margin-left:3px;font-size:10px;height:16px;width:40px;' ><option>---</option><option value='janela' >janela</option>";for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){caixa+="<option value='"+tipos[i]+"'>"+temp.titulo+"</option>"}}caixa+="</select>";if(i3GEO.coordenadas.formato!=="bloco"){caixa=""}for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){ins+=i3GEO.coordenadas.criaMascaraDMS(onde+tipos[i],temp.titulo,caixa);if(i3GEO.coordenadas.formato==="separado"){try{$i(temp.idhtml).innerHTML=ins}catch(e){}ins=""}}else{ins+=i3GEO.coordenadas.criaMascaraMetrica(onde+tipos[i],temp.titulo,caixa)}}}if(this.formato==="janela"){janela=i3GEO.janela.cria("450px","120px","","","","Coordenadas aproximadas","i3GEOJanelaCoordenadas",false,"hd","","");YAHOO.util.Event.addListener(janela[0].close,"click",function(){i3GEO.coordenadas.formato="bloco",i3GEO.coordenadas.mostraCoordenadas()});temp=$i("i3GEOJanelaCoordenadas_corpo");temp.style.backgroundColor="white";temp.style.textAlign="left";temp=$i("i3GEOJanelaCoordenadas");temp.onmouseover="";temp.onmouseout="";if($i(onde)){$i(onde).innerHTML=""}onde="i3GEOJanelaCoordenadas_corpo";ins+="<br><a href='#' style='cursor:pointer;color:blue' onclick='new YAHOO.util.KeyListener(document.body,{alt:true,keys:67},{fn: function(type, args, obj){alert(i3GEO.coordenadas.MODOTEXTO);}}).enable();' >"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas</a>"}if(onde!==""&&$i(onde)){$i(onde).innerHTML=ins}atualizaLocalizarGeo=function(id,x,y){if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}};for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0])}}else{if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){i3GEO.coordenadas.atualizaProj4(onde,tipos[i],x,y)}}}}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.limpaModoTexto()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.limpaModoTexto()")}}}if(i3GEO.coordenadas.formato==="bloco"){i3GEO.coordenadas.ativaBloco(onde)}}catch(men){}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_desenho_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.desenho={richdraw:"",estilos:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w){try{i3GEO.desenho.richdraw.renderer.create('circ','',i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){padrao=i3GEO.desenho.estilos[padrao];i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={richdraw:"",estilos:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w){try{i3GEO.desenho.richdraw.renderer.create('circ','',i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){padrao=i3GEO.desenho.estilos[padrao];i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_eventos_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],NAVEGAMAPA:[],MOUSEPARADO:["i3GEO.navega.mostraRosaDosVentos()"],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:[],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(this.TIMERPARADO)}catch(e){this.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(this.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEDOWN)},mouseupMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEUP)},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(this.MOUSECLIQUE)},executaEventos:function(eventos){var f=0;try{if(eventos.length>0){f=eventos.length-1;if(f>=0){do{if(eventos[f]!==""){eval(eventos[f])}}while(f--)}}}catch(e){eventos[f]=""}},posicaoMouseMapa:function(e){var teladd,teladms,container="",targ="",pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;if(!e){e=window.event}try{if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){}if(container!=="divGeometriasTemp"&&container!=="mapaReferencia"){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googlemaps","googleearth","openlayers"])){return}}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id===""&&$i(i3GEO.Interface.IDMAPA)){targ=$i(i3GEO.Interface.IDMAPA)}try{if(g_panM!=='undefined'&&g_panM==="sim"){pos=i3GEO.util.pegaPosicaoObjeto(targ.parentNode)}else{pos=i3GEO.util.pegaPosicaoObjeto(targ)}if(g_panM==="sim"){pos[0]=pos[0]-i3GEO.parametros.w;pos[1]=pos[1]-i3GEO.parametros.h}}catch(m){pos=i3GEO.util.pegaPosicaoObjeto(targ)}mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.pixelsize;ex=i3GEO.parametros.mapexten;try{if(targ.id==="imagemReferencia"){c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;r=$i("i3geo_rosa");if(r){r.style.display="none"}}}catch(e){i3GEO.parametros.celularef=0}teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex,targ.id);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout(function(){i3GEO.eventos.mouseParado()},i3GEO.configura.tempoMouseParado)}catch(e){}try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=true;try{objmapaparado="parar"}catch(e){}};docMapa.onmousedown=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousedownMapa()}};docMapa.onclick=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousecliqueMapa()}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa()}}},botaoDireita:function(exy){try{var k=(navm)?event.button:exy.button;if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){var x,y,doc=document;if(arguments.length===0){ixg="ixg";ixm="ixm";ixs="ixs";iyg="iyg";iym="iym";iys="iys";if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}if(g_tipoacao!=="capturaponto"){return}else{try{if(doc){x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById(ixg)){doc.getElementById(ixg).value=x[0]}if(doc.getElementById(ixm)){doc.getElementById(ixm).value=x[1]}if(doc.getElementById(ixs)){doc.getElementById(ixs).value=x[2]}if(doc.getElementById(iyg)){doc.getElementById(iyg).value=y[0]}if(doc.getElementById(iym)){doc.getElementById(iym).value=y[1]}if(doc.getElementById(iys)){doc.getElementById(iys).value=y[2]}}}catch(m){}}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],NAVEGAMAPA:[],MOUSEPARADO:["i3GEO.navega.mostraRosaDosVentos()"],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:[],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(this.TIMERPARADO)}catch(e){this.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(this.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEDOWN)},mouseupMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEUP)},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(this.MOUSECLIQUE)},executaEventos:function(eventos){var f=0;try{if(eventos.length>0){f=eventos.length-1;if(f>=0){do{if(eventos[f]!==""){eval(eventos[f])}}while(f--)}}}catch(e){eventos[f]=""}},posicaoMouseMapa:function(e){var teladd,teladms,container="",targ="",pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;if(!e){e=window.event}try{if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){}if(container!=="divGeometriasTemp"&&container!=="mapaReferencia"){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googlemaps","googleearth","openlayers"])){return}}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id===""&&$i(i3GEO.Interface.IDMAPA)){targ=$i(i3GEO.Interface.IDMAPA)}try{if(g_panM!=='undefined'&&g_panM==="sim"){pos=i3GEO.util.pegaPosicaoObjeto(targ.parentNode)}else{pos=i3GEO.util.pegaPosicaoObjeto(targ)}if(g_panM==="sim"){pos[0]=pos[0]-i3GEO.parametros.w;pos[1]=pos[1]-i3GEO.parametros.h}}catch(m){pos=i3GEO.util.pegaPosicaoObjeto(targ)}mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.pixelsize;ex=i3GEO.parametros.mapexten;try{if(targ.id==="imagemReferencia"){c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;r=$i("i3geo_rosa");if(r){r.style.display="none"}}}catch(e){i3GEO.parametros.celularef=0}teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex,targ.id);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout(function(){i3GEO.eventos.mouseParado()},i3GEO.configura.tempoMouseParado)}catch(e){}try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=true;try{objmapaparado="parar"}catch(e){}};docMapa.onmousedown=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousedownMapa()}};docMapa.onclick=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousecliqueMapa()}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa()}}},botaoDireita:function(exy){try{var k=(navm)?event.button:exy.button;if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){var x,y,doc=document;if(arguments.length===0){ixg="ixg";ixm="ixm";ixs="ixs";iyg="iyg";iym="iym";iys="iys";if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}if(g_tipoacao!=="capturaponto"){return}else{try{if(doc){x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById(ixg)){doc.getElementById(ixg).value=x[0]}if(doc.getElementById(ixm)){doc.getElementById(ixm).value=x[1]}if(doc.getElementById(ixs)){doc.getElementById(ixs).value=x[2]}if(doc.getElementById(iyg)){doc.getElementById(iyg).value=y[0]}if(doc.getElementById(iym)){doc.getElementById(iym).value=y[1]}if(doc.getElementById(iys)){doc.getElementById(iys).value=y[2]}}}catch(m){}}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_gadgets_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida",servicosexternos:true,temasmapa:false},"mostraVisual":{idhtml:""},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{permiteLogin:true,idhtml:"menus",deslocaEsquerda:0,parametrosYUI:{iframe:false,autosubmenudisplay:false,showdelay:200,hidedelay:500,lazyload:false}},"mostraMenuLista":{idhtml:"menuLista"},"mostraVersao":{idhtml:"versaoi3geo"},"mostraEmail":{idhtml:"emailInstituicao"}},mostraEmail:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.emailInstituicao)},mostraVersao:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.mensageminicia)},mostraCoordenadasUTM:function(id){try{i3GEO.coordenadas.mostraCoordenadasUTM.idhtml=i3GEO.gadgets.mostraCoordenadasUTM.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasUTM(id)},mostraCoordenadasGEO:function(id){try{i3GEO.coordenadas.mostraCoordenadasGEO.idhtml=i3GEO.gadgets.mostraCoordenadasGEO.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasGEO(id)},mostraInserirKml:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml}if($i(id)){if(!$i("i3geo_urlkml")){i=$inputText(id,"290","i3geo_urlkml","kml url","40","");ins="<table><tr><td>Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp,onde;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}onde=$i(id);if(onde){if(onde.style.display=="none"){onde.style.display="block"}if(!$i("i3geo_escalanum")){i="<form id='i3GEOescalanumForm' >"+$inputText(id,"100","i3geo_escalanum",$trad("d10"),"10",parseInt(i3GEO.parametros.mapscale,10))+"</form>";ins="<table><tr><td>"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";onde.innerHTML=ins;$i("i3GEOescalanumForm").onsubmit=function(){i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,document.getElementById("i3geo_escalanum").value);return false}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.atualizaEscalaNumerica()")}}},atualizaEscalaNumerica:function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.gadgets.atualizaEscalaNumerica()");return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}},mostraEscalaGrafica:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}var e,temp,ins;if($i(id)){atualizaEscalaGrafica=function(){e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}temp=function(retorno){eval(retorno.data);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){ins="<img class='menuarrow' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" title='opções' onclick='i3GEO.mapa.dialogo.opcoesEscala()' style='cursor:pointer'/><img id=imagemEscalaGrafica src='' />";$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){var i,ins,temp,fbusca;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}i3GEO.gadgets.mostraBuscaRapida.id=id;if($i(id)){i3geo_buscaRapida=function(){alert("i3geo_buscaRapida foi depreciada")};i="<form id=i3GEObotaoFormBuscaRapida"+id+" >"+$inputText(id,"256","valorBuscaRapida"+id,"Município, cidade, UC, endereço...","20",$trad("o2"))+"</form>";ins="<table><tr><td><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=8&idajuda=71' > </a></td><td>"+i+"</td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("p13")+"' class='ticPropriedades2' id=i3GEObotaoPropriedadesBuscaRapida"+id+" /></td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' id=i3GEObotaoBuscaRapida"+id+" /></td></tr></table>";temp=$i(id);if(temp){fbusca=function(){if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos===false&&i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa===false){alert("Escolha um tipo de busca nas propriedades");return}if($i("valorBuscaRapida"+id).value===""){alert("Digite uma palavra para busca!");return}i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida");return false};temp.innerHTML=ins;$i("i3GEObotaoBuscaRapida"+id).onclick=fbusca;$i("i3GEObotaoFormBuscaRapida"+id).onsubmit=fbusca;$i("i3GEObotaoPropriedadesBuscaRapida"+id).onclick=function(){var ins,interno="",externo="";i3GEO.janela.cria("300px","150px","","","","Propriedades","i3GEOpropriedadesBuscaRapida"+id);if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos){externo="checked"}if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa){interno="checked"}ins="<p class=paragrafo >Onde será feita a busca:</p>"+"<table class=lista3 >"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos = this.checked' type=checkbox "+externo+" ></td><td>Serviços de busca externos (Google e MMA)</td></tr>"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa = this.checked' type=checkbox "+interno+" ></td><td>Temas existentes no mapa</td></tr>"+"</table><br>"+"<p class=paragrafo >Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber operações de busca.</p>";$i("i3GEOpropriedadesBuscaRapida"+id+"_corpo").innerHTML=ins}}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins="<table style='text-align:center;position:relative;left:";if(navm){ins+="0px;'>"}else{ins+="6px;'>"}ins+="<tr><td><img id='i3geo_zoomanterior' class='zoomAnterior' title='anterior' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="<td> </td>";ins+="<td><img id='i3geo_zoomproximo' class='zoomProximo' title='proximo' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="</tr></table>";$i(id).innerHTML=ins}},visual:{inicia:function(id){alert("A i3GEO.gadgets.visual foi depreciado")},troca:function(visual){alert("A i3GEO.gadgets.visual foi depreciado")}},mostraMenuSuspenso:function(id){var objid,n,i,estilo,t,onMenuBarBeforeRender,temp,i3GEOoMenuBarLocal,ms=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso,confm=i3GEO.configura.oMenuData,ins="",alinhamento="";if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(!objid){return}if(objid&&objid.innerHTML===""){try{if(ms.permiteLogin===true||i3GEO.parametros.editor==="sim"){i3GEO.configura.oMenuData.menu.push({nome:"Admin",id:"i3GeoAdmin"});i3GEO.configura.oMenuData.submenus.i3GeoAdmin=[];if(ms.permiteLogin===true){i3GEO.configura.oMenuData.submenus.i3GeoAdmin.push({id:"omenudataAdminu1",text:"Login",url:"javascript:i3GEO.login.dialogo.abreLogin()"},{id:"omenudataAdminu2",text:"Logout",url:"javascript:i3GEO.login.dialogo.abreLogout()"})}if(i3GEO.login.verificaCookieLogin()){i3GEO.configura.oMenuData.submenus.i3GeoAdmin.push({id:"omenudataAdmin1",text:$trad("x1"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/admin/index.html')"},{id:"omenudataAdmin2",text:$trad("g1a"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/admin/html/arvore.html')"},{id:"omenudataAdmin3",text:$trad("x10"),url:"javascript:i3GEO.arvoreDeTemas.abrejanelaIframe('900','700','"+i3GEO.configura.locaplic+"/admin/html/menus.html\')"})}}}catch(e){}i3GEOoMenuBar=YAHOO.widget.MenuManager;if(objid){objid.className="yuimenubar";temp=$i("contemMenu");if(temp){temp.className="yui-navset"}if(ms.deslocaEsquerda){alinhamento="left:"+ms.deslocaEsquerda*-1+"px;"}if(!objid.style.height||parseInt(objid.style.height,10)===0){objid.style.height="21px"}else{if(!temp.style.height||parseInt(temp.style.height)===0){temp.style.height="21px"}}ins+='<div class="bd" style="top:0px;'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'+'<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';n=confm.menu.length;estilo="padding-bottom:3px;top:0px;border: 0px solid white;";for(i=0;i<n;i+=1){t="";if(confm.menu[i].target){t="target="+confm.menu[i].target}if(confm.submenus[confm.menu[i].id].length>0){ins+='<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+confm.menu[i].id+'" > '+confm.menu[i].nome+'</a></li>'}}ins+='</ul>';ins+='</div>';objid.innerHTML=ins;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI.iframe=true}i3GEOoMenuBarLocal=new YAHOO.widget.MenuBar(id,i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI);onMenuBarBeforeRender=function(p_sType,p_sArgs){var nomeMenu="",nomeSub,subs=i3GEO.configura.oMenuData.submenus,conta=0;for(nomeMenu in subs){if($i("menu"+nomeMenu)){nomeSub=subs[nomeMenu];if(nomeSub!==""){i3GEOoMenuBarLocal.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:nomeSub})}conta+=1}}};i3GEOoMenuBar.addMenu(i3GEOoMenuBarLocal);i3GEOoMenuBarLocal.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBarLocal.render()}}temp=["omenudataInterface1","omenudataInterface2","omenudataInterface3","omenudataInterface4","omenudataInterface5"];n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("checked",false)}}try{temp="";switch(i3GEO.Interface.ATUAL){case"openlayers":temp="omenudataInterface2";break;case"googlemaps":temp="omenudataInterface4";break;case"googleearth":temp="omenudataInterface5";break}if(temp!=""&&$i(temp)){i3GEOoMenuBar.getMenuItem(temp).cfg.setProperty("checked",true)}}catch(e){}temp=["omenudataFerramentas7b","omenudataArquivos3","omenudataJanelas1","omenudataJanelas3","omenudataFerramentas2a"];n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("disabled",false)}}try{temp=[];switch(i3GEO.Interface.ATUAL){case"openlayers":temp=["omenudataArquivos3","omenudataJanelas1"];break;case"googlemaps":temp=["omenudataArquivos3","omenudataJanelas1","omenudataJanelas3"];break;case"googleearth":temp=["omenudataFerramentas7b","omenudataArquivos3","omenudataJanelas3","omenudataFerramentas2a"];break};n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("disabled",true)}}}catch(e){}temp=objid.style;temp.backgroundPosition="0px -1px";temp.border="0px solid white";if(ms.finaliza&&ms.finaliza!=""){eval(ms.finaliza)}},mostraMenuLista:function(id){var objid,n,i,sub,nomeMenu="",ms=i3GEO.gadgets.PARAMETROS.mostraMenuLista,confm=i3GEO.configura.oMenuData,ins="",subs=i3GEO.configura.oMenuData.submenus;if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(objid){n=confm.menu.length;for(i=0;i<n;i+=1){ins+='<div class="listaMenuTitulo" id=menulista_'+confm.menu[i].id+'>'+confm.menu[i].nome+'</div>'}objid.innerHTML=ins;for(nomeMenu in subs){if($i("menulista_"+nomeMenu)){sub=subs[nomeMenu];n=sub.length;ins="";for(i=0;i<n;i++){ins+="<p class='listaMenuItem' ><a href='"+sub[i].url+"' target='_blank'>"+sub[i].text+"</a>"}$i("menulista_"+nomeMenu).innerHTML+=ins}}}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida",servicosexternos:true,temasmapa:false},"mostraVisual":{idhtml:""},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{permiteLogin:true,idhtml:"menus",deslocaEsquerda:0,parametrosYUI:{iframe:false,autosubmenudisplay:false,showdelay:200,hidedelay:500,lazyload:false}},"mostraMenuLista":{idhtml:"menuLista"},"mostraVersao":{idhtml:"versaoi3geo"},"mostraEmail":{idhtml:"emailInstituicao"}},mostraEmail:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.emailInstituicao)},mostraVersao:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.mensageminicia)},mostraCoordenadasUTM:function(id){try{i3GEO.coordenadas.mostraCoordenadasUTM.idhtml=i3GEO.gadgets.mostraCoordenadasUTM.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasUTM(id)},mostraCoordenadasGEO:function(id){try{i3GEO.coordenadas.mostraCoordenadasGEO.idhtml=i3GEO.gadgets.mostraCoordenadasGEO.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasGEO(id)},mostraInserirKml:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml}if($i(id)){if(!$i("i3geo_urlkml")){i=$inputText(id,"290","i3geo_urlkml","kml url","40","");ins="<table><tr><td>Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp,onde;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}onde=$i(id);if(onde){if(onde.style.display=="none"){onde.style.display="block"}if(!$i("i3geo_escalanum")){i="<form id='i3GEOescalanumForm' >"+$inputText(id,"100","i3geo_escalanum",$trad("d10"),"10",parseInt(i3GEO.parametros.mapscale,10))+"</form>";ins="<table><tr><td>"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";onde.innerHTML=ins;$i("i3GEOescalanumForm").onsubmit=function(){i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,document.getElementById("i3geo_escalanum").value);return false}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.atualizaEscalaNumerica()")}}},atualizaEscalaNumerica:function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.gadgets.atualizaEscalaNumerica()");return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}},mostraEscalaGrafica:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}var e,temp,ins;if($i(id)){atualizaEscalaGrafica=function(){e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}temp=function(retorno){eval(retorno.data);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){ins="<img class='menuarrow' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" title='opções' onclick='i3GEO.mapa.dialogo.opcoesEscala()' style='cursor:pointer'/><img id=imagemEscalaGrafica src='' />";$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){var i,ins,temp,fbusca;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}i3GEO.gadgets.mostraBuscaRapida.id=id;if($i(id)){i3geo_buscaRapida=function(){alert("i3geo_buscaRapida foi depreciada")};i="<form id=i3GEObotaoFormBuscaRapida"+id+" >"+$inputText(id,"256","valorBuscaRapida"+id,"Município, cidade, UC, endereço...","20",$trad("o2"))+"</form>";ins="<table><tr><td><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=8&idajuda=71' > </a></td><td>"+i+"</td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("p13")+"' class='ticPropriedades2' id=i3GEObotaoPropriedadesBuscaRapida"+id+" /></td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' id=i3GEObotaoBuscaRapida"+id+" /></td></tr></table>";temp=$i(id);if(temp){fbusca=function(){if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos===false&&i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa===false){alert("Escolha um tipo de busca nas propriedades");return}if($i("valorBuscaRapida"+id).value===""){alert("Digite uma palavra para busca!");return}i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida");return false};temp.innerHTML=ins;$i("i3GEObotaoBuscaRapida"+id).onclick=fbusca;$i("i3GEObotaoFormBuscaRapida"+id).onsubmit=fbusca;$i("i3GEObotaoPropriedadesBuscaRapida"+id).onclick=function(){var ins,interno="",externo="";i3GEO.janela.cria("300px","150px","","","","Propriedades","i3GEOpropriedadesBuscaRapida"+id);if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos){externo="checked"}if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa){interno="checked"}ins="<p class=paragrafo >Onde será feita a busca:</p>"+"<table class=lista3 >"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos = this.checked' type=checkbox "+externo+" ></td><td>Serviços de busca externos (Google e MMA)</td></tr>"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa = this.checked' type=checkbox "+interno+" ></td><td>Temas existentes no mapa</td></tr>"+"</table><br>"+"<p class=paragrafo >Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber operações de busca.</p>";$i("i3GEOpropriedadesBuscaRapida"+id+"_corpo").innerHTML=ins}}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins="<table style='text-align:center;position:relative;left:";if(navm){ins+="0px;'>"}else{ins+="6px;'>"}ins+="<tr><td><img id='i3geo_zoomanterior' class='zoomAnterior' title='anterior' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="<td> </td>";ins+="<td><img id='i3geo_zoomproximo' class='zoomProximo' title='proximo' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="</tr></table>";$i(id).innerHTML=ins}},visual:{inicia:function(id){alert("A i3GEO.gadgets.visual foi depreciado")},troca:function(visual){alert("A i3GEO.gadgets.visual foi depreciado")}},mostraMenuSuspenso:function(id){var objid,n,i,estilo,t,onMenuBarBeforeRender,temp,i3GEOoMenuBarLocal,ms=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso,confm=i3GEO.configura.oMenuData,ins="",alinhamento="";if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(!objid){return}if(objid&&objid.innerHTML===""){try{if(ms.permiteLogin===true||i3GEO.parametros.editor==="sim"){i3GEO.configura.oMenuData.menu.push({nome:"Admin",id:"i3GeoAdmin"});i3GEO.configura.oMenuData.submenus.i3GeoAdmin=[];if(ms.permiteLogin===true){i3GEO.configura.oMenuData.submenus.i3GeoAdmin.push({id:"omenudataAdminu1",text:"Login",url:"javascript:i3GEO.login.dialogo.abreLogin()"},{id:"omenudataAdminu2",text:"Logout",url:"javascript:i3GEO.login.dialogo.abreLogout()"});i3GEO.login.recarrega=true}if(i3GEO.login.verificaCookieLogin()){i3GEO.configura.oMenuData.submenus.i3GeoAdmin.push({id:"omenudataAdmin1",text:$trad("x1"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/admin/index.html')"},{id:"omenudataAdmin2",text:$trad("g1a"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/admin/html/arvore.html')"},{id:"omenudataAdmin3",text:$trad("x10"),url:"javascript:i3GEO.arvoreDeTemas.abrejanelaIframe('900','700','"+i3GEO.configura.locaplic+"/admin/html/menus.html\')"})}}}catch(e){}i3GEOoMenuBar=YAHOO.widget.MenuManager;if(objid){objid.className="yuimenubar";temp=$i("contemMenu");if(temp){temp.className="yui-navset"}if(ms.deslocaEsquerda){alinhamento="left:"+ms.deslocaEsquerda*-1+"px;"}if(!objid.style.height||parseInt(objid.style.height,10)===0){objid.style.height="21px"}else{if(!temp.style.height||parseInt(temp.style.height)===0){temp.style.height="21px"}}ins+='<div class="bd" style="top:0px;'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'+'<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';n=confm.menu.length;estilo="padding-bottom:3px;top:0px;border: 0px solid white;";for(i=0;i<n;i+=1){t="";if(confm.menu[i].target){t="target="+confm.menu[i].target}if(confm.submenus[confm.menu[i].id].length>0){ins+='<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+confm.menu[i].id+'" > '+confm.menu[i].nome+'</a></li>'}}ins+='</ul>';ins+='</div>';objid.innerHTML=ins;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI.iframe=true}i3GEOoMenuBarLocal=new YAHOO.widget.MenuBar(id,i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI);onMenuBarBeforeRender=function(p_sType,p_sArgs){var nomeMenu="",nomeSub,subs=i3GEO.configura.oMenuData.submenus,conta=0;for(nomeMenu in subs){if($i("menu"+nomeMenu)){nomeSub=subs[nomeMenu];if(nomeSub!==""){i3GEOoMenuBarLocal.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:nomeSub})}conta+=1}}};i3GEOoMenuBar.addMenu(i3GEOoMenuBarLocal);i3GEOoMenuBarLocal.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBarLocal.render()}}temp=["omenudataInterface1","omenudataInterface2","omenudataInterface3","omenudataInterface4","omenudataInterface5"];n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("checked",false)}}try{temp="";switch(i3GEO.Interface.ATUAL){case"openlayers":temp="omenudataInterface2";break;case"googlemaps":temp="omenudataInterface4";break;case"googleearth":temp="omenudataInterface5";break}if(temp!=""&&$i(temp)){i3GEOoMenuBar.getMenuItem(temp).cfg.setProperty("checked",true)}}catch(e){}temp=["omenudataFerramentas7b","omenudataArquivos3","omenudataJanelas1","omenudataJanelas3","omenudataFerramentas2a"];n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("disabled",false)}}try{temp=[];switch(i3GEO.Interface.ATUAL){case"openlayers":temp=["omenudataArquivos3","omenudataJanelas1"];break;case"googlemaps":temp=["omenudataArquivos3","omenudataJanelas1","omenudataJanelas3"];break;case"googleearth":temp=["omenudataFerramentas7b","omenudataArquivos3","omenudataJanelas3","omenudataFerramentas2a"];break};n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("disabled",true)}}}catch(e){}temp=objid.style;temp.backgroundPosition="0px -1px";temp.border="0px solid white";if(ms.finaliza&&ms.finaliza!=""){eval(ms.finaliza)}},mostraMenuLista:function(id){var objid,n,i,sub,nomeMenu="",ms=i3GEO.gadgets.PARAMETROS.mostraMenuLista,confm=i3GEO.configura.oMenuData,ins="",subs=i3GEO.configura.oMenuData.submenus;if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(objid){n=confm.menu.length;for(i=0;i<n;i+=1){ins+='<div class="listaMenuTitulo" id=menulista_'+confm.menu[i].id+'>'+confm.menu[i].nome+'</div>'}objid.innerHTML=ins;for(nomeMenu in subs){if($i("menulista_"+nomeMenu)){sub=subs[nomeMenu];n=sub.length;ins="";for(i=0;i<n;i++){ins+="<p class='listaMenuItem' ><a href='"+sub[i].url+"' target='_blank'>"+sub[i].text+"</a>"}$i("menulista_"+nomeMenu).innerHTML+=ins}}}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_guias_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/gisicons/show-layers.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/gisicons/show-catalog.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/gisicons/show-legend.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",click:function(){var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp;ins="<br><div id='banners' style='overflow:auto;text-align:left'>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div><a href='"+link+"'><img src='"+temp.IMAGEM+"'></a></div><br>";ins+="<div><p style=text-align:center >"+nome+"</p></div><br>";ig1++}while(ig1<ig1lt)}$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML=ins+"</div>"};$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde...";i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas)}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){guia.style.height=altura+"px"}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]}},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px";if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";temp.left=config.larguraPuxador+"px";temp.width="0px";temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px";temp=$i("i3GEOguiaMovelIcones").style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";temp.top="38px";temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.20);if($i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL);if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.abreFecha()}},mostraIcones:function(){if($i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="";if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ins+="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;;' /></button>"}}$i("i3GEOguiaMovelIcones").innerHTML=ins;i3GEO.guias.guiaMovel.desativaIcones();if($i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id)){$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.backgroundColor="#cedff2";$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.boxShadow="none"}},desativaIcones:function(){var ims=$i("i3GEOguiaMovelIcones").getElementsByTagName("button"),n=ims.length,i;for(i=0;i<n;i++){ims[i].style.backgroundColor="white";ims[i].style.boxShadow=""}},ativa:function(chave){if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.escondeGuias();i3GEO.guias.mostra(chave);i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.desativaIcones();if($i(i3GEO.guias.CONFIGURA[chave].id)){$i(i3GEO.guias.CONFIGURA[chave].id).parentNode.style.backgroundColor="#cedff2";$i(i3GEO.guias.CONFIGURA[chave].id).parentNode.style.boxShadow="none"}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;$i("i3GEOguiaMovelIcones").style.display="none";$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1;if(molde.style.display==="block"){$i("i3GEOguiaMovelIcones").style.display="none";$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim.animate();anim1.animate();anim1.onComplete.subscribe(function(){molde.style.display="none"})}else{molde.style.display="block";attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){$i("i3GEOguiaMovelIcones").style.display="block";$i("i3GEOguiaMovelConteudo").style.display="block";i3GEO.guias.guiaMovel.mostraIcones();YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});anim.animate();anim1.animate()}}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/gisicons/show-layers.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/gisicons/show-catalog.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/gisicons/show-legend.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",click:function(){var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp;ins="<br><div id='banners' style='overflow:auto;text-align:left'>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div><a href='"+link+"'><img src='"+temp.IMAGEM+"'></a></div><br>";ins+="<div><p style=text-align:center >"+nome+"</p></div><br>";ig1++}while(ig1<ig1lt)}$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML=ins+"</div>"};$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde...";i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas)}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){guia.style.height=altura+"px"}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]}},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px";if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";temp.left=config.larguraPuxador+"px";temp.width="0px";temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px";temp=$i("i3GEOguiaMovelIcones").style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";temp.top="38px";temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.20);if($i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL);if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.abreFecha()}},mostraIcones:function(){if($i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="";if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ins+="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;;' /></button>"}}$i("i3GEOguiaMovelIcones").innerHTML=ins;i3GEO.guias.guiaMovel.desativaIcones();if($i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id)){$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.backgroundColor="#cedff2";$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.boxShadow="none"}},desativaIcones:function(){var ims=$i("i3GEOguiaMovelIcones").getElementsByTagName("button"),n=ims.length,i;for(i=0;i<n;i++){ims[i].style.backgroundColor="white";ims[i].style.boxShadow=""}},ativa:function(chave){if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.escondeGuias();i3GEO.guias.mostra(chave);i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.desativaIcones();if($i(i3GEO.guias.CONFIGURA[chave].id)){$i(i3GEO.guias.CONFIGURA[chave].id).parentNode.style.backgroundColor="#cedff2";$i(i3GEO.guias.CONFIGURA[chave].id).parentNode.style.boxShadow="none"}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;$i("i3GEOguiaMovelIcones").style.display="none";$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1;if(molde.style.display==="block"){$i("i3GEOguiaMovelIcones").style.display="none";$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim.animate();anim1.animate();anim1.onComplete.subscribe(function(){molde.style.display="none"})}else{molde.style.display="block";attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){$i("i3GEOguiaMovelIcones").style.display="block";$i("i3GEOguiaMovelConteudo").style.display="block";i3GEO.guias.guiaMovel.mostraIcones();YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});anim.animate();anim1.animate()}}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_i3geo_compacto.js
1 | -i3GEOF=[];YAHOO.namespace("i3GEO");i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",tamanhodoc:[],temaAtivo:"",contadorAtualiza:0,cria:function(){if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}var temp,tamanho;temp=window.location.href.split("?");if(temp[1]){i3GEO.configura.sid=temp[1];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}if(i3GEO.Interface.ALTTABLET!=""){if(i3GEO.util.detectaTablet()){return}}if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])},inicia:function(retorno){var montaMapa,mashup,tamanho;if(typeof("i3GEOmantemCompatibilidade")==='function'){i3GEOmantemCompatibilidade()}montaMapa=function(retorno){try{var temp,abreJM;if(retorno===""){alert("Ocorreu um erro no mapa - montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;if(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width,10)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}i3GEO.Interface.inicia()}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if($i("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}abreJM="sim";if(i3GEO.util.pegaCookie("botoesAjuda")){abreJM=i3GEO.util.pegaCookie("botoesAjuda");i3GEO.barraDeBotoes.AJUDA=(abreJM==="sim")?true:false}if(i3GEO.configura.iniciaJanelaMensagens===true){i3GEO.ajuda.abreJanela()}if(i3GEO.configura.liberaGuias.toLowerCase()==="sim"){i3GEO.guias.libera()}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if(i3GEO.configura.sid===""){mashup=function(retorno){i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}if(i3GEO.mapa.AUTORESIZE===true){i3GEO.mapa.ativaAutoResize()}},aposIniciar:function(){if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.inicia()}},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(retorno===""){corpoMapa.call();return}if(!retorno.data){alert(retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.Interface.redesenha();if($i("i3GEOidentificalistaTemas")){g_tipoacao="identifica";g_operacao='identifica'}else{g_operacao=""}if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+retorno.data.variaveis.tempo,"");temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[YAHOO.util.Dom.getViewportWidth(),YAHOO.util.Dom.getViewportHeight()];Dw=YAHOO.util.Dom.getDocumentWidth();Dh=YAHOO.util.Dom.getDocumentHeight();novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i("mst");if(temp){temp.style.width="100%"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;i3GEO.php.mudatamanho(i3GEO.atualiza,h,w);switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();break}if(i3GEO.guias.TIPO==="sanfona"){i3GEO.guias.ALTURACORPOGUIAS=h-(antigoh-i3GEO.guias.ALTURACORPOGUIAS)}else{i3GEO.guias.ALTURACORPOGUIAS=h}return[w,h]},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}}; | |
2 | 1 | \ No newline at end of file |
2 | +i3GEOF=[];YAHOO.namespace("i3GEO");var i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",tamanhodoc:[],temaAtivo:"",contadorAtualiza:0,cria:function(){if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}var temp,tamanho;temp=window.location.href.split("?");if(temp[1]){i3GEO.configura.sid=temp[1];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}if(i3GEO.Interface.ALTTABLET!=""){if(i3GEO.util.detectaTablet()){return}}if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])},inicia:function(retorno){var montaMapa,mashup,tamanho;if(typeof("i3GEOmantemCompatibilidade")==='function'){i3GEOmantemCompatibilidade()}montaMapa=function(retorno){try{var temp,abreJM;if(retorno===""){alert("Ocorreu um erro no mapa - montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;if(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width,10)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}i3GEO.Interface.inicia()}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if($i("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}abreJM="sim";if(i3GEO.util.pegaCookie("botoesAjuda")){abreJM=i3GEO.util.pegaCookie("botoesAjuda");i3GEO.barraDeBotoes.AJUDA=(abreJM==="sim")?true:false}if(i3GEO.configura.iniciaJanelaMensagens===true){i3GEO.ajuda.abreJanela()}if(i3GEO.configura.liberaGuias.toLowerCase()==="sim"){i3GEO.guias.libera()}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if(i3GEO.configura.sid===""){mashup=function(retorno){i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}if(i3GEO.mapa.AUTORESIZE===true){i3GEO.mapa.ativaAutoResize()}},aposIniciar:function(){if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.inicia()}},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(retorno===""){corpoMapa.call();return}if(!retorno.data){alert(retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.Interface.redesenha();if($i("i3GEOidentificalistaTemas")){g_tipoacao="identifica";g_operacao='identifica'}else{g_operacao=""}if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+retorno.data.variaveis.tempo,"");temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[YAHOO.util.Dom.getViewportWidth(),YAHOO.util.Dom.getViewportHeight()];Dw=YAHOO.util.Dom.getDocumentWidth();Dh=YAHOO.util.Dom.getDocumentHeight();novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i("mst");if(temp){temp.style.width="100%"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;i3GEO.php.mudatamanho(i3GEO.atualiza,h,w);switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();break}if(i3GEO.guias.TIPO==="sanfona"){i3GEO.guias.ALTURACORPOGUIAS=h-(antigoh-i3GEO.guias.ALTURACORPOGUIAS)}else{i3GEO.guias.ALTURACORPOGUIAS=h}return[w,h]},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_idioma_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.idioma={MOSTRASELETOR:true,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id){if(i3GEO.idioma.DICIONARIO[id]){var t=i3GEO.idioma.DICIONARIO[id][0];return t[i3GEO.idioma.ATUAL]}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k=0;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel,temp,iu=i3GEO.util;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<550){w="width:12px;"}else{w=""}for(i=0;i<n;i++){temp=i3GEO.idioma.SELETORES[i];ins+='<img style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+iu.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+temp+'\')" ';if(temp==="en"){ins+='alt="Ingles" id="uk" />'}if(temp==="pt"){ins+='alt="Portugues" id="brasil" />'}if(temp==="es"){ins+='alt="Espanhol" id="espanhol" />'}if(temp==="it"){ins+='alt="Italiano" id="italiano" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}}};var $trad=function(id){return(i3GEO.idioma.traduzir(id))};(function(){try{var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c);g_linguagem=c}else{if(typeof(g_linguagem)!=="undefined"){i3GEO.idioma.define(g_linguagem)}else{g_linguagem="pt";i3GEO.idioma.define("pt")}}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}}catch(e){alert("Problemas com idiomas "+e)}})(); | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.idioma={MOSTRASELETOR:true,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id){if(i3GEO.idioma.DICIONARIO[id]){var t=i3GEO.idioma.DICIONARIO[id][0];return t[i3GEO.idioma.ATUAL]}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k=0;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel,temp,iu=i3GEO.util;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<550){w="width:12px;"}else{w=""}for(i=0;i<n;i++){temp=i3GEO.idioma.SELETORES[i];ins+='<img style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+iu.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+temp+'\')" ';if(temp==="en"){ins+='alt="Ingles" id="uk" />'}if(temp==="pt"){ins+='alt="Portugues" id="brasil" />'}if(temp==="es"){ins+='alt="Espanhol" id="espanhol" />'}if(temp==="it"){ins+='alt="Italiano" id="italiano" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}}};$trad=function(id){return(i3GEO.idioma.traduzir(id))};(function(){try{var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c);g_linguagem=c}else{if(typeof(g_linguagem)!=="undefined"){i3GEO.idioma.define(g_linguagem)}else{g_linguagem="pt";i3GEO.idioma.define("pt")}}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}}catch(e){alert("Problemas com idiomas "+e)}})(); | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_interface_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.Interface={TABLET:false,ALTTABLET:"openlayers_t.htm",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:20,BARRADEZOOMLEFT:10,ATUAL:"openlayers",IDCORPO:"corpoMapa",ATIVAMENUCONTEXTO:false,IDMAPA:"",STATUS:{atualizando:[],trocando:false},atual2gm:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(google){i3GEO.Interface.atual2gm.initemp()}}catch(e){i3GEO.util.scriptTag("http://www.google.com/jsapi?callback=i3GEO.Interface.atual2gm.loadMaps","","",false)}},loadMaps:function(){google.load("maps","3",{callback:"i3GEO.Interface.atual2gm.initemp",other_params:"sensor=false"})},initemp:function(){var temp=function(){$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.googlemaps.inicia();i3GEO.janela.fechaAguarde("googleMapsAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("openlayers",i3GEO.configura.locaplic+"/imagens/dobraopenlayers.png")};i3GEO.php.converte2googlemaps(temp)}},atual2ol:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(OpenLayers){i3GEO.Interface.atual2ol.initemp()}}catch(e){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/openlayers/OpenLayers211.js.php","i3GEO.Interface.atual2ol.initemp()","",false)}},initemp:function(){var temp=function(){OpenLayers.ImgPath="../pacotes/openlayers/img/";$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.openlayers.inicia();i3GEO.janela.fechaAguarde("OpenLayersAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("googlemaps",i3GEO.configura.locaplic+"/imagens/dobragooglemaps.png");i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten)};i3GEO.php.converte2openlayers(temp)}},redesenha:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()},aplicaOpacidade:function(opacidade){i3GEO.Interface[i3GEO.Interface.ATUAL].aplicaOpacidade(opacidade)},atualizaMapa:function(){switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()}},atualizaTema:function(retorno,tema){i3GEO.Interface[i3GEO.Interface.ATUAL].atualizaTema(retorno,tema)},adicionaKml:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}i3GEO.navega.autoRedesenho.ativa();i3GEO.util.defineValor("i3geo_escalanum","value",i3GEO.parametros.mapscale);if((i3GEO.parametros.geoip==="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.Interface[i3GEO.Interface.ATUAL].inicia();if($i(i3GEO.login.divnomelogin)&&i3GEO.util.pegaCookie("i3geousuarionome")){$i(i3GEO.login.divnomelogin).innerHTML=i3GEO.util.pegaCookie("i3geousuarionome")}},alteraParametroLayers:function(parametro,valor){i3GEO.Interface[i3GEO.Interface.ATUAL].alteraParametroLayers(parametro,valor)},ativaBotoes:function(){if(i3GEO.Interface.STATUS.trocando===false){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{i3GEO.Interface[i3GEO.Interface.ATUAL].ativaBotoes()}}},openlayers:{FUNDOTEMA:"yellow",TILES:false,BUFFER:0,GADGETS:{PanZoomBar:true,PanZoom:false,LayerSwitcher:true,ScaleLine:true,OverviewMap:false},MINEXTENT:[-0.0005,-0.0005,0.0005,0.0005],MAXEXTENT:[-180,-90,180,90],LAYERSADICIONAIS:[],redesenha:function(){var openlayers=i3GEO.Interface.openlayers;openlayers.criaLayers();openlayers.ordenaLayers();openlayers.recalcPar();i3GEO.janela.fechaAguarde();openlayers.sobeLayersGraficos()},cria:function(w,h){var f,ins,mi=i3GEO.Interface.openlayers.MINEXTENT,ma=i3GEO.Interface.openlayers.MAXEXTENT,i=$i(i3GEO.Interface.IDCORPO),bb=i3GEO.barraDeBotoes;OpenLayers.DOTS_PER_INCH=i3GEO.util.calculaDPI();OpenLayers._getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/openlayers/"};if(i){f=$i("openlayers");if(!f){ins='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w+"px";f.style.height=h+"px"}i3GEO.Interface.IDMAPA="openlayers";if(i3GEO.Interface.TABLET===true){i3geoOL=new OpenLayers.Map({div:"openlayers",theme:null,controls:[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]})}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;i3geoOL=new OpenLayers.Map('openlayers',{controls:[],fractionalZoom:true,minResolution:"auto",minExtent:new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3]),maxResolution:"auto",maxExtent:new OpenLayers.Bounds(ma[0],ma[1],ma[2],ma[3]),allOverlays:false})}},inicia:function(){var montaMapa=function(){var pz,temp,layers,i,texto,estilo,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});if(openlayers.GADGETS.PanZoom===true){pz=new OpenLayers.Control.PanZoom();i3geoOL.addControl(pz);pz.div.style.zIndex=5000}openlayers.criaLayers();temp=$i("listaLayersBase");if(temp){estilo="cursor:pointer;vertical-align:top;padding-top:5px;";if(navm){estilo="border:0px solid white;cursor:pointer;vertical-align:middle;padding-top:0px;"}temp={"propriedades":[]};layers=i3geoOL.getLayersBy("isBaseLayer",true);layersn=layers.length;for(i=0;i<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].id+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}i3GEO.Interface.ativaBotoes();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}};if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);"}i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}},aplicaOpacidade:function(opacidade){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer&&layer.isBaseLayer===false){layer.setOpacity(opacidade)}}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+=" <span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,j="",html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,camada,urllayer,opcoes,i,n,temp=$i("i3GEOprogressoDiv"),fundoIsBase=true;if(temp){i3GEO.Interface.STATUS.atualizando=[];temp.style.display="none"}try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.Vector("Nenhum",{displayInLayerSwitcher:true,visibility:false,isBaseLayer:true,singleTile:true});i3geoOL.addLayer(layer);if($i(i3geoOL.id+"_events")){$i(i3geoOL.id+"_events").style.backgroundColor="rgb("+i3GEO.parametros.cordefundo+")"}}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:false,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){layer="";camada=i3GEO.arvoreDeCamadas.CAMADAS[i];opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES);if(i3geoOL.getLayersByName(camada.name).length===0&&camada.name.toLowerCase()!="copyright"){urllayer=url+"&layer="+camada.name+"&r="+Math.random();try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes);if(camada.wmssrs!=""&&layer.url){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||camada.type===0||camada.type===4||camada.type===8){opcoes.singleTile=true}else{temp=camada.type===3?opcoes.singleTile=false:opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES)}layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}if(layer&&layer!=""){temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}if(i3GEO.parametros.copyright!=""&&!$i("i3GEOcopyright")){temp=document.createElement("div");temp.id="i3GEOcopyright";temp.style.display="block";temp.style.top="0px";temp.style.left="0px";temp.style.zIndex=5000;temp.style.position="absolute";temp.innerHTML="<p class=paragrafo >"+i3GEO.parametros.copyright+"</p>";$i(i3GEO.Interface.IDMAPA).appendChild(temp)}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"&&layers[i].name!="Nenhum"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},inverteModoTile:function(){if(i3GEO.Interface.openlayers.TILES===true){i3GEO.Interface.openlayers.TILES=false}else{i3GEO.Interface.openlayers.TILES=true}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer){i3geoOL.removeLayer(layer,false)}}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){if(layers[i].url){url=layers[i].url;reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");eval("layers[i].mergeNewParams({"+parametro+":valor})");layers[i].redraw()}}},loadStartLayer:function(event){var p=$i("i3GEOprogressoDiv");if($i("ArvoreTituloTema"+event.object.name)){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA);if(p){p.style.display="block";i3GEO.arvoreDeCamadas.progressBar.set('maxValue',i3GEO.Interface.STATUS.atualizando.length);i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')-1)}}},loadStopLayer:function(event){var p=$i("i3GEOprogressoDiv");i3GEO.Interface.STATUS.atualizando.remove(event.object.name);if($i("ArvoreTituloTema"+event.object.name)){YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","");if(p){p.style.display="block";if(i3GEO.Interface.STATUS.atualizando.length>0){i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')+1)}else{i3GEO.arvoreDeCamadas.progressBar.set('value',0);p.style.display="none"}}}},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];if(layer){i3geoOL.setLayerIndex(layer,maiorindice+i)}}},sobeDesceLayer:function(tema,tipo){var layer=i3geoOL.getLayersByName(tema)[0],indice;if(layer){indice=i3geoOL.getLayerIndex(layer);if(tipo==="sobe"){i3geoOL.setLayerIndex(layer,indice+1)}else{i3geoOL.setLayerIndex(layer,indice-1)}}},ligaDesliga:function(obj){var layers=i3geoOL.getLayersByName(obj.value),desligar="",ligar="",b;if(layers.length>0){{layers[0].setVisibility(obj.checked)}if(obj.checked){ligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value)}b=new Image();b.src=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemasbeacon&desligar="+desligar+"&ligar="+ligar+"&adicionar=nao&g_sid="+i3GEO.configura.sid;b.onerror=function(){i3GEO.mapa.legendaHTML.atualiza()}}},ativaFundo:function(id){i3geoOL.setBaseLayer(i3geoOL.getLayer(id));i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].url){layers[i].mergeNewParams({r:Math.random()});layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&","");layers[i].url=layers[i].url+"&&";if(layers[i].visibility===true){layers[i].redraw()}}}},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){if(layer.url){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&","");layer.url=layer.url+"&&";layer.redraw()}}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){var modoAtual="";i3GEO.eventos.ativa($i("openlayers"));i3geoOL.events.register("movestart",i3geoOL,function(e){var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});i3geoOL.events.register("moveend",i3geoOL,function(e){var xy;modoAtual="";i3GEO.Interface.openlayers.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});i3geoOL.events.register("mousemove",i3geoOL,function(e){var p,lonlat,d,pos;if(modoAtual==="move"){return}p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}})},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();i3GEO.gadgets.atualizaEscalaNumerica(parseInt(escalaAtual,10))},zoom2ext:function(ext){var m,b;m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b)},pan2ponto:function(x,y){i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{MAPOPTIONS:{scaleControl:true},OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},removeTodosLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.removeTodosLayers();i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");if(w){f.style.width=w+"px";f.style.height=h+"px"}}i3GeoMap="";i3GEO.Interface.IDMAPA="googlemapsdiv";if(i3GEO.Interface.TABLET===false){i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=true;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=true;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=true}},ativaZoomBox:function(){i3GeoMap.enableKeyDragZoom({key:'ctrl'})},inicia:function(){var pol,ret,montaMapa;pol=i3GEO.parametros.mapexten;ret=pol.split(" ");montaMapa=function(retorno){var sw,ne,dobra=$i("i3GEOdobraPagina");try{i3GeoMap=new google.maps.Map($i(i3GEO.Interface.IDMAPA),i3GEO.Interface.googlemaps.MAPOPTIONS)}catch(e){alert(e);return}if(dobra){$i(i3GEO.Interface.IDMAPA).appendChild(dobra)}if(!$i("keydragzoom_script")){js=i3GEO.configura.locaplic+"/pacotes/google/keydragzoom.js.php";i3GEO.util.scriptTag(js,"i3GEO.Interface.googlemaps.ativaZoomBox()","keydragzoom_script")}i3GeoMap.setMapTypeId(i3GEO.Interface.googlemaps.TIPOMAPA);sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne));i3GeoMapOverlay=new google.maps.OverlayView();i3GeoMapOverlay.draw=function(){};i3GEO.Interface.googlemaps.criaLayers();i3GeoMapOverlay.setMap(i3GeoMap);i3GEO.Interface.googlemaps.registraEventos();if(i3GEO.Interface.STATUS.trocando===false){i3GEO.gadgets.mostraInserirKml()}i3GEO.Interface.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));if(i3GEO.Interface.STATUS.trocando===false){i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor()}i3GEO.gadgets.mostraMenuSuspenso();g_operacao="";g_tipoacao="";if(i3GEO.Interface.STATUS.trocando===true){$i(i3GEO.arvoreDeCamadas.IDHTML).innerHTML=""}if(i3GEO.Interface.STATUS.trocando===false){i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)}if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(this)"}i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googlemaps.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googlemaps.adicionaKml(true,i3GEO.parametros.kmlurl)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}};i3GEO.php.googlemaps(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0)}}}},criaImageMap:function(nomeLayer){var i3GEOTileO="",s;s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var pos,modoAtual="";google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao="";var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});google.maps.event.addListener(i3GeoMap,"dragend",function(){var xy;modoAtual="";i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar()});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){var xy;i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela;if(modoAtual==="move"){return}ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i,divmapa=$i("googlemapsdiv"),divimg,n;divimg=divmapa.getElementsByTagName("img");n=divimg.length;if(divimg&&n>0){for(i=0;i<n;i++){if(divimg[i].src.search("&layer="+nomeLayer+"&")>0){return divimg[i].parentNode.parentNode.parentNode}}}return false},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="",n,i,lista=[],listatemp;if(obj.checked&&!indice){ligar=obj.value;listatemp=i3GEO.arvoreDeCamadas.listaLigadosDesligados()[0];n=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<n;i++){if(i3GEO.util.in_array(i3GEO.arvoreDeCamadas.CAMADAS[i],listatemp)){lista.push(i3GEO.arvoreDeCamadas.CAMADAS[i])}}n=lista.length;indice=0;for(i=0;i<n;i++){if(lista[i]==obj.value){indice=n-1-i}}i3GEO.Interface.googlemaps.insereLayer(obj.value,indice);i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},aplicaOpacidade:function(opacidade){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,div;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(camada&&camada.name){div=i3GEO.Interface.googlemaps.retornaDivLayer(camada.name);if(div){YAHOO.util.Dom.setStyle(div,"opacity",opacidade)}}}},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var pol=mapexten,ret=pol.split(" "),sw=new google.maps.LatLng(ret[1],ret[0]),ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+=" <span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, this.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, this.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, this.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, this.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)"}i=$i(i3GEO.Interface.IDCORPO);if(i){i3GeoMap3d=document.createElement("div");i3GeoMap3d.style.width=w+"px";i3GeoMap3d.style.height=h+"px";i.style.height=h;i3GeoMap3d.id="i3GeoMap3d";i3GeoMap3d.style.zIndex=0;i.appendChild(i3GeoMap3d)}google.load("earth","1")},inicia:function(){google.earth.createInstance("i3GeoMap3d",i3GEO.Interface.googleearth.iniciaGE,i3GEO.Interface.googleearth.falha)},iniciaGE:function(object){var montaMapa=function(retorno){i3GeoMap=object;i3GeoMap.getWindow().setVisibility(true);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.Interface.googleearth.criaLayers();var options=i3GeoMap.getOptions(),layerRoot=i3GeoMap.getLayerRoot();options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled);options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility);options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility);options.setScaleLegendVisibility(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility);options.setAtmosphereVisibility(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility);options.setGridVisibility(i3GEO.Interface.googleearth.GADGETS.setGridVisibility);layerRoot.enableLayerById(i3GeoMap.LAYER_BORDERS,i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS);layerRoot.enableLayerById(i3GeoMap.LAYER_BUILDINGS,i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS);layerRoot.enableLayerById(i3GeoMap.LAYER_ROADS,i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS);layerRoot.enableLayerById(i3GeoMap.LAYER_TERRAIN,i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN);i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun);i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW);i3GEO.Interface.googleearth.POSICAOTELA=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO));i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googleearth.adicionaListaKml()}i3GEO.Interface.googleearth.registraEventos();if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googleearth.adicionaKml(true,i3GEO.parametros.kmlurl,i3GEO.parametros.kmlurl,false)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}};i3GEO.php.googleearth(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice,layer;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice===false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=0,i=0;if(n>0){for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice}else{return false}},aplicaOpacidade:function(opacidade){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),i;for(i=0;i<n;i++){i3GeoMap.getFeatures().getChildNodes().item(i).setOpacity(opacidade)}},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar()});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","","Ferramentas","i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div> ';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+=" <span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.Interface={TABLET:false,ALTTABLET:"openlayers_t.htm",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:20,BARRADEZOOMLEFT:10,ATUAL:"openlayers",IDCORPO:"corpoMapa",ATIVAMENUCONTEXTO:false,IDMAPA:"",STATUS:{atualizando:[],trocando:false},atual2gm:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(google){i3GEO.Interface.atual2gm.initemp()}}catch(e){i3GEO.util.scriptTag("http://www.google.com/jsapi?callback=i3GEO.Interface.atual2gm.loadMaps","","",false)}},loadMaps:function(){google.load("maps","3",{callback:"i3GEO.Interface.atual2gm.initemp",other_params:"sensor=false"})},initemp:function(){var temp=function(){$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.googlemaps.inicia();i3GEO.janela.fechaAguarde("googleMapsAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("openlayers",i3GEO.configura.locaplic+"/imagens/dobraopenlayers.png")};i3GEO.php.converte2googlemaps(temp)}},atual2ol:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(OpenLayers){i3GEO.Interface.atual2ol.initemp()}}catch(e){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/openlayers/OpenLayers211.js.php","i3GEO.Interface.atual2ol.initemp()","",false)}},initemp:function(){var temp=function(){OpenLayers.ImgPath="../pacotes/openlayers/img/";$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.openlayers.inicia();i3GEO.janela.fechaAguarde("OpenLayersAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("googlemaps",i3GEO.configura.locaplic+"/imagens/dobragooglemaps.png");i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten)};i3GEO.php.converte2openlayers(temp)}},redesenha:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()},aplicaOpacidade:function(opacidade){i3GEO.Interface[i3GEO.Interface.ATUAL].aplicaOpacidade(opacidade)},atualizaMapa:function(){switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()}},atualizaTema:function(retorno,tema){i3GEO.Interface[i3GEO.Interface.ATUAL].atualizaTema(retorno,tema)},adicionaKml:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}i3GEO.navega.autoRedesenho.ativa();i3GEO.util.defineValor("i3geo_escalanum","value",i3GEO.parametros.mapscale);if((i3GEO.parametros.geoip==="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.Interface[i3GEO.Interface.ATUAL].inicia();if($i(i3GEO.login.divnomelogin)&&i3GEO.util.pegaCookie("i3geousuarionome")){$i(i3GEO.login.divnomelogin).innerHTML=i3GEO.util.pegaCookie("i3geousuarionome")}},alteraParametroLayers:function(parametro,valor){i3GEO.Interface[i3GEO.Interface.ATUAL].alteraParametroLayers(parametro,valor)},ativaBotoes:function(){if(i3GEO.Interface.STATUS.trocando===false){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{i3GEO.Interface[i3GEO.Interface.ATUAL].ativaBotoes()}}},openlayers:{FUNDOTEMA:"yellow",TILES:false,BUFFER:0,GADGETS:{PanZoomBar:true,PanZoom:false,LayerSwitcher:true,ScaleLine:true,OverviewMap:false},MINEXTENT:[-0.0005,-0.0005,0.0005,0.0005],MAXEXTENT:[-180,-90,180,90],LAYERSADICIONAIS:[],redesenha:function(){var openlayers=i3GEO.Interface.openlayers;openlayers.criaLayers();openlayers.ordenaLayers();openlayers.recalcPar();i3GEO.janela.fechaAguarde();openlayers.sobeLayersGraficos()},cria:function(w,h){var f,ins,mi=i3GEO.Interface.openlayers.MINEXTENT,ma=i3GEO.Interface.openlayers.MAXEXTENT,i=$i(i3GEO.Interface.IDCORPO),bb=i3GEO.barraDeBotoes;OpenLayers.DOTS_PER_INCH=i3GEO.util.calculaDPI();OpenLayers._getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/openlayers/"};if(i){f=$i("openlayers");if(!f){ins='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w+"px";f.style.height=h+"px"}i3GEO.Interface.IDMAPA="openlayers";if(i3GEO.Interface.TABLET===true){i3geoOL=new OpenLayers.Map({div:"openlayers",theme:null,controls:[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]})}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;i3geoOL=new OpenLayers.Map('openlayers',{controls:[],fractionalZoom:true,minResolution:"auto",minExtent:new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3]),maxResolution:"auto",maxExtent:new OpenLayers.Bounds(ma[0],ma[1],ma[2],ma[3]),allOverlays:false})}},inicia:function(){var montaMapa=function(){var pz,temp,layers,i,texto,estilo,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});if(openlayers.GADGETS.PanZoom===true){pz=new OpenLayers.Control.PanZoom();i3geoOL.addControl(pz);pz.div.style.zIndex=5000}openlayers.criaLayers();temp=$i("listaLayersBase");if(temp){estilo="cursor:pointer;vertical-align:top;padding-top:5px;";if(navm){estilo="border:0px solid white;cursor:pointer;vertical-align:middle;padding-top:0px;"}temp={"propriedades":[]};layers=i3geoOL.getLayersBy("isBaseLayer",true);layersn=layers.length;for(i=0;i<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].id+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}i3GEO.Interface.ativaBotoes();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}};if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);"}i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}},aplicaOpacidade:function(opacidade){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer&&layer.isBaseLayer===false){layer.setOpacity(opacidade)}}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+=" <span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,j="",html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,camada,urllayer,opcoes,i,n,temp=$i("i3GEOprogressoDiv"),fundoIsBase=true;if(temp){i3GEO.Interface.STATUS.atualizando=[];temp.style.display="none"}try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.Vector("Nenhum",{displayInLayerSwitcher:true,visibility:false,isBaseLayer:true,singleTile:true});i3geoOL.addLayer(layer);if($i(i3geoOL.id+"_events")){$i(i3geoOL.id+"_events").style.backgroundColor="rgb("+i3GEO.parametros.cordefundo+")"}}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:false,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){layer="";camada=i3GEO.arvoreDeCamadas.CAMADAS[i];opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES);if(i3geoOL.getLayersByName(camada.name).length===0&&camada.name.toLowerCase()!="copyright"){urllayer=url+"&layer="+camada.name+"&r="+Math.random();try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes);if(camada.wmssrs!=""&&layer.url){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||camada.type===0||camada.type===4||camada.type===8){opcoes.singleTile=true}else{temp=camada.type===3?opcoes.singleTile=false:opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES)}layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}if(layer&&layer!=""){temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}if(i3GEO.parametros.copyright!=""&&!$i("i3GEOcopyright")){temp=document.createElement("div");temp.id="i3GEOcopyright";temp.style.display="block";temp.style.top="0px";temp.style.left="0px";temp.style.zIndex=5000;temp.style.position="absolute";temp.innerHTML="<p class=paragrafo >"+i3GEO.parametros.copyright+"</p>";$i(i3GEO.Interface.IDMAPA).appendChild(temp)}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"&&layers[i].name!="Nenhum"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},inverteModoTile:function(){if(i3GEO.Interface.openlayers.TILES===true){i3GEO.Interface.openlayers.TILES=false}else{i3GEO.Interface.openlayers.TILES=true}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer){i3geoOL.removeLayer(layer,false)}}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){if(layers[i].url){url=layers[i].url;reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");eval("layers[i].mergeNewParams({"+parametro+":valor})");layers[i].redraw()}}},loadStartLayer:function(event){var p=$i("i3GEOprogressoDiv");if($i("ArvoreTituloTema"+event.object.name)){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA);if(p){p.style.display="block";i3GEO.arvoreDeCamadas.progressBar.set('maxValue',i3GEO.Interface.STATUS.atualizando.length);i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')-1)}}},loadStopLayer:function(event){var p=$i("i3GEOprogressoDiv");i3GEO.Interface.STATUS.atualizando.remove(event.object.name);if($i("ArvoreTituloTema"+event.object.name)){YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","");if(p){p.style.display="block";if(i3GEO.Interface.STATUS.atualizando.length>0){i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')+1)}else{i3GEO.arvoreDeCamadas.progressBar.set('value',0);p.style.display="none"}}}},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];if(layer){i3geoOL.setLayerIndex(layer,maiorindice+i)}}},sobeDesceLayer:function(tema,tipo){var layer=i3geoOL.getLayersByName(tema)[0],indice;if(layer){indice=i3geoOL.getLayerIndex(layer);if(tipo==="sobe"){i3geoOL.setLayerIndex(layer,indice+1)}else{i3geoOL.setLayerIndex(layer,indice-1)}}},ligaDesliga:function(obj){var layers=i3geoOL.getLayersByName(obj.value),desligar="",ligar="",b;if(layers.length>0){{layers[0].setVisibility(obj.checked)}if(obj.checked){ligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value)}b=new Image();b.src=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemasbeacon&desligar="+desligar+"&ligar="+ligar+"&adicionar=nao&g_sid="+i3GEO.configura.sid;b.onerror=function(){i3GEO.mapa.legendaHTML.atualiza()}}},ativaFundo:function(id){i3geoOL.setBaseLayer(i3geoOL.getLayer(id));i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].url){layers[i].mergeNewParams({r:Math.random()});layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&","");layers[i].url=layers[i].url+"&&";if(layers[i].visibility===true){layers[i].redraw()}}}},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){if(layer.url){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&","");layer.url=layer.url+"&&";layer.redraw()}}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){var modoAtual="";i3GEO.eventos.ativa($i("openlayers"));i3geoOL.events.register("movestart",i3geoOL,function(e){var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});i3geoOL.events.register("moveend",i3geoOL,function(e){var xy;modoAtual="";i3GEO.Interface.openlayers.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});i3geoOL.events.register("mousemove",i3geoOL,function(e){var p,lonlat,d,pos;if(modoAtual==="move"){return}p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}})},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();i3GEO.gadgets.atualizaEscalaNumerica(parseInt(escalaAtual,10))},zoom2ext:function(ext){var m,b;m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b)},pan2ponto:function(x,y){i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{MAPOPTIONS:{scaleControl:true},OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},removeTodosLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.removeTodosLayers();i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");if(w){f.style.width=w+"px";f.style.height=h+"px"}}i3GeoMap="";i3GEO.Interface.IDMAPA="googlemapsdiv";if(i3GEO.Interface.TABLET===false){i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=true;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=true;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=true}},ativaZoomBox:function(){i3GeoMap.enableKeyDragZoom({key:'ctrl'})},inicia:function(){var pol,ret,montaMapa;pol=i3GEO.parametros.mapexten;ret=pol.split(" ");montaMapa=function(retorno){var sw,ne,dobra=$i("i3GEOdobraPagina");try{i3GeoMap=new google.maps.Map($i(i3GEO.Interface.IDMAPA),i3GEO.Interface.googlemaps.MAPOPTIONS)}catch(e){alert(e);return}if(dobra){$i(i3GEO.Interface.IDMAPA).appendChild(dobra)}if(!$i("keydragzoom_script")){js=i3GEO.configura.locaplic+"/pacotes/google/keydragzoom.js.php";i3GEO.util.scriptTag(js,"i3GEO.Interface.googlemaps.ativaZoomBox()","keydragzoom_script")}i3GeoMap.setMapTypeId(i3GEO.Interface.googlemaps.TIPOMAPA);sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne));i3GeoMapOverlay=new google.maps.OverlayView();i3GeoMapOverlay.draw=function(){};i3GEO.Interface.googlemaps.criaLayers();i3GeoMapOverlay.setMap(i3GeoMap);i3GEO.Interface.googlemaps.registraEventos();if(i3GEO.Interface.STATUS.trocando===false){i3GEO.gadgets.mostraInserirKml()}i3GEO.Interface.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));if(i3GEO.Interface.STATUS.trocando===false){i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor()}i3GEO.gadgets.mostraMenuSuspenso();g_operacao="";g_tipoacao="";if(i3GEO.Interface.STATUS.trocando===true){$i(i3GEO.arvoreDeCamadas.IDHTML).innerHTML=""}if(i3GEO.Interface.STATUS.trocando===false){i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)}if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(this)"}i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googlemaps.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googlemaps.adicionaKml(true,i3GEO.parametros.kmlurl)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}};i3GEO.php.googlemaps(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0)}}}},criaImageMap:function(nomeLayer){var i3GEOTileO="",s;s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var pos,modoAtual="";google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao="";var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});google.maps.event.addListener(i3GeoMap,"dragend",function(){var xy;modoAtual="";i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar()});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){var xy;i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela;if(modoAtual==="move"){return}ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i,divmapa=$i("googlemapsdiv"),divimg,n;divimg=divmapa.getElementsByTagName("img");n=divimg.length;if(divimg&&n>0){for(i=0;i<n;i++){if(divimg[i].src.search("&layer="+nomeLayer+"&")>0){return divimg[i].parentNode.parentNode.parentNode}}}return false},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="",n,i,lista=[],listatemp;if(obj.checked&&!indice){ligar=obj.value;listatemp=i3GEO.arvoreDeCamadas.listaLigadosDesligados()[0];n=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<n;i++){if(i3GEO.util.in_array(i3GEO.arvoreDeCamadas.CAMADAS[i],listatemp)){lista.push(i3GEO.arvoreDeCamadas.CAMADAS[i])}}n=lista.length;indice=0;for(i=0;i<n;i++){if(lista[i]==obj.value){indice=n-1-i}}i3GEO.Interface.googlemaps.insereLayer(obj.value,indice);i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},aplicaOpacidade:function(opacidade){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,div;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(camada&&camada.name){div=i3GEO.Interface.googlemaps.retornaDivLayer(camada.name);if(div){YAHOO.util.Dom.setStyle(div,"opacity",opacidade)}}}},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var pol=mapexten,ret=pol.split(" "),sw=new google.maps.LatLng(ret[1],ret[0]),ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+=" <span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, this.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, this.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, this.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, this.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)"}i=$i(i3GEO.Interface.IDCORPO);if(i){i3GeoMap3d=document.createElement("div");i3GeoMap3d.style.width=w+"px";i3GeoMap3d.style.height=h+"px";i.style.height=h;i3GeoMap3d.id="i3GeoMap3d";i3GeoMap3d.style.zIndex=0;i.appendChild(i3GeoMap3d)}google.load("earth","1")},inicia:function(){google.earth.createInstance("i3GeoMap3d",i3GEO.Interface.googleearth.iniciaGE,i3GEO.Interface.googleearth.falha)},iniciaGE:function(object){var montaMapa=function(retorno){i3GeoMap=object;i3GeoMap.getWindow().setVisibility(true);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.Interface.googleearth.criaLayers();var options=i3GeoMap.getOptions(),layerRoot=i3GeoMap.getLayerRoot();options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled);options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility);options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility);options.setScaleLegendVisibility(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility);options.setAtmosphereVisibility(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility);options.setGridVisibility(i3GEO.Interface.googleearth.GADGETS.setGridVisibility);layerRoot.enableLayerById(i3GeoMap.LAYER_BORDERS,i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS);layerRoot.enableLayerById(i3GeoMap.LAYER_BUILDINGS,i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS);layerRoot.enableLayerById(i3GeoMap.LAYER_ROADS,i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS);layerRoot.enableLayerById(i3GeoMap.LAYER_TERRAIN,i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN);i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun);i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW);i3GEO.Interface.googleearth.POSICAOTELA=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO));i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googleearth.adicionaListaKml()}i3GEO.Interface.googleearth.registraEventos();if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googleearth.adicionaKml(true,i3GEO.parametros.kmlurl,i3GEO.parametros.kmlurl,false)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}};i3GEO.php.googleearth(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice,layer;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice===false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=0,i=0;if(n>0){for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice}else{return false}},aplicaOpacidade:function(opacidade){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),i;for(i=0;i<n;i++){i3GeoMap.getFeatures().getChildNodes().item(i).setOpacity(opacidade)}},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar()});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","","Ferramentas","i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div> ';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+=" <span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_janela_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}YAHOO.namespace("i3GEO.janela");YAHOO.i3GEO.janela.manager=new YAHOO.widget.OverlayManager();YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();YAHOO.i3GEO.janela.managerAguarde=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 2px 5px 2px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,OPACIDADEAGUARDE:50,TIPS:[],ULTIMOZINDEX:0,prepara:function(){var iu=i3GEO.util;iu.escondePin();iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza){if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}var i,wlargurA,ins,novoel,wdocaiframe,temp,fix,underlay,ifr,janela;if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(!classe||classe==""){classe="hd"}if(!id||id===""){id="wdoca"}if(!modal||modal===""){modal=false}ifr=false;if(i3GEO.Interface&&i3GEO.Interface.ATUAL==="googleearth"){i3GEO.janela.TRANSICAOSUAVE=false;ifr=true}fix=false;if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}temp=navm?0:2;wlargurA=parseInt(wlargura,10)+temp+"px";ins='<div id="'+id+'_cabecalho" class="'+classe+'" style="background-color:white;">';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' style='z-index:2;position:absolute;left:3px;top:2px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"}ins+="<span style='font-size:10px;'>"+texto+"</span>";if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12+"px";temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)+"px"}$i(id+'_corpo').style.width=parseInt(wlargura,10)+"px"}if(waltura==="auto"){janela=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:"none",fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{janela=new YAHOO.widget.ResizePanel(id,{hideMode:'offsets',iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}if(nx!==""&&nx!=="center"){janela.moveTo(nx,ny+50)}YAHOO.i3GEO.janela.manager.register(janela);if(this.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.cfg.setProperty("zIndex",[10000]);janela.render();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}if(ifr===true){janela.iframe.style.zIndex=0}temp=$i(id+"_corpo");if(temp){if(navm){temp.style.paddingRight="0px"}temp.style.width=parseInt(temp.style.width,10)-2+"px"}if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(janela.close,"click",i3GEO.janela.fecha,janela,{id:id},true);return([janela,$i(id+"_cabecalho"),$i(id+"_corpo")])},minimiza:function(id){var temp=$i(id+"_corpo"),n,i,m=YAHOO.i3GEO.janela.manager.find(id);if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe}}else{temp.style.display="block";if(m){m.showIframe}}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}},fecha:function(event,args){var i,id;i3GEO.util.escondePin();i3GEO.util.escondeBox();if(i3GEO.janela.ANTESFECHA){for(i=0;i<i3GEO.janela.ANTESFECHA.length;i++){eval(i3GEO.janela.ANTESFECHA[i])}}if(i3GEO.janela.id){id=i3GEO.janela.id}else{id=event.id}if(id==undefined){id=args.id}i3GEO.janela.destroi(id)},destroi:function(id){var janela=YAHOO.i3GEO.janela.manager.find(id);i3GEO.util.removeScriptTag(id+"_script");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w+"px";i.style.height=h+"px"}},abreAguarde:function(id,texto){var pos,temp,janela;if(!id||id==undefined){return}janela=YAHOO.i3GEO.janela.managerAguarde.find(id);pos=[0,0];if($i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(i3GEO.janela.AGUARDEMODAL==true){texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>"}if(!janela){janela=new YAHOO.widget.Panel(id,{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:i3GEO.janela.AGUARDEMODAL,monitorresize:false});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){janela.setBody(texto);janela.body.style.padding="5px"}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){janela.setHeader("<span><img id=aguardeGifAberto src='"+i3GEO.configura.locaplic+"/imagens/aguarde.gif' /></span> <span style=font-size:8px >"+YAHOO.i3GEO.janela.managerAguarde.overlays.length+"</span>")}if(i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();try{janela.header.style.height="20px"}catch(e){}temp=$i(id+"_c");if(temp){temp.style.backgroundColor=""}YAHOO.util.Dom.setStyle(temp,"opacity",i3GEO.janela.OPACIDADEAGUARDE/100)},fechaAguarde:function(id){if(id!=undefined){var janela=YAHOO.i3GEO.janela.managerAguarde.find(id);if(janela){YAHOO.i3GEO.janela.managerAguarde.remove(janela);janela.destroy()}}},ativaAlerta:function(){YAHOO.namespace("i3GEO.janela.dialogInfo");YAHOO.i3GEO.janela.dialogInfo=new YAHOO.widget.SimpleDialog("simpledialog1",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:"fecha",handler:function(){this.hide()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.i3GEO.janela.manager.register(YAHOO.i3GEO.janela.dialogInfo);YAHOO.i3GEO.janela.dialogInfo.setHeader("Alerta");YAHOO.i3GEO.janela.dialogInfo.render(document.body);window.alert=function(texto){YAHOO.i3GEO.janela.dialogInfo.cfg.setProperty("text",texto);YAHOO.i3GEO.janela.dialogInfo.show()}},mensagemSimples:function(texto,cabecalho){var janela;if($i("mensagemSimples1")){janela=YAHOO.i3GEO.janela.manager.find("mensagemSimples1")}else{janela=new YAHOO.widget.SimpleDialog("mensagemSimples1",{width:"300px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""});YAHOO.i3GEO.janela.manager.register(janela);janela.setHeader(cabecalho);janela.render(document.body)}janela.setHeader(cabecalho);janela.cfg.setProperty("text",texto);janela.show()},tip:function(cabecalho){var Nid,i,novoel,res;if(arguments.length===0){cabecalho="fixar"}Nid=YAHOO.util.Dom.generateId();i=$i("i3geo_rosa");if(i){i.style.display="none"}if($i(i3GEO.Interface.IDCORPO)){$i("img").title=""}novoel=document.createElement("div");novoel.id=Nid;novoel.style.position="absolute";novoel.style.zIndex=5000;novoel.style.textAlign="left";novoel.style.background="white";if(navm){novoel.style.filter="alpha(opacity=90)"}else{novoel.style.opacity=".9"}document.body.appendChild(novoel);i3GEO.janela.TIPS.push($i(Nid));res="<div id='"+Nid+"cabecatip' style='text-align:left;background-color:rgb(240,240,240)'>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:$i(\""+Nid+"cabecatip\").innerHTML =\"\";' >"+cabecalho+"</span></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9+"px";ist.left=objposicaocursor.telax-5+"px";ist.display="block";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.excluiTips('todos')")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.excluiTips('todos')")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.janela.excluiTips('naofixos')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.janela.excluiTips('naofixos')")}return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,slider="",bg,thumb;janela=i3GEO.janela.cria(230,200,"","","","Opacidade","opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;bg="slider-bg";thumb="slider-thumb";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},comboCabecalhoTemas:function(idDiv,idCombo,ferramenta,tipo){var temp=$i(idDiv);if(temp){temp.innerHTML="";i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var container=$i(idDiv),c;container.innerHTML=retorno.dados;container.style.left="0px";container.styletextAlign="left";c=$i(idCombo);c.style.width="150px";c.style.border="solid #B4B4B4 1px";c.style.top="6px";c.style.left="2px";c.style.position="relative";c.style.fontSize="10px";c.style.color="#686868";if(i3GEO.temaAtivo!==""){c.value=i3GEO.temaAtivo}if(i3GEOF[ferramenta].tema){c.value=i3GEOF[ferramenta].tema}if(c.value===""){i3GEOF[ferramenta].tema="";$i("i3GEOF."+ferramenta+"_corpo").innerHTML=""}c.onchange=function(){var valor=$i(idCombo).value;if(valor!==""){i3GEO.mapa.ativaTema(valor);i3GEOF[ferramenta].tema=valor;$i("i3GEOF."+ferramenta+"_corpo").innerHTML="";eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');")}}},temp.id,"",false,tipo)}temp="i3GEO.janela.comboCabecalhoTemas('"+idDiv+"','"+idCombo+"','"+ferramenta+"','"+tipo+"')";if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(temp)<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push(temp)}}};try{YAHOO.widget.ResizePanel=function(el,userConfig){if(arguments.length>0){YAHOO.widget.ResizePanel.superclass.constructor.call(this,el,userConfig)}};YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE="yui-resizepanel";YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE="resizehandle";YAHOO.extend(YAHOO.widget.ResizePanel,YAHOO.widget.Panel,{init:function(el,userConfig){YAHOO.widget.ResizePanel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.ResizePanel);var Dom=YAHOO.util.Dom,oInnerElement=this.innerElement,oResizeHandle=document.createElement("DIV"),sResizeHandleId=this.id+"_resizehandle";oResizeHandle.id=sResizeHandleId;oResizeHandle.className=YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE;Dom.addClass(oInnerElement,YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE);this.resizeHandle=oResizeHandle;function initResizeFunctionality(){var me=this,oHeader=this.header,oBody=this.body,oFooter=this.footer,nStartWidth,nStartHeight,aStartPos=0,nBodyBorderTopWidth,nBodyBorderBottomWidth,nBodyTopPadding,nBodyBottomPadding,nBodyOffset=0;oInnerElement.appendChild(oResizeHandle);this.ddResize=new YAHOO.util.DragDrop(sResizeHandleId,this.id);this.ddResize.setHandleElId(sResizeHandleId);this.ddResize.onMouseDown=function(e){nStartWidth=oInnerElement.offsetWidth;nStartHeight=oInnerElement.offsetHeight;if(YAHOO.env.ua.ie&&document.compatMode==="BackCompat"){nBodyOffset=0}else{nBodyBorderTopWidth=parseInt(Dom.getStyle(oBody,"borderTopWidth"),10);nBodyBorderBottomWidth=parseInt(Dom.getStyle(oBody,"borderBottomWidth"),10);nBodyTopPadding=parseInt(Dom.getStyle(oBody,"paddingTop"),10);nBodyBottomPadding=parseInt(Dom.getStyle(oBody,"paddingBottom"),10);nBodyOffset=nBodyBorderTopWidth+nBodyBorderBottomWidth+nBodyTopPadding+nBodyBottomPadding}me.cfg.setProperty("width",nStartWidth+"px");aStartPos=[Event.getPageX(e),Event.getPageY(e)]};this.ddResize.onDrag=function(e){var aNewPos=[Event.getPageX(e),Event.getPageY(e)],nOffsetX=aNewPos[0]-aStartPos[0],nOffsetY=aNewPos[1]-aStartPos[1],nNewWidth=Math.max(nStartWidth+nOffsetX,10),nNewHeight=Math.max(nStartHeight+nOffsetY,10),nBodyHeight=(nNewHeight-(oFooter.offsetHeight+oHeader.offsetHeight+nBodyOffset));me.cfg.setProperty("width",nNewWidth+"px");oBody.style.width=nNewWidth-4+"px";if(nBodyHeight<0){nBodyHeight=0}oBody.style.height=nBodyHeight+"px";if($i("wdocai")){$i("wdocai").style.height=nBodyHeight+"px";$i("wdocai").style.width=oBody.style.width+"px"}};this.ddResize.onMouseUp=this.ddResize.onDrag.call()}function onBeforeShow(){initResizeFunctionality.call(this);this.unsubscribe("beforeShow",onBeforeShow)}function onBeforeRender(){if(!this.footer){this.setFooter("")}if(this.cfg.getProperty("visible")){initResizeFunctionality.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}this.unsubscribe("beforeRender",onBeforeRender)}this.subscribe("beforeRender",onBeforeRender);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.initEvent.fire(YAHOO.widget.ResizePanel)},toString:function(){return"ResizePanel "+this.id}})}catch(e){} | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}YAHOO.namespace("i3GEO.janela");YAHOO.i3GEO.janela.manager=new YAHOO.widget.OverlayManager();YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();YAHOO.i3GEO.janela.managerAguarde=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 2px 5px 2px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,OPACIDADEAGUARDE:50,TIPS:[],ULTIMOZINDEX:0,prepara:function(){var iu=i3GEO.util;iu.escondePin();iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza){if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}var i,wlargurA,ins,novoel,wdocaiframe,temp,fix,underlay,ifr,janela;if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(!classe||classe==""){classe="hd"}if(!id||id===""){id="wdoca"}if(!modal||modal===""){modal=false}ifr=false;if(i3GEO.Interface&&i3GEO.Interface.ATUAL==="googleearth"){i3GEO.janela.TRANSICAOSUAVE=false;ifr=true}fix=false;if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}temp=navm?0:2;wlargurA=parseInt(wlargura,10)+temp+"px";ins='<div id="'+id+'_cabecalho" class="'+classe+'" style="background-color:white;">';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' style='z-index:2;position:absolute;left:3px;top:2px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"}ins+="<span style='font-size:10px;'>"+texto+"</span>";if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12+"px";temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)+"px"}$i(id+'_corpo').style.width=parseInt(wlargura,10)+"px"}if(waltura==="auto"){janela=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:"none",fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{janela=new YAHOO.widget.ResizePanel(id,{hideMode:'offsets',iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}if(nx!==""&&nx!=="center"){janela.moveTo(nx,ny+50)}YAHOO.i3GEO.janela.manager.register(janela);if(this.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.cfg.setProperty("zIndex",[10000]);janela.render();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}if(ifr===true){janela.iframe.style.zIndex=0}temp=$i(id+"_corpo");if(temp){if(navm){temp.style.paddingRight="0px"}temp.style.width=parseInt(temp.style.width,10)-2+"px"}if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(janela.close,"click",i3GEO.janela.fecha,janela,{id:id},true);return([janela,$i(id+"_cabecalho"),$i(id+"_corpo")])},minimiza:function(id){var temp=$i(id+"_corpo"),n,i,m=YAHOO.i3GEO.janela.manager.find(id);if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe}}else{temp.style.display="block";if(m){m.showIframe}}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}},fecha:function(event,args){var i,id;i3GEO.util.escondePin();i3GEO.util.escondeBox();if(i3GEO.janela.ANTESFECHA){for(i=0;i<i3GEO.janela.ANTESFECHA.length;i++){eval(i3GEO.janela.ANTESFECHA[i])}}if(i3GEO.janela.id){id=i3GEO.janela.id}else{id=event.id}if(id==undefined){id=args.id}i3GEO.janela.destroi(id)},destroi:function(id){var janela=YAHOO.i3GEO.janela.manager.find(id);i3GEO.util.removeScriptTag(id+"_script");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w+"px";i.style.height=h+"px"}},abreAguarde:function(id,texto){var pos,temp,janela;if(!id||id==undefined){return}janela=YAHOO.i3GEO.janela.managerAguarde.find(id);pos=[0,0];if($i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(i3GEO.janela.AGUARDEMODAL==true){texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>"}if(!janela){janela=new YAHOO.widget.Panel(id,{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:i3GEO.janela.AGUARDEMODAL,monitorresize:false});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){janela.setBody(texto);janela.body.style.padding="5px"}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){janela.setHeader("<span><img id=aguardeGifAberto src='"+i3GEO.configura.locaplic+"/imagens/aguarde.gif' /></span> <span style=font-size:8px >"+YAHOO.i3GEO.janela.managerAguarde.overlays.length+"</span>")}if(i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();try{janela.header.style.height="20px"}catch(e){}temp=$i(id+"_c");if(temp){temp.style.backgroundColor=""}YAHOO.util.Dom.setStyle(temp,"opacity",i3GEO.janela.OPACIDADEAGUARDE/100)},fechaAguarde:function(id){if(id!=undefined){var janela=YAHOO.i3GEO.janela.managerAguarde.find(id);if(janela){YAHOO.i3GEO.janela.managerAguarde.remove(janela);janela.destroy()}}},ativaAlerta:function(){YAHOO.namespace("i3GEO.janela.dialogInfo");YAHOO.i3GEO.janela.dialogInfo=new YAHOO.widget.SimpleDialog("simpledialog1",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:"fecha",handler:function(){this.hide()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.i3GEO.janela.manager.register(YAHOO.i3GEO.janela.dialogInfo);YAHOO.i3GEO.janela.dialogInfo.setHeader("Alerta");YAHOO.i3GEO.janela.dialogInfo.render(document.body);window.alert=function(texto){YAHOO.i3GEO.janela.dialogInfo.cfg.setProperty("text",texto);YAHOO.i3GEO.janela.dialogInfo.show()}},mensagemSimples:function(texto,cabecalho){var janela;if($i("mensagemSimples1")){janela=YAHOO.i3GEO.janela.manager.find("mensagemSimples1")}else{janela=new YAHOO.widget.SimpleDialog("mensagemSimples1",{width:"300px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""});YAHOO.i3GEO.janela.manager.register(janela);janela.setHeader(cabecalho);janela.render(document.body)}janela.setHeader(cabecalho);janela.cfg.setProperty("text",texto);janela.show()},tip:function(cabecalho){var Nid,i,novoel,res;if(arguments.length===0){cabecalho="fixar"}Nid=YAHOO.util.Dom.generateId();i=$i("i3geo_rosa");if(i){i.style.display="none"}if($i(i3GEO.Interface.IDCORPO)){$i("img").title=""}novoel=document.createElement("div");novoel.id=Nid;novoel.style.position="absolute";novoel.style.zIndex=5000;novoel.style.textAlign="left";novoel.style.background="white";if(navm){novoel.style.filter="alpha(opacity=90)"}else{novoel.style.opacity=".9"}document.body.appendChild(novoel);i3GEO.janela.TIPS.push($i(Nid));res="<div id='"+Nid+"cabecatip' style='text-align:left;background-color:rgb(240,240,240)'>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:$i(\""+Nid+"cabecatip\").innerHTML =\"\";' >"+cabecalho+"</span></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9+"px";ist.left=objposicaocursor.telax-5+"px";ist.display="block";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.excluiTips('todos')")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.excluiTips('todos')")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.janela.excluiTips('naofixos')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.janela.excluiTips('naofixos')")}return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,slider="",bg,thumb;janela=i3GEO.janela.cria(230,200,"","","","Opacidade","opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;bg="slider-bg";thumb="slider-thumb";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},comboCabecalhoTemas:function(idDiv,idCombo,ferramenta,tipo){var temp=$i(idDiv);if(temp){temp.innerHTML="";i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var container=$i(idDiv),c;container.innerHTML=retorno.dados;container.style.left="0px";container.styletextAlign="left";c=$i(idCombo);c.style.width="150px";c.style.border="solid #B4B4B4 1px";c.style.top="6px";c.style.left="2px";c.style.position="relative";c.style.fontSize="10px";c.style.color="#686868";if(i3GEO.temaAtivo!==""){c.value=i3GEO.temaAtivo}if(i3GEOF[ferramenta].tema){c.value=i3GEOF[ferramenta].tema}if(c.value===""){i3GEOF[ferramenta].tema="";$i("i3GEOF."+ferramenta+"_corpo").innerHTML=""}c.onchange=function(){var valor=$i(idCombo).value;if(valor!==""){i3GEO.mapa.ativaTema(valor);i3GEOF[ferramenta].tema=valor;$i("i3GEOF."+ferramenta+"_corpo").innerHTML="";eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');")}}},temp.id,"",false,tipo)}temp="i3GEO.janela.comboCabecalhoTemas('"+idDiv+"','"+idCombo+"','"+ferramenta+"','"+tipo+"')";if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(temp)<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push(temp)}}};try{YAHOO.widget.ResizePanel=function(el,userConfig){if(arguments.length>0){YAHOO.widget.ResizePanel.superclass.constructor.call(this,el,userConfig)}};YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE="yui-resizepanel";YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE="resizehandle";YAHOO.extend(YAHOO.widget.ResizePanel,YAHOO.widget.Panel,{init:function(el,userConfig){YAHOO.widget.ResizePanel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.ResizePanel);var Dom=YAHOO.util.Dom,oInnerElement=this.innerElement,oResizeHandle=document.createElement("DIV"),sResizeHandleId=this.id+"_resizehandle";oResizeHandle.id=sResizeHandleId;oResizeHandle.className=YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE;Dom.addClass(oInnerElement,YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE);this.resizeHandle=oResizeHandle;function initResizeFunctionality(){var me=this,oHeader=this.header,oBody=this.body,oFooter=this.footer,nStartWidth,nStartHeight,aStartPos=0,nBodyBorderTopWidth,nBodyBorderBottomWidth,nBodyTopPadding,nBodyBottomPadding,nBodyOffset=0;oInnerElement.appendChild(oResizeHandle);this.ddResize=new YAHOO.util.DragDrop(sResizeHandleId,this.id);this.ddResize.setHandleElId(sResizeHandleId);this.ddResize.onMouseDown=function(e){nStartWidth=oInnerElement.offsetWidth;nStartHeight=oInnerElement.offsetHeight;if(YAHOO.env.ua.ie&&document.compatMode==="BackCompat"){nBodyOffset=0}else{nBodyBorderTopWidth=parseInt(Dom.getStyle(oBody,"borderTopWidth"),10);nBodyBorderBottomWidth=parseInt(Dom.getStyle(oBody,"borderBottomWidth"),10);nBodyTopPadding=parseInt(Dom.getStyle(oBody,"paddingTop"),10);nBodyBottomPadding=parseInt(Dom.getStyle(oBody,"paddingBottom"),10);nBodyOffset=nBodyBorderTopWidth+nBodyBorderBottomWidth+nBodyTopPadding+nBodyBottomPadding}me.cfg.setProperty("width",nStartWidth+"px");aStartPos=[Event.getPageX(e),Event.getPageY(e)]};this.ddResize.onDrag=function(e){var aNewPos=[Event.getPageX(e),Event.getPageY(e)],nOffsetX=aNewPos[0]-aStartPos[0],nOffsetY=aNewPos[1]-aStartPos[1],nNewWidth=Math.max(nStartWidth+nOffsetX,10),nNewHeight=Math.max(nStartHeight+nOffsetY,10),nBodyHeight=(nNewHeight-(oFooter.offsetHeight+oHeader.offsetHeight+nBodyOffset));me.cfg.setProperty("width",nNewWidth+"px");oBody.style.width=nNewWidth-4+"px";if(nBodyHeight<0){nBodyHeight=0}oBody.style.height=nBodyHeight+"px";if($i("wdocai")){$i("wdocai").style.height=nBodyHeight+"px";$i("wdocai").style.width=oBody.style.width+"px"}};this.ddResize.onMouseUp=this.ddResize.onDrag.call()}function onBeforeShow(){initResizeFunctionality.call(this);this.unsubscribe("beforeShow",onBeforeShow)}function onBeforeRender(){if(!this.footer){this.setFooter("")}if(this.cfg.getProperty("visible")){initResizeFunctionality.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}this.unsubscribe("beforeRender",onBeforeRender)}this.subscribe("beforeRender",onBeforeRender);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.initEvent.fire(YAHOO.widget.ResizePanel)},toString:function(){return"ResizePanel "+this.id}})}catch(e){} | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_login_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}if(typeof(i3GEOF)==='undefined'){i3GEOF=[]}i3GEO.login={divnomelogin:"i3GEONomeLogin",recarrega:true,funcaoLoginOk:null,funcaoLoginErro:null,dialogo:{abreLogin:function(locaplic){var js;if(!locaplic){locaplic=i3GEO.configura.locaplic}if(typeof(i3GEOF.loginusuario)==='undefined'){js=locaplic+"/ferramentas/loginusuario/index.js";i3GEO.util.scriptTag(js,"i3GEOF.loginusuario.criaJanelaFlutuante()","i3GEOF.loginusuario_script")}else{i3GEOF.loginusuario.criaJanelaFlutuante()}},abreLogout:function(){var r=confirm($trad("x26"));if(r==true){i3GEO.login.anulaCookie();i3GEO.janela.destroi("i3GEOF.loginusuario");if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML=""}if(i3GEO.login.recarrega==true){document.location.reload()}}}},anulaCookie:function(){i3GEO.util.insereCookie("i3geocodigologin","",1);i3GEO.util.insereCookie("i3geousuariologin","",1);i3GEO.util.insereCookie("i3geousuarionome","",1);i3GEO.util.insereCookie("i3GeoLogin","",1)},verificaCookieLogin:function(){var a=i3GEO.util.pegaCookie("i3geocodigologin"),b=i3GEO.util.pegaCookie("i3geocodigologin"),c=i3GEO.util.pegaCookie("i3geousuarionome");if(a&&b&&c&&a!=""&&b!=""&&c!=""){return true}else{return false}},verificaOperacao:function(operacao,locaplic,funcaoOk,tipo,funcaoErro){var p="",cp,temp,resultado=true;if(!i3GEO.login.verificaCookieLogin()){if(!funcaoErro){alert("Login!")}else{funcaoErro.call()}return false}if(!locaplic){locaplic=i3GEO.configura.locaplic}temp=function(retorno){if(retorno.data=="sim"){resultado=true}else{resultado=false}if(resultado===true){if(funcaoOk&&funcaoOk!=""){funcaoOk.call()}}else{if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML=""}if(funcaoErro&&funcaoErro!=""&&resultado===false){funcaoErro.call()}}return resultado};if(tipo==="sessao"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaosessao"}if(tipo==="banco"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaobanco"}cp=new cpaint();cp.set_response_type("JSON");cp.set_transfer_mode("POST");cp.call(p,"login",temp,"&operacao="+operacao)}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.login={divnomelogin:"i3GEONomeLogin",recarrega:false,funcaoLoginOk:null,funcaoLoginErro:null,dialogo:{abreLogin:function(locaplic){var js;if(!locaplic){locaplic=i3GEO.configura.locaplic}if(typeof(i3GEOF.loginusuario)==='undefined'){js=locaplic+"/ferramentas/loginusuario/index.js";i3GEO.util.scriptTag(js,"i3GEOF.loginusuario.criaJanelaFlutuante()","i3GEOF.loginusuario_script")}else{i3GEOF.loginusuario.criaJanelaFlutuante()}},abreLogout:function(){var r=confirm($trad("x26"));if(r==true){i3GEO.login.anulaCookie();i3GEO.janela.destroi("i3GEOF.loginusuario");if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML=""}if(i3GEO.login.recarrega==true){document.location.reload()}}}},anulaCookie:function(){i3GEO.util.insereCookie("i3geocodigologin","",1);i3GEO.util.insereCookie("i3geousuariologin","",1);i3GEO.util.insereCookie("i3geousuarionome","",1);i3GEO.util.insereCookie("i3GeoLogin","",1)},verificaCookieLogin:function(){var a=i3GEO.util.pegaCookie("i3geocodigologin"),b=i3GEO.util.pegaCookie("i3geocodigologin"),c=i3GEO.util.pegaCookie("i3geousuarionome");if(a&&b&&c&&a!=""&&b!=""&&c!=""){return true}else{return false}},verificaOperacao:function(operacao,locaplic,funcaoOk,tipo,funcaoErro){var p="",cp,temp,resultado=true;if(!i3GEO.login.verificaCookieLogin()){if(!funcaoErro){alert("Login!")}else{funcaoErro.call()}return false}if(!locaplic){locaplic=i3GEO.configura.locaplic}temp=function(retorno){if(retorno.data=="sim"){resultado=true}else{resultado=false}if(resultado===true){if(funcaoOk&&funcaoOk!=""){funcaoOk.call()}}else{if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML=""}if(funcaoErro&&funcaoErro!=""&&resultado===false){funcaoErro.call()}}return resultado};if(tipo==="sessao"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaosessao"}if(tipo==="banco"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaobanco"}cp=new cpaint();cp.set_response_type("JSON");cp.set_transfer_mode("POST");cp.call(p,"login",temp,"&operacao="+operacao)}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_mapa_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={AUTORESIZE:false,GEOXML:[],insereDobraPagina:function(tipo,imagem){var novoel=$i("i3GEOdobraPagina");if(!novoel){novoel=document.createElement("img")}novoel.src=imagem;novoel.id="i3GEOdobraPagina";if(tipo==="googlemaps"){novoel.onclick=function(){i3GEO.Interface.atual2gm.inicia()}}if(tipo==="openlayers"){novoel.onclick=function(){i3GEO.Interface.atual2ol.inicia()}}novoel.style.cursor="pointer";novoel.style.position="absolute";novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.zIndex="50000";novoel.style.left=i3GEO.parametros.w-35+"px";YAHOO.util.Event.addListener(novoel,"click",YAHOO.util.Event.stopPropagation);$i(i3GEO.Interface.IDMAPA).appendChild(novoel)},reposicionaDobraPagina:function(){var novoel=$i("i3GEOdobraPagina");if(!novoel){return}novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.left=i3GEO.parametros.w-35+"px"},ativaAutoResize:function(){window.onresize=function(){var Dw,Dh,r=false;Dw=YAHOO.util.Dom.getViewportWidth();Dh=YAHOO.util.Dom.getViewportHeight();if(Math.abs(Dw-i3GEO.tamanhodoc[0])>50){r=true}if(Math.abs(Dh-i3GEO.tamanhodoc[1])>50){r=true}if(r===false){return}i3GEO.tamanhodoc=[Dw,Dh];setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.reposiciona()}else{i3GEO.guias.ajustaAltura()}i3GEO.mapa.reposicionaDobraPagina()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(codigo){if(codigo===""){return}if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")}},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert($trad("x21"));return}i3GEO.php.ativalogo(i3GEO.atualiza);var cr=$i("i3GEOcopyright");if(cr){if(cr.style.display==="block"){cr.style.display="none"}else{cr.style.display="block"}}},verifica:function(retorno){try{if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:true,ID:"",cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg,temp=function(retorno){var ins,elementos,i,temp,re;re=new RegExp("<img src='' />","g");if(i3GEO.mapa.legendaHTML.ID!==""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!=="erro")&&(retorno.data!==undefined)){ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -45px; top: -22px;">Mostra a legenda em uma janela</p></div>'}temp=retorno.data.legenda;temp=temp.replace(re,"");ins+="<div id='corpoLegi' >"+temp+"</div>";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;i<elementos.length;i+=1){elementos[i].style.display="none"}}};if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}idleg=$i("wlegenda");if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},libera:function(){var temp=function(retorno){var novoel,temp,n,i,janela;if(!$i("moveLegi")){novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";temp='<div class="hd" >Legenda</div>';temp+='<div id="wlegenda" style="display:block;padding:5px 2px 5px 0px;text-align:left;background-color:white;height:300px;width:300px;overflow:auto" ></div>';novoel.innerHTML=temp;document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("moveLegi",{width:"302px",fixedcenter:true,constraintoviewport:false,underlay:"shadow",close:true,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();novoel.onmouseover=function(){if($i("moveLegi").style.display==="block"){YAHOO.util.Dom.setStyle("moveLegi","opacity",1)}};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle("moveLegi","opacity",0.20)}}else{janela=YAHOO.i3GEO.janela.manager.find("moveLegi")}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i<n;i+=1){temp[i].style.display="none"}janela.show()};i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{animacao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.animacao()","animacao","animacao")},opacidade:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()","opacidademapa","opacidademapa")},telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' > </a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var pos,temp,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span style='text-decoration:underline;text-align:left;font-size:9pt'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "&&ds[0]&&ds[0]!=" "){try{nds=ds.length;for(s=0;s<nds;s+=1){for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}ins+="<nl>";mostra=true}else{ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+valor+"</span><br>";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.mapa={AUTORESIZE:false,GEOXML:[],insereDobraPagina:function(tipo,imagem){var novoel=$i("i3GEOdobraPagina");if(!novoel){novoel=document.createElement("img")}novoel.src=imagem;novoel.id="i3GEOdobraPagina";if(tipo==="googlemaps"){novoel.onclick=function(){i3GEO.Interface.atual2gm.inicia()}}if(tipo==="openlayers"){novoel.onclick=function(){i3GEO.Interface.atual2ol.inicia()}}novoel.style.cursor="pointer";novoel.style.position="absolute";novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.zIndex="50000";novoel.style.left=i3GEO.parametros.w-35+"px";YAHOO.util.Event.addListener(novoel,"click",YAHOO.util.Event.stopPropagation);$i(i3GEO.Interface.IDMAPA).appendChild(novoel)},reposicionaDobraPagina:function(){var novoel=$i("i3GEOdobraPagina");if(!novoel){return}novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.left=i3GEO.parametros.w-35+"px"},ativaAutoResize:function(){window.onresize=function(){var Dw,Dh,r=false;Dw=YAHOO.util.Dom.getViewportWidth();Dh=YAHOO.util.Dom.getViewportHeight();if(Math.abs(Dw-i3GEO.tamanhodoc[0])>50){r=true}if(Math.abs(Dh-i3GEO.tamanhodoc[1])>50){r=true}if(r===false){return}i3GEO.tamanhodoc=[Dw,Dh];setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.reposiciona()}else{i3GEO.guias.ajustaAltura()}i3GEO.mapa.reposicionaDobraPagina()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(codigo){if(codigo===""){return}if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")}},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert($trad("x21"));return}i3GEO.php.ativalogo(i3GEO.atualiza);var cr=$i("i3GEOcopyright");if(cr){if(cr.style.display==="block"){cr.style.display="none"}else{cr.style.display="block"}}},verifica:function(retorno){try{if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:true,ID:"",cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg,temp=function(retorno){var ins,elementos,i,temp,re;re=new RegExp("<img src='' />","g");if(i3GEO.mapa.legendaHTML.ID!==""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!=="erro")&&(retorno.data!==undefined)){ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -45px; top: -22px;">Mostra a legenda em uma janela</p></div>'}temp=retorno.data.legenda;temp=temp.replace(re,"");ins+="<div id='corpoLegi' >"+temp+"</div>";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;i<elementos.length;i+=1){elementos[i].style.display="none"}}};if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}idleg=$i("wlegenda");if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},libera:function(){var temp=function(retorno){var novoel,temp,n,i,janela;if(!$i("moveLegi")){novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";temp='<div class="hd" >Legenda</div>';temp+='<div id="wlegenda" style="display:block;padding:5px 2px 5px 0px;text-align:left;background-color:white;height:300px;width:300px;overflow:auto" ></div>';novoel.innerHTML=temp;document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("moveLegi",{width:"302px",fixedcenter:true,constraintoviewport:false,underlay:"shadow",close:true,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();novoel.onmouseover=function(){if($i("moveLegi").style.display==="block"){YAHOO.util.Dom.setStyle("moveLegi","opacity",1)}};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle("moveLegi","opacity",0.20)}}else{janela=YAHOO.i3GEO.janela.manager.find("moveLegi")}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i<n;i+=1){temp[i].style.display="none"}janela.show()};i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{animacao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.animacao()","animacao","animacao")},opacidade:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()","opacidademapa","opacidademapa")},telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' > </a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var pos,temp,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span style='text-decoration:underline;text-align:left;font-size:9pt'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "&&ds[0]&&ds[0]!=" "){try{nds=ds.length;for(s=0;s<nds;s+=1){for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}ins+="<nl>";mostra=true}else{ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+valor+"</span><br>";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_maparef_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.maparef={fatorZoomDinamico:-3,SELETORTIPO:true,PERMITEFECHAR:true,PERMITEDESLOCAR:true,TRANSICAOSUAVE:false,OPACIDADE:65,TOP:4,RIGHT:20,inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef,janela;if($i("i3geo_winRef")){janela=YAHOO.i3GEO.janela.manager.find("i3geo_winRef");janela.show();janela.bringToTop();return}if(navm){i3GEO.maparef.TRANSICAOSUAVE=false}if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='<div class="hd" style="text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">';ins+='<span id=maparefmaismenosZoom style=display:none > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> ";if(this.SELETORTIPO){ins+="<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>";ins+="<option value='fixo' select >fixo</option>";ins+="<option value='mapa' >mapa</option>";ins+="<option value='dinamico' >dinâmico</option>";ins+="</select>"}ins+="</div>"}ins+='<div class="bd" style="border:1px solid black;text-align:left;padding:3px;height: 150px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;display:none" onload="javascript:this.style.display = \'block\'" id="imagemReferencia" src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;if(i3GEO.maparef.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100);novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100)}}document.body.appendChild(novoel)}if($i("i3geo_winRef").style.display!=="block"){$i("i3geo_winRef").style.display="block";this.PERMITEDESLOCAR?temp="shadow":temp="none";janela=new YAHOO.widget.Panel("i3geo_winRef",{height:"177px",width:"156px",fixedcenter:false,constraintoviewport:true,underlay:temp,close:i3GEO.maparef.PERMITEFECHAR,visible:true,draggable:i3GEO.maparef.PERMITEDESLOCAR,modal:false,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);if(i3GEO.maparef.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.render();janela.show();try{janela.header.style.height="20px"}catch(e){};r=$i("i3geo_winRef_c");if(r){r.style.clip="rect(0px, 160px, 185px, 0px)";r.style.position="absolute"}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));$i("mapaReferencia").style.height="150px";$i("i3geo_winRef").style.border="1px solid gray";moveX=pos[0]+i3GEO.parametros.w+153-i3GEO.maparef.RIGHT-300;moveY=pos[1]+i3GEO.maparef.TOP;if(i3GEO.Interface.ATUAL==="googlemaps"){moveY+=30}janela.moveTo(moveX,moveY);escondeRef=function(){YAHOO.util.Event.removeListener(janela.close,"click");$i("imagemReferencia").src="";janela.destroy();i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none")};YAHOO.util.Event.addListener(janela.close,"click",escondeRef);i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block");if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",temp)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width="156px"}},atualiza:function(forca){if(arguments.length===0){forca=false}var tiporef,temp,re;temp=$i("refDinamico")?tiporef=$i("refDinamico").value:tiporef="fixo";if($i("mapaReferencia")){temp=$i("maparefmaismenosZoom");if(tiporef==="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}if(tiporef==="fixo"){if(i3GEO.parametros.utilizacgi.toLowerCase()!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference')}}if(tiporef==="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}}else{i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.maparef.atualiza()")}},processaImagem:function(retorno){var m,box,temp,tiporef="fixo";if((retorno.data!=="erro")&&(retorno.data!==undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;temp=$i("imagemReferencia");if(temp){m=new Image();m.src=refimagem;temp.src=m.src}temp=$i("refDinamico");if(temp){tiporef=temp.value}if(tiporef!=="fixo"){box=$i("boxref");if(box){box.style.display="none"}return}i3GEO.maparef.atualizaBox()}},atualizaBox:function(){var box=i3GEO.maparef.criaBox(),w;i3GEO.calculo.ext2rect("boxref",i3GEO.parametros.extentref,i3GEO.parametros.mapexten,i3GEO.parametros.celularef,$i("mapaReferencia"));w=parseInt(box.style.width,10);if(w>120){box.style.display="none";return}box.style.display="block";box.style.top=parseInt(box.style.top,10)+4+"px";box.style.left=parseInt(box.style.left,10)+4+"px";if(w<3){box.style.width="3px";box.style.height="3px"}},criaBox:function(){var box=$i("boxref");if(!box){novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.cursor="move";novoel.style.backgroundColor="RGB(120,220,220)";novoel.style.borderWidth="3px";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=0.4}$i("mapaReferencia").appendChild(novoel);boxrefdd=new YAHOO.util.DD("boxref");novoel.onmouseup=function(){var rect,telaminx,telamaxx,telaminy,m,x,ext;rect=$i("boxref");telaminx=parseInt(rect.style.left,10);telamaxy=parseInt(rect.style.top,10);telamaxx=telaminx+parseInt(rect.style.width,10);telaminy=telamaxy+parseInt(rect.style.height,10);m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)};return novoel}else{return box}},click:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(objposicaocursor.ddx,objposicaocursor.ddy);return}try{i3GEO.php.pan(i3GEO.atualiza,i3GEO.parametros.mapscale,"ref",objposicaocursor.refx,objposicaocursor.refy)}catch(e){i3GEO.janela.fechaAguarde("i3GEO.atualiza")}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.maparef={fatorZoomDinamico:-3,SELETORTIPO:true,PERMITEFECHAR:true,PERMITEDESLOCAR:true,TRANSICAOSUAVE:false,OPACIDADE:65,TOP:4,RIGHT:20,inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef,janela;if($i("i3geo_winRef")){janela=YAHOO.i3GEO.janela.manager.find("i3geo_winRef");janela.show();janela.bringToTop();return}if(navm){i3GEO.maparef.TRANSICAOSUAVE=false}if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='<div class="hd" style="text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">';ins+='<span id=maparefmaismenosZoom style=display:none > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> ";if(this.SELETORTIPO){ins+="<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>";ins+="<option value='fixo' select >fixo</option>";ins+="<option value='mapa' >mapa</option>";ins+="<option value='dinamico' >dinâmico</option>";ins+="</select>"}ins+="</div>"}ins+='<div class="bd" style="border:1px solid black;text-align:left;padding:3px;height: 150px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;display:none" onload="javascript:this.style.display = \'block\'" id="imagemReferencia" src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;if(i3GEO.maparef.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100);novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100)}}document.body.appendChild(novoel)}if($i("i3geo_winRef").style.display!=="block"){$i("i3geo_winRef").style.display="block";this.PERMITEDESLOCAR?temp="shadow":temp="none";janela=new YAHOO.widget.Panel("i3geo_winRef",{height:"177px",width:"156px",fixedcenter:false,constraintoviewport:true,underlay:temp,close:i3GEO.maparef.PERMITEFECHAR,visible:true,draggable:i3GEO.maparef.PERMITEDESLOCAR,modal:false,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);if(i3GEO.maparef.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.render();janela.show();try{janela.header.style.height="20px"}catch(e){};r=$i("i3geo_winRef_c");if(r){r.style.clip="rect(0px, 160px, 185px, 0px)";r.style.position="absolute"}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));$i("mapaReferencia").style.height="150px";$i("i3geo_winRef").style.border="1px solid gray";moveX=pos[0]+i3GEO.parametros.w+153-i3GEO.maparef.RIGHT-300;moveY=pos[1]+i3GEO.maparef.TOP;if(i3GEO.Interface.ATUAL==="googlemaps"){moveY+=30}janela.moveTo(moveX,moveY);escondeRef=function(){YAHOO.util.Event.removeListener(janela.close,"click");$i("imagemReferencia").src="";janela.destroy();i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none")};YAHOO.util.Event.addListener(janela.close,"click",escondeRef);i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block");if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",temp)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width="156px"}},atualiza:function(forca){if(arguments.length===0){forca=false}var tiporef,temp,re;temp=$i("refDinamico")?tiporef=$i("refDinamico").value:tiporef="fixo";if($i("mapaReferencia")){temp=$i("maparefmaismenosZoom");if(tiporef==="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}if(tiporef==="fixo"){if(i3GEO.parametros.utilizacgi.toLowerCase()!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference')}}if(tiporef==="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}}else{i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.maparef.atualiza()")}},processaImagem:function(retorno){var m,box,temp,tiporef="fixo";if((retorno.data!=="erro")&&(retorno.data!==undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;temp=$i("imagemReferencia");if(temp){m=new Image();m.src=refimagem;temp.src=m.src}temp=$i("refDinamico");if(temp){tiporef=temp.value}if(tiporef!=="fixo"){box=$i("boxref");if(box){box.style.display="none"}return}i3GEO.maparef.atualizaBox()}},atualizaBox:function(){var box=i3GEO.maparef.criaBox(),w;i3GEO.calculo.ext2rect("boxref",i3GEO.parametros.extentref,i3GEO.parametros.mapexten,i3GEO.parametros.celularef,$i("mapaReferencia"));w=parseInt(box.style.width,10);if(w>120){box.style.display="none";return}box.style.display="block";box.style.top=parseInt(box.style.top,10)+4+"px";box.style.left=parseInt(box.style.left,10)+4+"px";if(w<3){box.style.width="3px";box.style.height="3px"}},criaBox:function(){var box=$i("boxref");if(!box){novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.cursor="move";novoel.style.backgroundColor="RGB(120,220,220)";novoel.style.borderWidth="3px";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=0.4}$i("mapaReferencia").appendChild(novoel);boxrefdd=new YAHOO.util.DD("boxref");novoel.onmouseup=function(){var rect,telaminx,telamaxx,telaminy,m,x,ext;rect=$i("boxref");telaminx=parseInt(rect.style.left,10);telamaxy=parseInt(rect.style.top,10);telamaxx=telaminx+parseInt(rect.style.width,10);telaminy=telamaxy+parseInt(rect.style.height,10);m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)};return novoel}else{return box}},click:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(objposicaocursor.ddx,objposicaocursor.ddy);return}try{i3GEO.php.pan(i3GEO.atualiza,i3GEO.parametros.mapscale,"ref",objposicaocursor.refx,objposicaocursor.refy)}catch(e){i3GEO.janela.fechaAguarde("i3GEO.atualiza")}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_navega_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.navega={TEMPONAVEGAR:600,FATORZOOM:2,timerNavega:null,centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.aproxima(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.afasta(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.zoomponto(i3GEO.atualiza,"+x+","+y+","+tamanho+",'"+simbolo+"','"+cor+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{alert("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.mudaext(i3GEO.atualiza,'"+tipoimagem+"','"+ext+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},aplicaEscala:function(locaplic,sid,escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true)}},panFixo:function(locaplic,sid,direcao,w,h,escala){var x=0,y=0,f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(w===""){w=i3GEO.parametros.w}if(h===""){h=i3GEO.parametros.h}if(escala===""){escala=i3GEO.parametros.mapscale}switch(direcao){case"norte":y=h/6;x=w/2;break;case"sul":y=h-(h/6);x=w/2;break;case"leste":x=w-(w/6);y=h/2;break;case"oeste":x=w/6;y=h/2;break;case"nordeste":y=h/6;x=w-(w/6);break;case"sudeste":y=h-(h/6);x=w-(w/6);break;case"noroeste":y=h/6;x=w/6;break;case"sudoeste":y=h-(h/6);x=w/6;break}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.pan(x,y);return}f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.pan(i3GEO.atualiza,"+escala+",'',"+x+","+y+");";try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},panFixoNorte:function(){i3GEO.navega.panFixo('','','norte','','','')},panFixoSul:function(){i3GEO.navega.panFixo('','','sul','','','')},panFixoOeste:function(){i3GEO.navega.panFixo('','','oeste','','','')},panFixoLeste:function(){i3GEO.navega.panFixo('','','leste','','','')},mostraRosaDosVentos:function(){var novoel,setas,i;try{if(i3GEO.configura.mostraRosaDosVentos==="nao"){return}if(g_tipoacao==="area"){return}}catch(e){}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10||objposicaocursor.imgy>(i3GEO.parametros.h-10)){return}if(!$i("i3geo_rosa")){novoel=document.createElement("div");novoel.id="i3geo_rosa";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navn){novoel.style.opacity=".7"}else{novoel.style.filter="alpha(opacity=70)"}document.body.appendChild(novoel)}setas="<table id='rosaV' >";setas+="<tr onclick=\"javascript:i3GEO.configura.mostraRosaDosVentos='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>";setas+="<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','noroeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','norte','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','nordeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','oeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><table><tr>";setas+="<td><img class='rosamais' title='aproxima' onclick=\"i3GEO.navega.zoomin('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="<td><img class='rosamenos' title='afasta' onclick=\"i3GEO.navega.zoomout('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="</tr></table></td>";setas+="<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','leste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudoeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27+"px";i.style.left=objposicaocursor.telax-27+"px";i.style.display="block";if($i("img")){YAHOO.util.Event.addListener($i("img"),"mousemove",function(){var i=$i("i3geo_rosa");i.style.display="none";YAHOO.util.Event.removeListener(escondeRosa)})}i3GEO.ajuda.mostraJanela('Clique nas pontas da rosa para navegar no mapa. Clique em x para parar de mostrar essa opção.')},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}var i=$i("i3geoboxZoom").style;i.width=0+"px";i.height=0+"px";i.visibility="visible";i.display="block";i.left=objposicaocursor.telax+"px";i.top=objposicaocursor.telay+"px";boxxini=objposicaocursor.telax;boxyini=objposicaocursor.telay;tamanhox=0;tamanhoy=0;if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.zoomBox.desloca()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.zoomBox.desloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}},criaBox:function(){if(i3GEO.navega.timerNavega!==null){return}if(!$i("i3geoboxZoom")){var novoel;novoel=document.createElement("div");novoel.style.width="0px";novoel.style.height="0px";novoel.id="i3geoboxZoom";novoel.style.display="none";novoel.style.fontSize="0px";if(navn){novoel.style.opacity=0.25}novoel.style.backgroundColor="gray";novoel.style.position="absolute";novoel.style.border="2px solid #ff0000";if(navm){novoel.style.filter="alpha(opacity=25)"}novoel.onmousemove=function(){var b,wb,hb;b=$i("i3geoboxZoom").style;wb=parseInt(b.width,10);hb=parseInt(b.height,10);if(navm){if(wb>2){b.width=wb-2+"px"}if(hb>2){b.height=hb-2+"px"}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.navega.zoomBox.termina()};document.body.appendChild(novoel)}},desloca:function(){var bxs,ppx,py;if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}bxs=$i("i3geoboxZoom").style;if(bxs.display!=="block"){return}ppx=objposicaocursor.telax;py=objposicaocursor.telay;if(navm){if((ppx>boxxini)&&((ppx-boxxini-2)>0)){bxs.width=ppx-boxxini-2+"px"}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2+"px"}if(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2+"px"}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2+"px"}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){var valor,v,x1,y1,x2,y2,f,limpa=function(){};if(g_tipoacao!=='zoomli'){i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");return}try{if(i3GEO.navega.timerNavega!==null){return}valor=i3GEO.calculo.rect2ext("i3geoboxZoom",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxZoom");if(bxs){bxs.style.display="none";bxs.style.visibility="hidden";bxs.style.width=0+"px";bxs.style.height=0+"px"}};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.zoomBox.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(v);return}f="i3GEO.navega.timerNavega = null;i3GEO.navega.zoomExt('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','"+i3GEO.configura.tipoimagem+"','"+v+"')";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){limpa.call();return}}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.lente.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.lente.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.lente.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.lente.movimenta()")}},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){alert("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.lente.movimenta()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.lente.atualiza()")},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0 75 75 0)';novoeli=document.createElement("div");novoeli.id="div_di";novoel.appendChild(novoeli);$i("div_di").innerHTML="<p style='position:absolute;top:0px;left:0px'>+-</p>"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(160,0,"","center","center","Feche para parar destaque ","ativadesativaDestaque");YAHOO.util.Event.addListener(janela[0].close,"click",i3GEO.navega.destacaTema.desativa);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.destacaTema.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.destacaTema.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.destacaTema.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()")}},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.destacaTema.atualiza()");i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()");i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+" "+(objposicaocursor.imgx-10)+" "+(objposicaocursor.imgy-10)+" "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+')'}}},barraDeZoom:{cria:function(){var temp="",estilo;if(navn){temp+='<div style="text-align:center;position:relative;left:9px" >'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='<div id="vertMaisZoom" style="'+estilo+'"></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';if(navm){temp+='<div id=vertMenosZoom style="left:-1px;" ></div>'}else{temp+='<div id=vertMenosZoom ></div>'}if(navn){temp+='</div>'}return temp},ativa:function(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w+"px";iclone.style.height=i3GEO.parametros.h+"px";iclone.style.top=corpo.style.top+"px";iclone.style.left=corpo.style.left+"px";$i("img").style.display="none";iclone.style.display="block"}}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousemove=function(){try{var iclone,corpo,nt,nl,velhoh,velhow,nh=0,nw=0,t,l,fatorEscala;iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}nt=0;nl=0;i3geo_ns=parseInt(i3GEO.parametros.mapscale,10);if((g_fatordezoom>0)&&(g_fatordezoom<7)){g_fatordezoom=g_fatordezoom+1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh/g_fatordezoom;nw=velhow/g_fatordezoom;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t+((velhoh-nh)*0.5);nl=l+((velhow-nw)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if((g_fatordezoom<0)&&(g_fatordezoom>-7)){g_fatordezoom=g_fatordezoom-1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh*g_fatordezoom*-1;nw=velhow*g_fatordezoom*-1;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t-((nh-velhoh)*0.5);nl=l-((nw-velhow)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if(iclone){iclone.style.width=nw+"px";iclone.style.height=nh+"px";if(iclone.style.pixelTop){iclone.style.pixelTop=nt}else{iclone.style.top=nt+"px"}if(iclone.style.pixelLeft){iclone.style.pixelLeft=nl}else{iclone.style.left=nl+"px"}}if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3geo_ns}}catch(e){}}}}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}i3GEO.util.criaBox();g_operacao="navega";var idgoogle="googlemaps"+Math.random();i3GEO.janela.cria((i3GEO.parametros.w/2)+25+"px",(i3GEO.parametros.h/2)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>",idgoogle);atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.navega={TEMPONAVEGAR:600,FATORZOOM:2,timerNavega:null,centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.aproxima(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.afasta(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.zoomponto(i3GEO.atualiza,"+x+","+y+","+tamanho+",'"+simbolo+"','"+cor+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{alert("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.mudaext(i3GEO.atualiza,'"+tipoimagem+"','"+ext+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},aplicaEscala:function(locaplic,sid,escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true)}},panFixo:function(locaplic,sid,direcao,w,h,escala){var x=0,y=0,f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(w===""){w=i3GEO.parametros.w}if(h===""){h=i3GEO.parametros.h}if(escala===""){escala=i3GEO.parametros.mapscale}switch(direcao){case"norte":y=h/6;x=w/2;break;case"sul":y=h-(h/6);x=w/2;break;case"leste":x=w-(w/6);y=h/2;break;case"oeste":x=w/6;y=h/2;break;case"nordeste":y=h/6;x=w-(w/6);break;case"sudeste":y=h-(h/6);x=w-(w/6);break;case"noroeste":y=h/6;x=w/6;break;case"sudoeste":y=h-(h/6);x=w/6;break}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.pan(x,y);return}f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.pan(i3GEO.atualiza,"+escala+",'',"+x+","+y+");";try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},panFixoNorte:function(){i3GEO.navega.panFixo('','','norte','','','')},panFixoSul:function(){i3GEO.navega.panFixo('','','sul','','','')},panFixoOeste:function(){i3GEO.navega.panFixo('','','oeste','','','')},panFixoLeste:function(){i3GEO.navega.panFixo('','','leste','','','')},mostraRosaDosVentos:function(){var novoel,setas,i;try{if(i3GEO.configura.mostraRosaDosVentos==="nao"){return}if(g_tipoacao==="area"){return}}catch(e){}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10||objposicaocursor.imgy>(i3GEO.parametros.h-10)){return}if(!$i("i3geo_rosa")){novoel=document.createElement("div");novoel.id="i3geo_rosa";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navn){novoel.style.opacity=".7"}else{novoel.style.filter="alpha(opacity=70)"}document.body.appendChild(novoel)}setas="<table id='rosaV' >";setas+="<tr onclick=\"javascript:i3GEO.configura.mostraRosaDosVentos='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>";setas+="<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','noroeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','norte','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','nordeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','oeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><table><tr>";setas+="<td><img class='rosamais' title='aproxima' onclick=\"i3GEO.navega.zoomin('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="<td><img class='rosamenos' title='afasta' onclick=\"i3GEO.navega.zoomout('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="</tr></table></td>";setas+="<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','leste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudoeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27+"px";i.style.left=objposicaocursor.telax-27+"px";i.style.display="block";if($i("img")){YAHOO.util.Event.addListener($i("img"),"mousemove",function(){var i=$i("i3geo_rosa");i.style.display="none";YAHOO.util.Event.removeListener(escondeRosa)})}i3GEO.ajuda.mostraJanela('Clique nas pontas da rosa para navegar no mapa. Clique em x para parar de mostrar essa opção.')},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}var i=$i("i3geoboxZoom").style;i.width=0+"px";i.height=0+"px";i.visibility="visible";i.display="block";i.left=objposicaocursor.telax+"px";i.top=objposicaocursor.telay+"px";boxxini=objposicaocursor.telax;boxyini=objposicaocursor.telay;tamanhox=0;tamanhoy=0;if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.zoomBox.desloca()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.zoomBox.desloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}},criaBox:function(){if(i3GEO.navega.timerNavega!==null){return}if(!$i("i3geoboxZoom")){var novoel;novoel=document.createElement("div");novoel.style.width="0px";novoel.style.height="0px";novoel.id="i3geoboxZoom";novoel.style.display="none";novoel.style.fontSize="0px";if(navn){novoel.style.opacity=0.25}novoel.style.backgroundColor="gray";novoel.style.position="absolute";novoel.style.border="2px solid #ff0000";if(navm){novoel.style.filter="alpha(opacity=25)"}novoel.onmousemove=function(){var b,wb,hb;b=$i("i3geoboxZoom").style;wb=parseInt(b.width,10);hb=parseInt(b.height,10);if(navm){if(wb>2){b.width=wb-2+"px"}if(hb>2){b.height=hb-2+"px"}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.navega.zoomBox.termina()};document.body.appendChild(novoel)}},desloca:function(){var bxs,ppx,py;if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}bxs=$i("i3geoboxZoom").style;if(bxs.display!=="block"){return}ppx=objposicaocursor.telax;py=objposicaocursor.telay;if(navm){if((ppx>boxxini)&&((ppx-boxxini-2)>0)){bxs.width=ppx-boxxini-2+"px"}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2+"px"}if(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2+"px"}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2+"px"}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){var valor,v,x1,y1,x2,y2,f,limpa=function(){};if(g_tipoacao!=='zoomli'){i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");return}try{if(i3GEO.navega.timerNavega!==null){return}valor=i3GEO.calculo.rect2ext("i3geoboxZoom",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxZoom");if(bxs){bxs.style.display="none";bxs.style.visibility="hidden";bxs.style.width=0+"px";bxs.style.height=0+"px"}};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.zoomBox.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(v);return}f="i3GEO.navega.timerNavega = null;i3GEO.navega.zoomExt('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','"+i3GEO.configura.tipoimagem+"','"+v+"')";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){limpa.call();return}}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.lente.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.lente.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.lente.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.lente.movimenta()")}},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){alert("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.lente.movimenta()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.lente.atualiza()")},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0 75 75 0)';novoeli=document.createElement("div");novoeli.id="div_di";novoel.appendChild(novoeli);$i("div_di").innerHTML="<p style='position:absolute;top:0px;left:0px'>+-</p>"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(160,0,"","center","center","Feche para parar destaque ","ativadesativaDestaque");YAHOO.util.Event.addListener(janela[0].close,"click",i3GEO.navega.destacaTema.desativa);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.destacaTema.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.destacaTema.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.destacaTema.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()")}},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.destacaTema.atualiza()");i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()");i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+" "+(objposicaocursor.imgx-10)+" "+(objposicaocursor.imgy-10)+" "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+')'}}},barraDeZoom:{cria:function(){var temp="",estilo;if(navn){temp+='<div style="text-align:center;position:relative;left:9px" >'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='<div id="vertMaisZoom" style="'+estilo+'"></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';if(navm){temp+='<div id=vertMenosZoom style="left:-1px;" ></div>'}else{temp+='<div id=vertMenosZoom ></div>'}if(navn){temp+='</div>'}return temp},ativa:function(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w+"px";iclone.style.height=i3GEO.parametros.h+"px";iclone.style.top=corpo.style.top+"px";iclone.style.left=corpo.style.left+"px";$i("img").style.display="none";iclone.style.display="block"}}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousemove=function(){try{var iclone,corpo,nt,nl,velhoh,velhow,nh=0,nw=0,t,l,fatorEscala;iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}nt=0;nl=0;i3geo_ns=parseInt(i3GEO.parametros.mapscale,10);if((g_fatordezoom>0)&&(g_fatordezoom<7)){g_fatordezoom=g_fatordezoom+1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh/g_fatordezoom;nw=velhow/g_fatordezoom;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t+((velhoh-nh)*0.5);nl=l+((velhow-nw)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if((g_fatordezoom<0)&&(g_fatordezoom>-7)){g_fatordezoom=g_fatordezoom-1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh*g_fatordezoom*-1;nw=velhow*g_fatordezoom*-1;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t-((nh-velhoh)*0.5);nl=l-((nw-velhow)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if(iclone){iclone.style.width=nw+"px";iclone.style.height=nh+"px";if(iclone.style.pixelTop){iclone.style.pixelTop=nt}else{iclone.style.top=nt+"px"}if(iclone.style.pixelLeft){iclone.style.pixelLeft=nl}else{iclone.style.left=nl+"px"}}if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3geo_ns}}catch(e){}}}}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}i3GEO.util.criaBox();g_operacao="navega";var idgoogle="googlemaps"+Math.random();i3GEO.janela.cria((i3GEO.parametros.w/2)+25+"px",(i3GEO.parametros.h/2)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>",idgoogle);atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_php_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}cpJSON=new cpaint();cpJSON.set_response_type("JSON");cpJSON.set_transfer_mode("POST");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.locaplic não esta definida")}if(i3GEO.configura.sid===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.sid não esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereSHPgrafico",$trad("o1"));cpJSON.call(p,"insereSHPgrafico",retorno,par)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};cpJSON.call(p,"insereSHP",retorno,par)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao,par)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao,par)},excluitema:function(funcao,temas){var layer,retorno,p,n,i,par;i3GEO.php.verifica();retorno=function(retorno){i3GEO.janela.fechaAguarde("excluitema");n=temas.length;for(i=0;i<n;i++){if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(temas[i]);if(layer.length>0){i3geoOL.removeLayer(layer[0])}}if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(temas[i]);if(indice!==false){i3GeoMap.overlayMapTypes.removeAt(indice)}}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(temas[i]);i3GeoMap.getFeatures().removeChild(indice)}}funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("excluitema",$trad("o1"));p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php";par="funcao=excluitema&temas="+temas+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"excluitema",retorno,par)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID,retorno=function(retorno){i3GEO.janela.fechaAguarde("reordenatemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reordenatemas",$trad("o1"));cpJSON.call(p,"reordenatemas",retorno,par)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaHTML",funcao,par)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe,retorno=function(retorno){i3GEO.janela.fechaAguarde("inverteStatusClasse");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("inverteStatusClasse",$trad("o1"));cpJSON.call(p,"inverteStatusClasse",retorno,par)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"ligaDesligaTemas",retorno,par)},pegalistademenus:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistademenus",funcao,par)},pegalistadegrupos:function(funcao,id_menu,listasgrupos){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadegrupos",funcao,par)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadeSubgrupos",funcao,par)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao,par)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao,par)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao,par)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao,par)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao,par)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},listadrives:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao,par)},listaarquivos:function(funcao,caminho){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao,par)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao,par)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao,par)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatamanho");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatamanho",$trad("o1"));cpJSON.call(p,"pegaSistemas",retorno,par)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ativalogo&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("ativalogo");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("ativalogo",$trad("o1"));cpJSON.call(p,"ativalogo",retorno,par)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereAnnotation");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereAnnotation",$trad("o1"));cpJSON.call(p,"inserefeature",retorno,par)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"identificaunico",funcao,par)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=recuperamapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("recuperamapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("recuperamapa",$trad("o1"));cpJSON.call(p,"recuperamapa",retorno,par)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao,par)},referenciadinamica:function(funcao,zoom,tipo){i3GEO.php.verifica();if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferenciaDinamica",funcao,par)},referencia:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referencia&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferencia",funcao,par)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao,par)},aproxima:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aproxima",funcao,par)},afasta:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"afasta",funcao,par)},zoomponto:function(funcao,x,y,tamanho,simbolo,cor){i3GEO.php.verifica();if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}var retorno=function(retorno){i3GEO.janela.fechaAguarde("zoomponto");if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(x,y)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.pan2ponto(x,y)}funcao.call(funcao,retorno)},p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor;i3GEO.janela.abreAguarde("zoomponto",$trad("o1"));cpJSON.call(p,"zoomponto",retorno,par)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao,par)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){var retorno;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;atualiza=true;geo=false}if(geo===undefined){geo=false}if(atualiza===undefined){atualiza=true}if(ext===undefined){alert("extensao nao definida");return}retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":if(atualiza===true){i3GEO.Interface.googlemaps.zoom2extent(ext)}break;case"googleearth":if(atualiza===true){i3GEO.Interface.googleearth.zoom2extent(ext)}break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(ext);break}try{funcao.call(funcao,retorno)}catch(e){}};var p=locaplic+"/classesphp/mapa_controle.php";var par="funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo;cpJSON.call(p,"mudaext",retorno,par)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudaescala");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudaescala",$trad("o1"));cpJSON.call(p,"mudaescala",retorno,par)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"crialente",funcao,par)},geradestaque:function(funcao,tema,ext){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext,retorno=function(retorno){i3GEO.janela.fechaAguarde("geradestaque");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("geradestaque",$trad("o1"));cpJSON.call(p,"geradestaque",retorno,par)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoPT",funcao,par)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=selecaobox&ext="+box+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao,par)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoext",funcao,par)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoatrib2",funcao,par)},selecaotema:function(funcao,temao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaotema",funcao,par)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("sobetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("sobetema",$trad("o1"));cpJSON.call(p,"sobetema",retorno,par)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("descetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("descetema",$trad("o1"));cpJSON.call(p,"descetema",retorno,par)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("fontetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("fontetema",$trad("o1"));cpJSON.call(p,"fontetema",retorno,par)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomtema",$trad("o1"));cpJSON.call(p,"zoomtema",retorno,par)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomsel",$trad("o1"));cpJSON.call(p,"zoomsel",retorno,par)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("limpasel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("limpasel",$trad("o1"));cpJSON.call(p,"limpasel",retorno,par)},invertestatuslegenda:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("invertestatuslegenda");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("invertestatuslegenda",$trad("o1"));cpJSON.call(p,"invertestatuslegenda",retorno,par)},aplicaCorClasseTema:function(funcao,idtema,idclasse,rgb){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("aplicaCorClasseTema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("aplicaCorClasseTema",$trad("o1"));cpJSON.call(p,"aplicaCorClasseTema",retorno,par)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatransp");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatransp",$trad("o1"));cpJSON.call(p,"mudatransp",retorno,par)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudanome");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudanome",$trad("o1"));cpJSON.call(p,"mudanome",retorno,par)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid){if(arguments.length===11){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao,par)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaSHP");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaSHP",$trad("o1"));cpJSON.call(p,"adicionaTemaSHP",retorno,par)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaIMG");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaIMG",$trad("o1"));cpJSON.call(p,"adicionaTemaIMG",retorno,par)},identifica:function(funcao,x,y,resolucao,locaplic,sid){var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica&opcao=tip&xy="+x+","+y+"&resolucao=5&g_sid="+sid;cpJSON.call(p,"identifica",funcao,par)},identifica2:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas="";resolucao=5}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao="+resolucao+"&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){par+="&tema="+tema}cpJSON.call(p,"identifica",funcao,par)},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("reiniciaMapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reiniciaMapa",$trad("o1"));cpJSON.call(p,"reiniciaMapa",retorno,par)},procurartemas:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemas2:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas2&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemasestrela:function(funcao,nivel,fatorestrela,locaplic){if(arguments.length===3){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemasestrela&map_file=&nivel="+nivel+"&fatorestrela="+fatorestrela+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemasestrela");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemasestrela",$trad("o1"));cpJSON.call(p,"foo",retorno,par)}catch(e){}},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=adtema&temas="+temas+"&g_sid="+sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("adtema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adtema",$trad("o1"));cpJSON.call(p,"adtema",retorno,par)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao,par)},googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googlemaps",$trad("o1"));cpJSON.call(p,"googlemaps",retorno,par)},googleearth:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googleearth&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googleearth");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googleearth",$trad("o1"));cpJSON.call(p,"googleearth",retorno,par)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("openlayers",$trad("o1"));cpJSON.call(p,"openlayers",retorno,par)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.recalcPar();par+="&mapexten="+i3GEO.parametros.mapexten}cpJSON.call(p,"corpo",funcao,par)},converte2googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2googlemaps",$trad("o1"));cpJSON.call(p,"converte2googlemaps",retorno,par)},converte2openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2openlayers",$trad("o1"));cpJSON.call(p,"converte2openlayers",retorno,par)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaMapa&"+parametros,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"criaMapa",funcao,par)},inicia:function(funcao,embedLegenda,w,h){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"iniciaMapa",funcao,par)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao,par)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php",par="funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao,par)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer;cpJSON.call(p,"listaLayersWMS",funcao,par)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php",par="map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao,par)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaItensTema",funcao,par)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaRegistros",funcao,par)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=extregistros®istro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao,par)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao,par)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg&map_file=";cpJSON.call(p,"listaEpsg",funcao,par)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema,retorno=function(retorno){i3GEO.janela.fechaAguarde("criatemaSel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("criatemaSel",$trad("o1"));cpJSON.call(p,"chavegoogle",retorno,par)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao,par)},alteraData:function(funcao,tema,data){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data;cpJSON.call(p,"alteradata",funcao,par)},dadosPerfilRelevo:function(funcao,opcao,pontos,amostragem,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem+"&item="+item)},funcoesGeometriasWkt:function(funcao,listaWkt,operacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=funcoesGeometriasWkt&operacao="+operacao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&geometrias="+listaWkt)}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}cpJSON=new cpaint();cpJSON.set_response_type("JSON");cpJSON.set_transfer_mode("POST");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.locaplic não esta definida")}if(i3GEO.configura.sid===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.sid não esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereSHPgrafico",$trad("o1"));cpJSON.call(p,"insereSHPgrafico",retorno,par)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};cpJSON.call(p,"insereSHP",retorno,par)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao,par)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao,par)},excluitema:function(funcao,temas){var layer,retorno,p,n,i,par;i3GEO.php.verifica();retorno=function(retorno){i3GEO.janela.fechaAguarde("excluitema");n=temas.length;for(i=0;i<n;i++){if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(temas[i]);if(layer.length>0){i3geoOL.removeLayer(layer[0])}}if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(temas[i]);if(indice!==false){i3GeoMap.overlayMapTypes.removeAt(indice)}}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(temas[i]);i3GeoMap.getFeatures().removeChild(indice)}}funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("excluitema",$trad("o1"));p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php";par="funcao=excluitema&temas="+temas+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"excluitema",retorno,par)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID,retorno=function(retorno){i3GEO.janela.fechaAguarde("reordenatemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reordenatemas",$trad("o1"));cpJSON.call(p,"reordenatemas",retorno,par)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}cpJSON.call(i3GEO.configura.locaplic+"/classesphp/mapa_controle.php","criaLegendaHTML",funcao,"funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe,retorno=function(retorno){i3GEO.janela.fechaAguarde("inverteStatusClasse");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("inverteStatusClasse",$trad("o1"));cpJSON.call(p,"inverteStatusClasse",retorno,par)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"ligaDesligaTemas",retorno,par)},pegalistademenus:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistademenus",funcao,par)},pegalistadegrupos:function(funcao,id_menu,listasgrupos){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadegrupos",funcao,par)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadeSubgrupos",funcao,par)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao,par)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao,par)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao,par)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao,par)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao,par)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},listadrives:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao,par)},listaarquivos:function(funcao,caminho){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao,par)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao,par)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao,par)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatamanho");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatamanho",$trad("o1"));cpJSON.call(p,"pegaSistemas",retorno,par)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ativalogo&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("ativalogo");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("ativalogo",$trad("o1"));cpJSON.call(p,"ativalogo",retorno,par)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereAnnotation");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereAnnotation",$trad("o1"));cpJSON.call(p,"inserefeature",retorno,par)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"identificaunico",funcao,par)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=recuperamapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("recuperamapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("recuperamapa",$trad("o1"));cpJSON.call(p,"recuperamapa",retorno,par)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao,par)},referenciadinamica:function(funcao,zoom,tipo){i3GEO.php.verifica();if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferenciaDinamica",funcao,par)},referencia:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referencia&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferencia",funcao,par)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao,par)},aproxima:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aproxima",funcao,par)},afasta:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"afasta",funcao,par)},zoomponto:function(funcao,x,y,tamanho,simbolo,cor){i3GEO.php.verifica();if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}var retorno=function(retorno){i3GEO.janela.fechaAguarde("zoomponto");if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(x,y)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.pan2ponto(x,y)}funcao.call(funcao,retorno)},p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor;i3GEO.janela.abreAguarde("zoomponto",$trad("o1"));cpJSON.call(p,"zoomponto",retorno,par)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao,par)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){var retorno;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;atualiza=true;geo=false}if(geo===undefined){geo=false}if(atualiza===undefined){atualiza=true}if(ext===undefined){alert("extensao nao definida");return}retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":if(atualiza===true){i3GEO.Interface.googlemaps.zoom2extent(ext)}break;case"googleearth":if(atualiza===true){i3GEO.Interface.googleearth.zoom2extent(ext)}break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(ext);break}try{funcao.call(funcao,retorno)}catch(e){}};var p=locaplic+"/classesphp/mapa_controle.php";var par="funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo;cpJSON.call(p,"mudaext",retorno,par)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudaescala");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudaescala",$trad("o1"));cpJSON.call(p,"mudaescala",retorno,par)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"crialente",funcao,par)},geradestaque:function(funcao,tema,ext){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext,retorno=function(retorno){i3GEO.janela.fechaAguarde("geradestaque");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("geradestaque",$trad("o1"));cpJSON.call(p,"geradestaque",retorno,par)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoPT",funcao,par)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=selecaobox&ext="+box+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao,par)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoext",funcao,par)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoatrib2",funcao,par)},selecaotema:function(funcao,temao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaotema",funcao,par)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("sobetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("sobetema",$trad("o1"));cpJSON.call(p,"sobetema",retorno,par)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("descetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("descetema",$trad("o1"));cpJSON.call(p,"descetema",retorno,par)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("fontetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("fontetema",$trad("o1"));cpJSON.call(p,"fontetema",retorno,par)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomtema",$trad("o1"));cpJSON.call(p,"zoomtema",retorno,par)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomsel",$trad("o1"));cpJSON.call(p,"zoomsel",retorno,par)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("limpasel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("limpasel",$trad("o1"));cpJSON.call(p,"limpasel",retorno,par)},invertestatuslegenda:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("invertestatuslegenda");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("invertestatuslegenda",$trad("o1"));cpJSON.call(p,"invertestatuslegenda",retorno,par)},aplicaCorClasseTema:function(funcao,idtema,idclasse,rgb){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("aplicaCorClasseTema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("aplicaCorClasseTema",$trad("o1"));cpJSON.call(p,"aplicaCorClasseTema",retorno,par)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatransp");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatransp",$trad("o1"));cpJSON.call(p,"mudatransp",retorno,par)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudanome");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudanome",$trad("o1"));cpJSON.call(p,"mudanome",retorno,par)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid){if(arguments.length===11){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao,par)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaSHP");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaSHP",$trad("o1"));cpJSON.call(p,"adicionaTemaSHP",retorno,par)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaIMG");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaIMG",$trad("o1"));cpJSON.call(p,"adicionaTemaIMG",retorno,par)},identifica:function(funcao,x,y,resolucao,locaplic,sid){var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica&opcao=tip&xy="+x+","+y+"&resolucao=5&g_sid="+sid;cpJSON.call(p,"identifica",funcao,par)},identifica2:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas="";resolucao=5}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao="+resolucao+"&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){par+="&tema="+tema}cpJSON.call(p,"identifica",funcao,par)},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("reiniciaMapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reiniciaMapa",$trad("o1"));cpJSON.call(p,"reiniciaMapa",retorno,par)},procurartemas:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemas2:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas2&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemasestrela:function(funcao,nivel,fatorestrela,locaplic){if(arguments.length===3){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemasestrela&map_file=&nivel="+nivel+"&fatorestrela="+fatorestrela+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemasestrela");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemasestrela",$trad("o1"));cpJSON.call(p,"foo",retorno,par)}catch(e){}},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=adtema&temas="+temas+"&g_sid="+sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("adtema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adtema",$trad("o1"));cpJSON.call(p,"adtema",retorno,par)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao,par)},googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googlemaps",$trad("o1"));cpJSON.call(p,"googlemaps",retorno,par)},googleearth:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googleearth&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googleearth");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googleearth",$trad("o1"));cpJSON.call(p,"googleearth",retorno,par)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("openlayers",$trad("o1"));cpJSON.call(p,"openlayers",retorno,par)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.recalcPar();par+="&mapexten="+i3GEO.parametros.mapexten}cpJSON.call(p,"corpo",funcao,par)},converte2googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2googlemaps",$trad("o1"));cpJSON.call(p,"converte2googlemaps",retorno,par)},converte2openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2openlayers",$trad("o1"));cpJSON.call(p,"converte2openlayers",retorno,par)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaMapa&"+parametros,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"criaMapa",funcao,par)},inicia:function(funcao,embedLegenda,w,h){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"iniciaMapa",funcao,par)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao,par)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php",par="funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao,par)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer;cpJSON.call(p,"listaLayersWMS",funcao,par)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php",par="map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao,par)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaItensTema",funcao,par)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaRegistros",funcao,par)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=extregistros®istro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao,par)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao,par)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg&map_file=";cpJSON.call(p,"listaEpsg",funcao,par)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema,retorno=function(retorno){i3GEO.janela.fechaAguarde("criatemaSel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("criatemaSel",$trad("o1"));cpJSON.call(p,"chavegoogle",retorno,par)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao,par)},alteraData:function(funcao,tema,data){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data;cpJSON.call(p,"alteradata",funcao,par)},dadosPerfilRelevo:function(funcao,opcao,pontos,amostragem,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem+"&item="+item)},funcoesGeometriasWkt:function(funcao,listaWkt,operacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=funcoesGeometriasWkt&operacao="+operacao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&geometrias="+listaWkt)}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_selecao_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.selecao={porxy:function(tema,tipo,tolerancia){var retorna=function(retorno){i3GEO.atualiza(retorno)};i3GEO.php.selecaopt(retorna,tema,objposicaocursor.ddx+" "+objposicaocursor.ddy,tipo,tolerancia)},porbox:function(tema,tipo,box){var retorna=function(retorno){i3GEO.atualiza(retorno)};i3GEO.php.selecaobox(retorna,tema,tipo,box)},janelaOpcoes:function(){var janela,temp;g_tipoacao="selecao";i3GEO.mapa.ativaTema("");janela=i3GEO.janela.cria("430px","320px",i3GEO.configura.locaplic+'/ferramentas/selecao/index.htm',"","","Seleção <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=48a' > </a>");if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.selecao.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.selecao.clique()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.selecao.atualizaGrafico()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.selecao.atualizaGrafico()")}temp=function(){i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.selecao.clique()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.selecao.atualizaGrafico()");try{i3GEO.desenho.richdraw.fecha()}catch(e){}if($i("pontosins")){document.body.removeChild($i("pontosins"))}i3GEO.barraDeBotoes.ativaBotoes()};YAHOO.util.Event.addListener(janela[0].close,"click",temp)},atualizaGrafico:function(){if(g_tipoacao==="selecao"){var doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(doc.getElementById("guia5obj")){if(doc.getElementById("guia5obj").style.display==="block"){if(window.parent.frames.wdocai.atualizaGrafico){window.parent.frames.wdocai.atualizaGrafico()}}}}},clique:function(){if(g_tipoacao==="selecao"){var doc,tipo,tolerancia;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;tipo="adiciona";if(doc.getElementById("tipoOperacao")){tipo=doc.getElementById("tipoOperacao").value}if(i3GEO.temaAtivo===""){alert("Nenhum tema ativo");return}tolerancia=doc.getElementById("toleranciapt").value;if((tipo!=="limpa")&&(tipo!=="inverte")){i3GEO.selecao.porxy(i3GEO.temaAtivo,tipo,tolerancia)}}},box:{inicia:function(){if(g_tipoacao!=='selecaobox'){return}i3GEO.selecao.box.criaBox();adicionaxyBox=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));var i=$i("i3geoboxSel").style;i.width=0+"px";i.height=0+"px";i.visibility="visible";i.display="block";i.left=objposicaocursor.imgx+adicionaxyBox[0]+"px";i.top=objposicaocursor.imgy+adicionaxyBox[1]+"px";boxxini=objposicaocursor.imgx+adicionaxyBox[0];boxyini=objposicaocursor.imgy+adicionaxyBox[1];tamanhox=0;tamanhoy=0;if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.selecao.box.desloca()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.selecao.box.desloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.selecao.box.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.selecao.box.termina()")}},criaBox:function(){try{i3GEO.desenho.richdraw.fecha()}catch(e){}i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="red";i3GEO.desenho.richdraw.lineWidth="2px";var novoel,temp;if(!$i("i3geoboxSel")){novoel=document.createElement("div");novoel.style.width="0px";novoel.style.height="0px";novoel.id="i3geoboxSel";novoel.style.display="none";novoel.style.fontSize="0px";if(navn){novoel.style.opacity=0.25}novoel.style.backgroundColor="yellow";novoel.style.position="absolute";novoel.style.border="2px solid #ff0000";if(navm){novoel.style.filter="alpha(opacity=25)"}novoel.onmousemove=function(){var b,wb,hb;b=$i("i3geoboxSel").style;wb=parseInt(b.width,10);hb=parseInt(b.height,10);if(navm){if(wb>2){b.width=wb-2+"px"}if(hb>2){b.height=hb-2+"px"}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.selecao.box.termina()};document.body.appendChild(novoel)}i3GEO.util.mudaCursor(i3GEO.configura.cursores,"zoom","i3geoboxSel",i3GEO.configura.locaplic);if($i("img")){$i("img").title="";temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}},desloca:function(){if(g_tipoacao!=='selecaobox'){return}var bxs,ppx,py;bxs=$i("i3geoboxSel").style;if(bxs.display!=="block"){return}ppx=objposicaocursor.imgx+adicionaxyBox[0];py=objposicaocursor.imgy+adicionaxyBox[1];if(navm){if((ppx>boxxini)&&((ppx-boxxini-2)>0)){bxs.width=ppx-boxxini-2+"px"}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2+"px"}if(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2+"px"}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2+"px"}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){if(g_tipoacao!=='selecaobox'){return}var valor,v,x1,y1,x2,y2,limpa=function(){},doc,tipo;try{valor=i3GEO.calculo.rect2ext("i3geoboxSel",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxSel").style;bxs.display="none";bxs.visibility="hidden";bxs.width=0+"px";bxs.height=0+"px"};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.selecao.box.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.selecao.box.termina()");doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;tipo="adiciona";if(doc.getElementById("tipoOperacao")){tipo=doc.getElementById("tipoOperacao").value}if((tipo!=="limpa")&&(tipo!=="inverte")){i3GEO.selecao.porbox(i3GEO.temaAtivo,tipo,v)}}catch(e){limpa.call();return}}},poligono:{inicia:function(){try{i3GEO.desenho.richdraw.fecha()}catch(e){}i3GEO.util.insereMarca.limpa();g_tipoacao="selecaopoli";alert($trad("x20"));i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="red";i3GEO.desenho.richdraw.lineWidth="2px";i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.selecao.clique()");if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.selecao.poligono.move()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.selecao.poligono.move()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.selecao.poligono.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.selecao.poligono.clique()")}},move:function(){if(g_tipoacao==="selecaopoli"){var n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhas[n-1],n)}}},clique:function(){if(g_tipoacao!=="selecaopoli"){return}var n,d;n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}else{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}catch(e){}if(n>0){d=parseInt(i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy),10);pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1]}i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.selecao.poligono.termina,"divGeometriasTemp")},termina:function(){var doc,pontos,xs,ys,retorna,p,cp;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;pontos=pontosdistobj;i3GEO.desenho.richdraw.fecha();i3GEO.mapa.ativaTema(doc.getElementById("comboTemas").value);xs=pontos.xpt.toString(",");ys=pontos.ypt.toString(",");retorna=function(){i3GEO.janela.fechaAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.atualiza("")};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoPoli";cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"selecaoPoli",retorna,xs,ys,doc.getElementById("comboTemas").value,doc.getElementById("tipoOperacao").value)}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.selecao={porxy:function(tema,tipo,tolerancia){var retorna=function(retorno){i3GEO.atualiza(retorno)};i3GEO.php.selecaopt(retorna,tema,objposicaocursor.ddx+" "+objposicaocursor.ddy,tipo,tolerancia)},porbox:function(tema,tipo,box){var retorna=function(retorno){i3GEO.atualiza(retorno)};i3GEO.php.selecaobox(retorna,tema,tipo,box)},janelaOpcoes:function(){var janela,temp;g_tipoacao="selecao";i3GEO.mapa.ativaTema("");janela=i3GEO.janela.cria("430px","320px",i3GEO.configura.locaplic+'/ferramentas/selecao/index.htm',"","","Seleção <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=48a' > </a>");if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.selecao.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.selecao.clique()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.selecao.atualizaGrafico()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.selecao.atualizaGrafico()")}temp=function(){i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.selecao.clique()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.selecao.atualizaGrafico()");try{i3GEO.desenho.richdraw.fecha()}catch(e){}if($i("pontosins")){document.body.removeChild($i("pontosins"))}i3GEO.barraDeBotoes.ativaBotoes()};YAHOO.util.Event.addListener(janela[0].close,"click",temp)},atualizaGrafico:function(){if(g_tipoacao==="selecao"){var doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(doc.getElementById("guia5obj")){if(doc.getElementById("guia5obj").style.display==="block"){if(window.parent.frames.wdocai.atualizaGrafico){window.parent.frames.wdocai.atualizaGrafico()}}}}},clique:function(){if(g_tipoacao==="selecao"){var doc,tipo,tolerancia;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;tipo="adiciona";if(doc.getElementById("tipoOperacao")){tipo=doc.getElementById("tipoOperacao").value}if(i3GEO.temaAtivo===""){alert("Nenhum tema ativo");return}tolerancia=doc.getElementById("toleranciapt").value;if((tipo!=="limpa")&&(tipo!=="inverte")){i3GEO.selecao.porxy(i3GEO.temaAtivo,tipo,tolerancia)}}},box:{inicia:function(){if(g_tipoacao!=='selecaobox'){return}i3GEO.selecao.box.criaBox();adicionaxyBox=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));var i=$i("i3geoboxSel").style;i.width=0+"px";i.height=0+"px";i.visibility="visible";i.display="block";i.left=objposicaocursor.imgx+adicionaxyBox[0]+"px";i.top=objposicaocursor.imgy+adicionaxyBox[1]+"px";boxxini=objposicaocursor.imgx+adicionaxyBox[0];boxyini=objposicaocursor.imgy+adicionaxyBox[1];tamanhox=0;tamanhoy=0;if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.selecao.box.desloca()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.selecao.box.desloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.selecao.box.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.selecao.box.termina()")}},criaBox:function(){try{i3GEO.desenho.richdraw.fecha()}catch(e){}i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="red";i3GEO.desenho.richdraw.lineWidth="2px";var novoel,temp;if(!$i("i3geoboxSel")){novoel=document.createElement("div");novoel.style.width="0px";novoel.style.height="0px";novoel.id="i3geoboxSel";novoel.style.display="none";novoel.style.fontSize="0px";if(navn){novoel.style.opacity=0.25}novoel.style.backgroundColor="yellow";novoel.style.position="absolute";novoel.style.border="2px solid #ff0000";if(navm){novoel.style.filter="alpha(opacity=25)"}novoel.onmousemove=function(){var b,wb,hb;b=$i("i3geoboxSel").style;wb=parseInt(b.width,10);hb=parseInt(b.height,10);if(navm){if(wb>2){b.width=wb-2+"px"}if(hb>2){b.height=hb-2+"px"}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.selecao.box.termina()};document.body.appendChild(novoel)}i3GEO.util.mudaCursor(i3GEO.configura.cursores,"zoom","i3geoboxSel",i3GEO.configura.locaplic);if($i("img")){$i("img").title="";temp="zoom";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="zoom_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic)}},desloca:function(){if(g_tipoacao!=='selecaobox'){return}var bxs,ppx,py;bxs=$i("i3geoboxSel").style;if(bxs.display!=="block"){return}ppx=objposicaocursor.imgx+adicionaxyBox[0];py=objposicaocursor.imgy+adicionaxyBox[1];if(navm){if((ppx>boxxini)&&((ppx-boxxini-2)>0)){bxs.width=ppx-boxxini-2+"px"}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2+"px"}if(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2+"px"}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2+"px"}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){if(g_tipoacao!=='selecaobox'){return}var valor,v,x1,y1,x2,y2,limpa=function(){},doc,tipo;try{valor=i3GEO.calculo.rect2ext("i3geoboxSel",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxSel").style;bxs.display="none";bxs.visibility="hidden";bxs.width=0+"px";bxs.height=0+"px"};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.selecao.box.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.selecao.box.termina()");doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;tipo="adiciona";if(doc.getElementById("tipoOperacao")){tipo=doc.getElementById("tipoOperacao").value}if((tipo!=="limpa")&&(tipo!=="inverte")){i3GEO.selecao.porbox(i3GEO.temaAtivo,tipo,v)}}catch(e){limpa.call();return}}},poligono:{inicia:function(){try{i3GEO.desenho.richdraw.fecha()}catch(e){}i3GEO.util.insereMarca.limpa();g_tipoacao="selecaopoli";alert($trad("x20"));i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="red";i3GEO.desenho.richdraw.lineWidth="2px";i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.selecao.clique()");if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.selecao.poligono.move()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.selecao.poligono.move()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.selecao.poligono.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.selecao.poligono.clique()")}},move:function(){if(g_tipoacao==="selecaopoli"){var n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhas[n-1],n)}}},clique:function(){if(g_tipoacao!=="selecaopoli"){return}var n,d;n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}else{pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}catch(e){}if(n>0){d=parseInt(i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy),10);pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1]}i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.selecao.poligono.termina,"divGeometriasTemp")},termina:function(){var doc,pontos,xs,ys,retorna,p,cp;doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;pontos=pontosdistobj;i3GEO.desenho.richdraw.fecha();i3GEO.mapa.ativaTema(doc.getElementById("comboTemas").value);xs=pontos.xpt.toString(",");ys=pontos.ypt.toString(",");retorna=function(){i3GEO.janela.fechaAguarde("i3GEO.atualiza",$trad("o1"));i3GEO.atualiza("")};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=selecaoPoli";cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"selecaoPoli",retorna,xs,ys,doc.getElementById("comboTemas").value,doc.getElementById("tipoOperacao").value)}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_social_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.social={curtirFacebook:function(url,tipo){if(tipo==="comtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&width=160&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:160px; height:21px;' allowTransparency='true'></iframe>"}if(tipo==="semtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>"}},publicarTwitter:function(url,tipo){var re=new RegExp("=","g");url=url.replace(re,'%3d');if(tipo==="comtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&via=i3geo&url='+url+'" style="width:100px; height:21px;"></iframe>'}if(tipo==="semtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=none&via=i3geo&url='+url+'" style="width:65px; height:21px;"></iframe>'}},compartilhar:function(id,urlcf,urlpt,tipo,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}if(!tipo){tipo="comtotal"}var onde=$i(id),tabela="";if(tipo==="comtotal"){tabela+="<table style='width:250px' ><tr>"}if(tipo==="semtotal"){tabela+="<table style='width:115px' ><tr>"}if(onde||id===""){if(urlpt!==""){tabela+="<td>"+i3GEO.social.publicarTwitter(urlpt,tipo)+"</td>"}if(urlcf!==""){tabela+="<td>"+i3GEO.social.curtirFacebook(urlcf,tipo)+"</td>"}tabela+="</tr></table>";if(id!==""){onde.innerHTML=tabela}return tabela}else{return false}},bookmark:function(link,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}var ins="<img style='cursor:pointer' src='"+locaplic+"/imagens/delicious.gif' onclick='javascript:window.open(\"http://del.icio.us/post?url="+link+"\")' title='Delicious'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/digg.gif' onclick='javascript:window.open(\"http://digg.com/submit/post?url="+link+"\")' title='Digg'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+link+"\")' title='Facebook'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/stumbleupon.gif' onclick='javascript:window.open(\"http://www.stumbleupon.com/submit?url="+link+"\")' title='StumbleUpon'/>";return ins}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.social={curtirFacebook:function(url,tipo){if(tipo==="comtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&width=160&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:160px; height:21px;' allowTransparency='true'></iframe>"}if(tipo==="semtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>"}},publicarTwitter:function(url,tipo){var re=new RegExp("=","g");url=url.replace(re,'%3d');if(tipo==="comtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&via=i3geo&url='+url+'" style="width:100px; height:21px;"></iframe>'}if(tipo==="semtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=none&via=i3geo&url='+url+'" style="width:65px; height:21px;"></iframe>'}},compartilhar:function(id,urlcf,urlpt,tipo,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}if(!tipo){tipo="comtotal"}var onde=$i(id),tabela="";if(tipo==="comtotal"){tabela+="<table style='width:250px' ><tr>"}if(tipo==="semtotal"){tabela+="<table style='width:115px' ><tr>"}if(onde||id===""){if(urlpt!==""){tabela+="<td>"+i3GEO.social.publicarTwitter(urlpt,tipo)+"</td>"}if(urlcf!==""){tabela+="<td>"+i3GEO.social.curtirFacebook(urlcf,tipo)+"</td>"}tabela+="</tr></table>";if(id!==""){onde.innerHTML=tabela}return tabela}else{return false}},bookmark:function(link,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}var ins="<img style='cursor:pointer' src='"+locaplic+"/imagens/delicious.gif' onclick='javascript:window.open(\"http://del.icio.us/post?url="+link+"\")' title='Delicious'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/digg.gif' onclick='javascript:window.open(\"http://digg.com/submit/post?url="+link+"\")' title='Digg'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+link+"\")' title='Facebook'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/stumbleupon.gif' onclick='javascript:window.open(\"http://www.stumbleupon.com/submit?url="+link+"\")' title='StumbleUpon'/>";return ins}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_tema_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.tema={TEMPORIZADORESID:{},exclui:function(tema){g_operacao="excluitema";var p;try{p=document.getElementById("idx"+tema).parentNode.parentNode.parentNode;do{p.removeChild(p.childNodes[0])}while(p.childNodes.length>0);p.parentNode.removeChild(p)}catch(e){}i3GEO.php.excluitema(i3GEO.atualiza,[tema]);i3GEO.mapa.ativaTema("");i3GEO.temaAtivo=""},fonte:function(tema){i3GEO.mapa.ativaTema(tema);window.open(i3GEO.configura.locaplic+"/admin/abrefontemapfile.php?tema="+tema)},sobe:function(tema){i3GEO.mapa.ativaTema(tema);var temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.sobetema(temp,tema)},desce:function(tema){i3GEO.mapa.ativaTema(tema);var temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.descetema(temp,tema)},zoom:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomtema(i3GEO.atualiza,tema)},zoomsel:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomsel(i3GEO.atualiza,tema)},limpasel:function(tema){i3GEO.mapa.ativaTema(tema);g_operacao="limpasel";var temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,tema)};i3GEO.php.limpasel(temp,tema)},mudatransp:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var valor="",temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,idtema)};if($i("tr"+idtema)){valor=$i("tr"+idtema).value}if(valor!==""){i3GEO.php.mudatransp(temp,idtema,valor)}else{alert($trad("x16"))}},invertestatuslegenda:function(idtema){alert($trad("x17"));i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.arvoreDeCamadas.atualiza()};i3GEO.php.invertestatuslegenda(temp,idtema)},alteracorclasse:function(idtema,idclasse,rgb){i3GEO.mapa.ativaTema(idtema);var temp=function(){i3GEO.atualiza();i3GEO.Interface.atualizaTema("",idtema);i3GEO.arvoreDeCamadas.atualizaLegenda(idtema)};i3GEO.php.aplicaCorClasseTema(temp,idtema,idclasse,rgb)},mudanome:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="mudanome";var valor="";if($i("nn"+idtema)){valor=$i("nn"+idtema).value}if(valor!==""){i3GEO.php.mudanome(i3GEO.atualiza,idtema,valor)}else{alert($trad("x18"))}},mostralegendajanela:function(idtema,nome,tipoOperacao){var retorna,janela;if(tipoOperacao==="ativatimer"){mostralegendajanelaTimer=setTimeout("i3GEO.tema.mostralegendajanela('"+idtema+"','"+nome+"','abrejanela')",4000)}if(tipoOperacao==="abrejanela"){try{clearTimeout(mostralegendajanelaTimer)}catch(e){}retorna=function(retorno){$i("janelaLegenda"+idtema+"_corpo").innerHTML=retorno.data.legenda};if(!$i("janelaLegenda"+idtema)){janela=i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false);janela[2].style.textAlign="left";janela[2].style.background="white";janela[2].innerHTML=$trad("o1")}i3GEO.php.criaLegendaHTML(retorna,idtema,"legenda3.htm")}if(tipoOperacao==="desativatimer"){clearTimeout(mostralegendajanelaTimer)}},temporizador:function(idtema,tempo){if(!tempo){tempo=$i("temporizador"+idtema).value}if(tempo!=""&&parseInt(tempo,10)>0){eval('i3GEO.tema.TEMPORIZADORESID.'+idtema+' = {tempo: '+tempo+',idtemporizador: setInterval(function('+idtema+'){if(!$i("arrastar_'+idtema+'")){delete(i3GEO.tema.TEMPORIZADORESID.'+idtema+');return;}i3GEO.Interface.atualizaTema("",idtema);},parseInt('+tempo+',10)*1000)};')}else{try{window.clearInterval(i3GEO.tema.TEMPORIZADORESID[idtema].idtemporizador);delete(i3GEO.tema.TEMPORIZADORESID[idtema])}catch(e){}}},dialogo:{tme:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tme()","tme","tme")},mostraWms:function(tema){i3GEO.janela.mensagemSimples(i3GEO.configura.locaplic+"/ogc.php?tema="+tema,"WMS url")},comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"","","<img src='"+i3GEO.configura.locaplic+"/imagens/player_volta.png' style=cursor:pointer onclick='javascript:history.go(-1)'><span style=position:relative;top:-2px; > "+$trad("x19")+" "+tema+" </span><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js";i3GEO.util.scriptTag(js,"i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}else{i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo)}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' > </a>")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.tema={TEMPORIZADORESID:{},exclui:function(tema){g_operacao="excluitema";try{var p=document.getElementById("idx"+tema).parentNode.parentNode.parentNode;do{p.removeChild(p.childNodes[0])}while(p.childNodes.length>0);p.parentNode.removeChild(p)}catch(e){}i3GEO.php.excluitema(i3GEO.atualiza,[tema]);i3GEO.mapa.ativaTema("");i3GEO.temaAtivo=""},fonte:function(tema){i3GEO.mapa.ativaTema(tema);window.open(i3GEO.configura.locaplic+"/admin/abrefontemapfile.php?tema="+tema)},sobe:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.sobetema(function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}},tema)},desce:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.descetema(function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}},tema)},zoom:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomtema(i3GEO.atualiza,tema)},zoomsel:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomsel(i3GEO.atualiza,tema)},limpasel:function(tema){i3GEO.mapa.ativaTema(tema);g_operacao="limpasel";i3GEO.php.limpasel(function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,tema)},tema)},mudatransp:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var valor="";if($i("tr"+idtema)){valor=$i("tr"+idtema).value}if(valor!==""){i3GEO.php.mudatransp(function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,idtema)},idtema,valor)}else{alert($trad("x16"))}},invertestatuslegenda:function(idtema){alert($trad("x17"));i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";i3GEO.php.invertestatuslegenda(function(retorno){i3GEO.atualiza(retorno);i3GEO.arvoreDeCamadas.atualiza()},idtema)},alteracorclasse:function(idtema,idclasse,rgb){i3GEO.mapa.ativaTema(idtema);i3GEO.php.aplicaCorClasseTema(temp=function(){i3GEO.atualiza();i3GEO.Interface.atualizaTema("",idtema);i3GEO.arvoreDeCamadas.atualizaLegenda(idtema)},idtema,idclasse,rgb)},mudanome:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="mudanome";var valor="";if($i("nn"+idtema)){valor=$i("nn"+idtema).value}if(valor!==""){i3GEO.php.mudanome(i3GEO.atualiza,idtema,valor)}else{alert($trad("x18"))}},mostralegendajanela:function(idtema,nome,tipoOperacao){if(tipoOperacao==="ativatimer"){mostralegendajanelaTimer=setTimeout("i3GEO.tema.mostralegendajanela('"+idtema+"','"+nome+"','abrejanela')",4000)}if(tipoOperacao==="abrejanela"){try{clearTimeout(mostralegendajanelaTimer)}catch(e){}if(!$i("janelaLegenda"+idtema)){var janela=i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false);janela[2].style.textAlign="left";janela[2].style.background="white";janela[2].innerHTML=$trad("o1")}i3GEO.php.criaLegendaHTML(function(retorno){$i("janelaLegenda"+idtema+"_corpo").innerHTML=retorno.data.legenda},idtema,"legenda3.htm")}if(tipoOperacao==="desativatimer"){clearTimeout(mostralegendajanelaTimer)}},temporizador:function(idtema,tempo){if(!tempo){tempo=$i("temporizador"+idtema).value}if(tempo!=""&&parseInt(tempo,10)>0){eval('i3GEO.tema.TEMPORIZADORESID.'+idtema+' = {tempo: '+tempo+',idtemporizador: setInterval(function('+idtema+'){if(!$i("arrastar_'+idtema+'")){delete(i3GEO.tema.TEMPORIZADORESID.'+idtema+');return;}i3GEO.Interface.atualizaTema("",idtema);},parseInt('+tempo+',10)*1000)};')}else{try{window.clearInterval(i3GEO.tema.TEMPORIZADORESID[idtema].idtemporizador);delete(i3GEO.tema.TEMPORIZADORESID[idtema])}catch(e){}}},dialogo:{tme:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tme()","tme","tme")},mostraWms:function(tema){i3GEO.janela.mensagemSimples(i3GEO.configura.locaplic+"/ogc.php?tema="+tema,"WMS url")},comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"","","<img src='"+i3GEO.configura.locaplic+"/imagens/player_volta.png' style=cursor:pointer onclick='javascript:history.go(-1)'><span style=position:relative;top:-2px; > "+$trad("x19")+" "+tema+" </span><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js","i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}else{i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo)}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' > </a>")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/classe_util_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/á|à|ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<input onchange=\""+onch+"\" tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.ResizePanel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas,n,nome="";if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td> <input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value=' ' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value=' ' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento,nx="",texto="Cor",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.ResizePanel(id,{height:"480px",modal:false,width:"380px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versao adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/á|à|ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<input onchange=\""+onch+"\" tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.ResizePanel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas,n,nome="";if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td> <input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value=' ' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value=' ' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento,nx="",texto="Cor",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.ResizePanel(id,{height:"480px",modal:false,width:"380px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versao adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/compactados/dicionario_compacto.js
1 | -g_traducao={"p1":[{pt:"O i3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre. <a href='http://mapas.mma.gov.br/download' target=blank > Download</a>",it:"I3geo é un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Subtítulo",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tamaño",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable surrounding",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable logo",es:"Activar/desactivar logomarca",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da seleção",en:"Selection color",es:"Color de la selección",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color del fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grado de coordenadas",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Template",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprieta"}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Image map format",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Base layers",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Subtitulo",it:"Attiva legenda"}],"p18":[{pt:"Não imprime a legenda",en:"Disable legend",es:"Desactivar Subtitulo",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",en:"Enables or disables the legend of a theme in the print option on the map",es:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",it:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa"}],"p20":[{pt:"Tela remota",en:"Remote screen",es:"Tela remota",it:"Tela remota"}],"p21":[{pt:"Animação",en:"Animation",es:"Animación",it:"Animation"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"Análise",en:"Analysis",es:"Análisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprieta"}],"u1":[{pt:"Sobre o i3Geo",en:"About i3Geo",es:"Sobre i3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos códigos",en:"Doc. of the codes",es:"Doc. de los códigos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u4a":[{pt:"Manual do usuário",en:"User manual",es:"Manual do usuário",it:"Manual do usuário"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software público",en:"Software público",es:"Software público",it:"Software pubblico"}],"u5b":[{pt:"Lista de funções",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometrías",it:"Geometrie"}],"u7":[{pt:"Grade de poligonos",en:"Polygon grid",es:"Grado de polígonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grado de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hexágonos",en:"Grid of Hexagons",es:"Grado de hexágonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Entorno (Buffer)",it:"Buffer"}],"u11":[{pt:"Centróide",en:"Centroid",es:"Centro geométrico",it:"Baricentro"}],"u11a":[{pt:"Distância entre pontos",en:"Point distance",es:"Distancia de puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N point in polygon",es:"N puntos en polígono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en polígono/matriz",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribuição de pontos",en:"Point distribution",es:"Distribución de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u15a":[{pt:"Ferramentas",en:"Tools",es:"Herramientas",it:"Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Tomar imágenes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grado",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Polígono",en:"Polygon",es:"Poligonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolv",es:"Dissolve",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupa",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro médio",en:"Mean center",es:"Centro médio",it:"Centro médio"}],"u29":[{pt:"Editor vetorial",en:"Vector editor",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui ou clique para excluir",en:"Drag the layer here to remove",es:"Arrastre el tema aqui ó haga clic para excluir",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",en:"Filters the list of layers",es:"filtra a lista de camadas",it:"filtra a lista de camadas"}],"t2b":[{pt:"Abre a legenda do mapa",en:"Opens the map legend",es:"Abre a legenda do mapa",it:"Abre a legenda do mapa"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Turn the layer on/off on the map. Wait a few moments to get the map redesigned or press the button to apply it.",es:"Haga clic para conectar o desconectar este tema, mostrándolo o no en el mapa. Después de alterar el estado del tema, espere algunos instantes para que el mapa sea rediseñado, o haga clic en el botón aplicar que se mostrará.",it:"Fare clic per attivare o disattivare questo tema. Dopo aver modificato lo stato del tema, La mappa aggiornata sar� visualizzata dopo qualche istante. Per visualizzare subito cliccare su Applica"}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn all layers on",es:"Haga clic para conectar los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn all layers off",es:"Haga clic para desconectar los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa seleção",en:"Clear selection",es:"Limpia la selección",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a seleção",en:"Zoom to selection",es:"Zoom a la selección",it:"Zoom della selezione"}],"t5":[{pt:"Limpa seleção existente nesse tema",en:"Clear selection",es:"Limpia la selección existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download in shapefile format",es:"Haga clic para hacer el download",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"dragging or wait",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the draw order",es:"Arrastre para cambiar la orden",it:"Trascina per modificare l'ordine"}],"t9":[{pt:"A escala do tema é compatível com a escala do mapa",en:"The scale of the layer is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema � compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema é incompatível com a escala do mapa",en:"The scale of the layer is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema � incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema não é conhecida",en:"The scale of the layer is not known",es:"La escala del tema no es conocida",it:"La scala del tema non � conosciuta"}],"t12":[{pt:"excluir",en:"delete",es:"Excluir",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"up",es:"Sube",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Drag the layer up",es:"Haga clic para subir ese tema en la orden de diseño",it:"Clicca per sollevare questo tema nell�ordine di progettazione"}],"t15":[{pt:"desce",en:"down",es:"Baja",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Drag the layer down",es:"Haga clic para bajar este tema en la orden de diseño",it:"Clicca per scendere questo tema nell�ordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"zoom to a layer",es:"Zoom para el tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Click to adjust the map in order to show the whole layer",es:"Haga clic para ajustar el mapa de forma para que muestre todo el tema",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Opções e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Subtitulo",it:"Legenda"}],"t19":[{pt:"Altera a transparência do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency.",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati pi� bassi siano visti"}],"t20":[{pt:"Opacidade",en:"Opacity",es:"Opacidad",it:"Opacit�"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Change layer name.",es:"Cambia el nombre actual del tema. Utilice para mejorar el subtitulo del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema con base en sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts on the subject, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Texto...",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que serão mostradas quando o mouse é estacionado sobre um elemento desse tema.",en:"Set the tooltips that will be shown when the mouse is over the element of that layer.",es:"Defina las etiquetas que se mostrarán cuando el ratón se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Tooltip...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informações, com base na tabela de atributos.",en:"Filter based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtro...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to that layer.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table...",es:"Tabla...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a alteração da forma de representação desse tema.",en:"Opens the editor of legend, allowing the modification of the form of representation of this theme.",es:"Abre el editor de subtítulo, permitiendo la alteración de la forma de representación de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Legend edit...",es:"Editar subtítulo...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"The data shows that layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompaña el ratón",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Muestra en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema visível apenas em determinadas escalas",en:"the layer is visible in specific scales",es:"capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gráfico",en:"Graphic",es:"Gráfico",it:"Grafico"}],"t37a":[{pt:"Tema com gráficos",en:"Theme chart",es:"Gráfico",it:"Grafico"}],"t37b":[{pt:"Gráfico interativo",en:"Interactive chart",es:"Gráfico",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padrão SLD.",en:"Export the legend to SLD.",es:"Exporta a legenda para o padrão SLD.",it:"Exporta a legenda para o padrão SLD."}],"t39":[{pt:"Exportar SLD",en:"SLD...",es:"SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Open the tool that lets you change the SQL data access",es:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"SQL...",es:"SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain...",es:"Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"SLD apply...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comment",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Most popular",es:"Mais populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",en:"Interval in seconds after which the layer will be updated. To ignore, leave blank",es:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",it:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizador"}],"t49":[{pt:"Mapa temático 3d",en:"Thematic map 3d",es:"Mapa temático 3d",it:"Mapa temático 3d"}],"a1":[{pt:"procurar tema:",en:"search layer:",es:"Buscar datos:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Upload de shape file",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload dbf or CSV file",es:"Upload de archivo dbf o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Download de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Web Map Context (WMC) Importer",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"WMS server connection",es:"Conectar con el servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"WMS-T server connection",es:"Conectar con el servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"GeoRss connection",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Click to connect or disconnect layer, showing it or not on the map. After changing the layer status, wait a few moments to be redesigned the map, or click in the button apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostrándolo o no en el mapa. Después de alterar el estado del tema, espere algunos instantes para que el mapa sea rediseñado, o haga clic en el botón aplicar que aparecerá",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verr� visualizzato."}],"a9":[{pt:"fonte",en:"font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"código:",en:"code",es:"Código",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir no Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Upload SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"a15":[{pt:"Conexões",en:"Conections",es:"Conexões",it:"Conexões"}],"a16":[{pt:"Serviços",en:"Services",es:"Servicios",it:"Servers"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Catálogo",en:"Catalog",es:"Catalogo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agrega",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Subtítulo",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca rápida",en:"Quick search",es:"Búsqueda rápida",it:"Ricerca rapida"}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"dinâmico",en:"dynamic",es:"Dinámico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz´-lo no mapa. O centro do mapa ser´ deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazará para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrangência geográfica da inicialização.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajustándola para mostrar la misma área geográfica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d2t":[{pt:"enquadramento inicial",en:"initial extent",es:"enquadramento inicial",it:"enquadramento inicial"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a região indicada por um retângulo. Após ativada, clique e arraste o mouse sobre o mapa na área de zoom desejada.",en:"Extends the map - place the clicked point in the center of the screen or extends the region indicated by a rectangular.After enabled, click and drag the mouse over the map in the area of zoom desired.",es:"Amplía el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o amplía la región indicada por un rectángulo. Después de activarla, haga clic y arrastre el ratón sobre el mapa en el área de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nell�area di zoom desiderata."}],"d3t":[{pt:"clique e arraste para ampliar",en:"click and drag to enlarge",es:"clique e arraste para ampliar",it:"clique e arraste para ampliar"}],"d4":[{pt:"Desloca a região visível no mapa. Após ativada, clique e arraste o mouse sobre o mapa para deslocar a região visível.",en:"Shifts the region visible on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desloca la región visible en el mapa",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d4t":[{pt:"clique e arraste para deslocar",en:"click and drag to move",es:"clique e arraste para deslocar",it:"clique e arraste para deslocar"}],"d5":[{pt:"Amplia o mapa tendo como referência o centro atual.",en:"Magnify the map with the reference the current center.",es:"Amplía el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d5t":[{pt:"aproximar",en:"zoom in",es:"aproximar",it:"aproximar"}],"d6":[{pt:"Reduz o mapa tendo como referência o centro atual.",en:"Reduces the map as having reference the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d6t":[{pt:"afastar",en:"zoom out",es:"afastar",it:"afastar"}],"d7":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on it.",es:"Muestra información sobre un punto en el mapa. Después de activarla haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7t":[{pt:"clique para identificar",en:"click to identify",es:"clique para identificar",it:"clique para identificar"}],"d7a":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. Once activated, stop the mouse for a few moments at the desired point or click on it.",es:"Muestra información sobre un punto en el mapa. Después de activarla, pare el ratón por algunos instantes en el punto deseado o haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d7at":[{pt:"etiqueta",en:"label",es:"etiqueta",it:"etiqueta"}],"d8":[{pt:"Mostra a extensão geográfica atual em coordenadas geográficas",en:"It shows the extent of current geographic coordinates",es:"Muestra la extensión geográfica actual en coordenadas geográficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d8t":[{pt:"extensão atual",en:"total extent",es:"extensão atual",it:"extensão atual"}],"d9":[{pt:"Abre/fecha o mapa de referência",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d9t":[{pt:"mapa de referência",en:"reference map",es:"mapa de referência",it:"mapa de referência"}],"d10":[{pt:"Digite o novo valor de escala e clique no botão aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el botón aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrangência atual do mapa. Faça um zoom no mapa antes de abrir essa opção. Regiôes muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current scope of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very long search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opción. Regiones muy extensas pueden ocasionar una búsqueda muy lenta",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dell�apertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d11t":[{pt:"buscar na Wikipédia",en:"search in Wikipédia",es:"buscar na Wikipédia",it:"buscar na Wikipédia"}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usuário no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3d",en:"Generates file for 3d",es:"Genera archivo para 3d",it:"Genera file per 3d"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de satélite da região vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region's main views on the map",es:"Abre Google Maps, mostrando una imagen de satélite de la región en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d15t":[{pt:"Google Maps",en:"Google Maps",es:"Google Maps",it:"Google Maps"}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Busca documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d16t":[{pt:"Scielo",en:"Scielo",es:"Scielo",it:"Scielo"}],"d17":[{pt:"Projeto Confluence. Pontos de intersecção de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersección de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d17t":[{pt:"confluências",en:"confluences",es:"confluências",it:"confluências"}],"d18":[{pt:"Abre lente de ampliação",en:"Opens lens to expansion",es:"Abre lente de ampliación",it:"Apri lente di ingrandimento"}],"d18t":[{pt:"lente",en:"lens",es:"lente",it:"lente"}],"d19":[{pt:"Coloca as guias em uma janela móvel",en:"Open the tabs in a window mobile",es:"Coloca las guías en una ventana móvil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configuraçôes iniciais.",en:"Reload the map with the initial configurations.",es:"Rediseña el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d20t":[{pt:"reinicia",en:"restart",es:"reinicia",it:"reinicia"}],"d21":[{pt:"Mede a distância entre dois ou mais pontos clicados no mapa (menor distância). O cálculo de distância é aproximado e sua precisão depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (less distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o más puntos marcados en el mapa (menor distancia). El cálculo de distancia es aproximado y su precisión depende de la escala del mapa",it:"Misura la distanza tra due o pi� punti cliccati sulla mappa (minore distanza). Il calcolo della distanza � approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21t":[{pt:"distância",en:"distance",es:"distância",it:"dist�ncia"}],"d21a":[{pt:"Mede a área de um polígono desenhado na tela. O cálculo de área é aproximado e sua precisão depende da escala do mapa.",en:"It measures the area on the map. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mede a área de um polígono desenhado na tela. O cálculo de área é aproximado e sua precisão depende da escala do mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie � approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21at":[{pt:"área",en:"area",es:"área",it:"área"}],"d22":[{pt:"Insere pontos no mapa em coordenadas geográficas. Ospontos incluídos podem ser transformados em linhas ou polígonos. Os pontos são armazenados em um tema temporário, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. Items included can be converted into lines or polygons. Items are stored in a temporary layer, can be to download shapefile.",es:"Inserte puntos en el mapa en coordenadas geográficas. Los puntos incluidos pueden transformarse en líneas o polígonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse el download del archivo shapefile.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilit� di effettuare il download del file Shapefile."}],"d22t":[{pt:"inserir pontos",en:"insert points",es:"inserir pontos",it:"inserir pontos"}],"d23":[{pt:"Insere um gráfico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores numéricos na tabela de atributos.",en:"Insert a graphic in the clicked point as the exist attributes in the chosen layer. The layer must have items with numerical values in the table of attributes.",es:"Inserte un gráfico en el punto marcado según los atributos existentes en el tema elejido. El tema debe tener puntos con valores numéricos en la tabla de atributos",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para seleção de elementos de um tema. Os elementos selecionados podem ser utilizados em outras operaçôes, como buffer e seleção por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other buffer or selection operation by layer .",es:"Abre las herramientas para selección de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras ",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d24t":[{pt:"Selecionar",en:"Select",es:"Selecionar",it:"Selecionar"}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa opção para adicionar informaçôes ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opción para agregar información al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d25t":[{pt:"Inserir texto",en:"Text insert",es:"Inserir texto",it:"Inserir texto"}],"d26":[{pt:"Escolha o visual para os botões e outras características visuais do mapa",en:"Choose look for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras características visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait...",es:"Espere...",it:"Attendere..."}],"d29":[{pt:"Estações metar",en:"Metar stations",es:"Estações metar",it:"Estações metar"}],"d30":[{pt:"Linha do tempo",en:"Time line",es:"Linha do tempo",it:"Linha do tempo"}],"d31":[{pt:"Não existe nenhuma camada com etiquetas ativas",en:"There is no layer with active labels",es:"Não existe nenhuma camada com etiquetas ativas",it:"Não existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navegação com o mouse",en:"Mouse navigation",es:"Navegação com o mouse",it:"Navegação com o mouse"}],"ge2":[{pt:"Barra de status",en:"Status bar",es:"Barra de status",it:"Barra de status"}],"ge3":[{pt:"Reference map",en:"Mapa de referência",es:"Mapa de referência",it:"Mapa de referência"}],"ge4":[{pt:"Escala e legenda",en:"Scale and legend",es:"Escala e legenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosphere",es:"Atmosfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Coordinates grid",es:"Grade de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Sunshine",es:"Luz do sol",it:"Luz do sol"}],"ge8":[{pt:"Limites políticos",en:"Political boundaries",es:"Limites políticos",it:"Limites políticos"}],"ge9":[{pt:"Construções em 3d",en:"Buildings in 3D",es:"Construções em 3d",it:"Construções em 3d"}],"ge10":[{pt:"Estradas",en:"Roads",es:"Estradas",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terrain",es:"Terreno",it:"Terreno"}],"x1":[{pt:"Página principal",en:"Home",es:"Página principal",it:"Página principal"}],"x2":[{pt:"Lista de menus",en:"Menu list",es:"Lista de menus",it:"Lista de menus"}],"x3":[{pt:"Miniaturas",en:"Thumbnails",es:"Miniaturas",it:"Miniaturas"}],"x4":[{pt:"Pesquisa na INDE",en:"Search in SDI",es:"Pesquisa na INDE",it:"Pesquisa na INDE"}],"x5":[{pt:"Editar subgrupos",en:"Subgroups editing",es:"Editar subgrupos",it:"Editar subgrupos"}],"x6":[{pt:"Editar temas",en:"Theme editing",es:"Editar temas",it:"Editar temas"}],"x7":[{pt:"opção visível apenas para editores",en:"option visible only to editors",es:"opção visível apenas para editores",it:"opção visível apenas para editores"}],"x8":[{pt:"Sistema de administração",en:"Management System",es:"Sistema de administração",it:"Sistema de administração"}],"x9":[{pt:"Editar árvore",en:"Edit tree",es:"Editar árvore",it:"Editar árvore"}],"x10":[{pt:"Editar menus",en:"Edit menu",es:"Editar menus",it:"Editar menus"}],"x11":[{pt:"Mostra a legenda em uma janela",en:"Show the legend in a window",es:"Mostra a legenda em uma janela",it:"Mostra a legenda em uma janela"}],"x13":[{pt:"&Acute;rvore de camadas não encontrada",en:"Tree layers not found",es:"Arboles de capas no se encuentra",it:"&Acute;rvore de camadas não encontrada"}],"x14":[{pt:"sim",en:"si",es:"yes",it:"sim"}],"x15":[{pt:"não",en:"no",es:"no",it:"nao"}],"x16":[{pt:"Valor não definido",en:"Value not set",es:"Valor no establecido",it:"Valor não definido"}],"x17":[{pt:"Essa opção afeta apenas a impressão do mapa",en:"This option only affects the printing of the map",es:"Esta opción s&ocaute;lo afecta a la impresi&ocaute;n del mapa",it:"Essa opção afeta apenas a impressão do mapa"}],"x18":[{pt:"Nome não definido",en:"El nombre no se ha definido",es:"Name was not defined",it:"Name was not defined"}],"x19":[{pt:"Comentários de",en:"Reviews",es:"Comentarios",it:""}],"x20":[{pt:"Clique no mapa para desenhar o polígono",en:"Click the map to draw the polygon",es:"Haga clic en el mapa para dibujar el polígono",it:"Click the map to draw the polygon"}],"x21":[{pt:"Essa operação não funciona nessa interface",en:"This operation does not work on this interface",es:"Esta operación no funciona en esta interfaz",it:""}],"x22":[{pt:"Opção não disponível",en:"Option not available",es:"Opción no disponible",it:"Opci�n no disponible"}],"x23":[{pt:"Direção",en:"",es:"Dirección",it:"Direction"}],"x25":[{pt:"Método para calcular distâncias",en:"Method to calculate distances",es:"Método para calcular distancias",it:"Method to calculate distances"}],"x26":[{pt:"Voce quer mesmo encerrar a sessao?",en:"Do you really want to logout?",es:"¿Realmente desea salir?",it:""}],"x27":[{pt:"Usuário",en:"User",es:"Usuario",it:""}],"x28":[{pt:"Senha",en:"Password",es:"Contraseña",it:""}],"x29":[{pt:"Enviar",en:"Send",es:"Enviar",it:""}],"x30":[{pt:"Ativo",en:"Active",es:"Activo",it:""}],"x31":[{pt:"Erro",en:"Error",es:"Erro",it:""}],"x32":[{pt:"",en:"",es:"",it:""}]}; | |
2 | 1 | \ No newline at end of file |
2 | +g_traducao={"p1":[{pt:"O i3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre!. <a href='http://mapas.mma.gov.br/download' target=blank > Descargar</a>",it:"I3geo è un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tamaño",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable Border",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable Logo",es:"Activar/desactivar Logo",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Color of Selection",es:"Color de la selección",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color de fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Gratíla",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Plantilla",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Format of Image Map",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Capas Base",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Leyenda",it:"Attiva legenda"}],"p18":[{pt:"Não imprime a legenda",en:"Disable legend",es:"Desactivar Leyenda",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",en:"Enable or disable the legend of a theme in the print option of the map",es:"Activa o desactiva la leyenda de un tema en la opción de impresión del mapa",it:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa"}],"p20":[{pt:"Tela remota",en:"Remote screen",es:"Pantalla remota",it:"Tela remota"}],"p21":[{pt:"Animação",en:"Animation",es:"Animación",it:"Animation"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"Análise",en:"Analysis",es:"Análisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"u1":[{pt:"Sobre o i3Geo",en:"About i3Geo",es:"Acerca de i3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos códigos",en:"Doc. of the codes",es:"Doc. de los códigos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u4a":[{pt:"Manual do usuário",en:"User manual",es:"Manual de usuario",it:"Manual do usuário"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software público",en:"Software público Brazil",es:"Software público Brasil",it:"Software pubblico"}],"u5b":[{pt:"Lista de funções",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometrías",it:"Geometrie"}],"u7":[{pt:"Grade de poligonos",en:"Polygon grid",es:"Grado de polígonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Gratíla de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hexágonos",en:"Grid of Hexagons",es:"Gratíla de hexágonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Area Influencia (Buffer)",it:"Buffer"}],"u11":[{pt:"Centróide",en:"Centroid",es:"Centroide",it:"Baricentro"}],"u11a":[{pt:"Distância entre pontos",en:"Distance between points",es:"Distancia entre puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N points in polygon",es:"N puntos en polígono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en polígono/raster",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribuição de pontos",en:"Points distribution",es:"Distribución de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u15a":[{pt:"Ferramentas",en:"Tools",es:"Herramientas",it:"Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Captar imágenes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Gratíla",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Polígono",en:"Polygon",es:"Polígonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolve",es:"Disolver",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupar",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro médio",en:"Middle center",es:"Centro medio",it:"Centro médio"}],"u29":[{pt:"Editor vetorial",en:"Vector editor",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui ou clique para excluir",en:"Drag the layer here or make click to remove",es:"Arrastre el tema aquí ó haga clic para excluir",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",en:"Filters the list of layers",es:"Filtra la lista de capas",it:"filtra a lista de camadas"}],"t2b":[{pt:"Abre a legenda do mapa",en:"Opens the map legend",es:"Despliega la leyenda del mapa",it:"Abre a legenda do mapa"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Click to enable or disable this theme, showing it or not on the map. After changing the status of the theme, wait a few moments to get the map to be reloaded, or click the Apply button that will be display.",es:"Haga clic para activar o desactivar este tema, mostrándolo o no en el mapa. Después de cambiar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el botón aplicar que se mostrará.",it:"Fare clic per attivare o disattivare questo tema. Dopo aver modificato lo stato del tema, La mappa aggiornata sarà visualizzata dopo qualche istante. Per visualizzare subito cliccare su Applica"}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn on all layers",es:"Haga clic para activar todos los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn off all layers",es:"Haga clic para desactivar todos los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa seleção",en:"Clear selection",es:"Limpia la selección",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a seleção",en:"Zoom to selection",es:"Zoom a la selección",it:"Zoom della selezione"}],"t5":[{pt:"Limpa seleção existente nesse tema",en:"Clear selection existing in this theme",es:"Limpia la selección existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download this theme in shapefile format",es:"Haga clic para descargar este tema en formato shape",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"Dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"Click and Dragg to rearrange order. Drag and drop to remove. Please to wait to see the legend",es:"Haga clic y arrastre para cambiar el orden. Arrastre y suelte remover. Aguarde para ver la leyenda.",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the order",es:"Arrastre para cambiar el orden",it:"Trascina per modificare l'ordine"}],"t9":[{pt:"A escala do tema é compatível com a escala do mapa",en:"The scale of the theme is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema è compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema é incompatível com a escala do mapa",en:"The scale of the theme is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema è incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema não é conhecida",en:"The scale of the layer is unknown",es:"La escala del tema no es conocida",it:"La scala del tema non è conosciuta"}],"t12":[{pt:"excluir",en:"Delete",es:"Eliminar",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete this layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"Up",es:"Subir",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Click to move up the layer in design order",es:"Haga clic para subir ese tema en la orden de diseño",it:"Clicca per sollevare questo tema nellordine di progettazione"}],"t15":[{pt:"desce",en:"Down",es:"Bajar",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Click to move down the layer in design order",es:"Haga clic para bajar este tema en la orden de diseño",it:"Clicca per scendere questo tema nellordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"Zoom to layer",es:"Zoom al tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Zoom all",es:"Zoom a todo",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Opções e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"t19":[{pt:"Altera a transparência do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency. It make possible to see inferior layers",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati più bassi siano visti"}],"t20":[{pt:"Opacidade",en:"Opacity",es:"Opacidad",it:"Opacità"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Rename layer. Use it for make a better legend of the map",es:"Renombrar tema. Utilice para mejorar la leyenda del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema en base a sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts about this theme, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Etiquetas..",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que serão mostradas quando o mouse é estacionado sobre um elemento desse tema.",en:"Define the label that will be shown when the mouse is over one element of this theme.",es:"Defina las etiquetas que se mostrarán cuando el ratón se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Label...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informações, com base na tabela de atributos.",en:"Insert a Filter in this theme for show specific information, based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtrar...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to this theme.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table of attributes...",es:"Tabla de atributos...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a alteração da forma de representação desse tema.",en:"Opens the legend editor, allowing the modification of the form of representation of this theme.",es:"Abre el editor de leyenda, permitiendo la alteración de la forma de representación de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Edit Legend...",es:"Editar leyenda...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"Shows the data of this layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompaña el ratón",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Mostrar en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema visível apenas em determinadas escalas",en:"Layer is visible in specific scales",es:"Capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gráfico",en:"Graphic",es:"Gráfico",it:"Grafico"}],"t37a":[{pt:"Tema com gráficos",en:"Theme with chart",es:"Tema con Gráfico",it:"Grafico"}],"t37b":[{pt:"Gráfico interativo",en:"Interactive chart",es:"Gráfico Interactivo",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padrão SLD.",en:"Export the legend to standard SLD.",es:"Exporta la leyenda para estándar SLD.",it:"Exporta a legenda para o padrão SLD."}],"t39":[{pt:"Exportar SLD",en:"Export to SLD...",es:"Exportar a SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Opens the tool that lets you change the SQL data access",es:"Abre una herramienta que permite alterar el SQL de acceso a los datos",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"Edit SQL...",es:"Editar SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain efect...",es:"Efecto Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"Apply SLD...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comment",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Most popular",es:"Mas populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",en:"Interval in seconds after which the layer will be updated. To ignore, leave blank",es:"Intervalo en segundos despues del cual la capa será actualizada. Para ignorar, deje en blanco.",it:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizador"}],"t49":[{pt:"Mapa temático 3D",en:"Thematic map 3D",es:"Mapa temático 3D",it:"Mapa temático 3D"}],"a1":[{pt:"procurar tema:",en:"Search layer:",es:"Buscar Tema:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Subir archivo shape",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload DBF or CSV file",es:"Subir archivo DBF o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Descarga de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Import Web Map Context (WMC)",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"Connect to WMS Server",es:"Conectar al servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"Connect to WMS-T Server",es:"Conectar al servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"Connect to GeoRss",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Nube de Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Click to connect or disconnect this layer, showing it or not on the map. After changing the layer status, wait a few moments to be reloaded on the map, or click in the button Apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostrándolo o no en el mapa. Después de alterar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el botón aplicar que aparecerá",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verrà visualizzato."}],"a9":[{pt:"Fonte",en:"Font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"código:",en:"Code",es:"Código",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir en Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Subir SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"a15":[{pt:"Conexões",en:"Conections",es:"Conexiones",it:"Conexões"}],"a16":[{pt:"Serviços",en:"Services",es:"Servicios",it:"Servers"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Catálogo",en:"Catalog",es:"Catálogo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agregar",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca rápida",en:"Quick search",es:"Búsqueda rápida",it:"Ricerca rapida"}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"dinâmico",en:"Dynamic",es:"Dinámico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz´-lo no mapa. O centro do mapa ser´ deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazará para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrangência geográfica da inicialização.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajustándola para mostrar la misma área geográfica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d2t":[{pt:"Enquadramento inicial",en:"Initial extent",es:"Encuadre inicial",it:"enquadramento inicial"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a região indicada por um retângulo. Após ativada, clique e arraste o mouse sobre o mapa na área de zoom desejada.",en:"Extends the map - places the point where you clicked in the center of the screen or extends to the region indicated by a rectangle. Once activated, click and drag the mouse over the map in the desired zoom area",es:"Amplía el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o amplía a la región indicada con un rectángulo. Después de activarla, haga clic y arrastre el ratón sobre el mapa en el área de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nellarea di zoom desiderata."}],"d3t":[{pt:"clique e arraste para ampliar",en:"Click and drag to enlarge",es:"Haga click y arraste para ampliar",it:"clique e arraste para ampliar"}],"d4":[{pt:"Desloca a região visível no mapa. Após ativada, clique e arraste o mouse sobre o mapa para deslocar a região visível.",en:"Moves the visible region on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desplaza la región visible en el mapa. Después de activada, haga clic y arrastre el ratón sobre el mapa para mover la región visible.",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d4t":[{pt:"clique e arraste para deslocar",en:"Click and drag to move",es:"Haga Click y arraste para mover",it:"clique e arraste para deslocar"}],"d5":[{pt:"Amplia o mapa tendo como referência o centro atual.",en:"Magnify the map with the reference the current center.",es:"Amplía el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d5t":[{pt:"aproximar",en:"zoom in",es:"Acercar",it:"aproximar"}],"d6":[{pt:"Reduz o mapa tendo como referência o centro atual.",en:"Reduces the map with the reference of the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d6t":[{pt:"afastar",en:"Zoom out",es:"Alejar",it:"afastar"}],"d7":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on the map.",es:"Muestra información sobre un punto en el mapa. Después de activarla haga clic sobre el mapa.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7t":[{pt:"clique para identificar",en:"Click to identify",es:"Click para identificar",it:"clique para identificar"}],"d7a":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. After activated, stop the mouse for a moment at the desired point or click on it.",es:"Muestra información sobre un punto en el mapa. Después de activarse, detenga el ratón por un momento en el punto deseado o haga click en él.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d7at":[{pt:"etiqueta",en:"Label",es:"Etiqueta",it:"etiqueta"}],"d8":[{pt:"Mostra a extensão geográfica atual em coordenadas geográficas",en:"Shows the current extend in geographic coordinates",es:"Muestra la extensión geográfica actual en coordenadas geográficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d8t":[{pt:"extensão atual",en:"Actual extent",es:"Extensió actual",it:"extensão atual"}],"d9":[{pt:"Abre/fecha o mapa de referência",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d9t":[{pt:"mapa de referência",en:"Reference map",es:"Mapa de referencia",it:"mapa de referência"}],"d10":[{pt:"Digite o novo valor de escala e clique no botão aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el botón aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrangência atual do mapa. Faça um zoom no mapa antes de abrir essa opção. Regiôes muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current extend of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very slow search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opción. Regiones muy extensas pueden ocasionar una búsqueda muy lentas",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dellapertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d11t":[{pt:"buscar na Wikipédia",en:"search in Wikipedia",es:"buscar na Wikipedia",it:"buscar na Wikipédia"}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usuário no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3D",en:"Generates file for 3D",es:"Genera archivo para 3D",it:"Genera file per 3D"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de satélite da região vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region on the map",es:"Abre Google Maps, mostrando una imagen de satélite de la región en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d15t":[{pt:"Google Maps",en:"Google Maps",es:"Google Maps",it:"Google Maps"}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Buscar documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d16t":[{pt:"Scielo",en:"Scielo",es:"Scielo",it:"Scielo"}],"d17":[{pt:"Projeto Confluence. Pontos de intersecção de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersección de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d17t":[{pt:"confluências",en:"Confluences",es:"Confluencias",it:"confluências"}],"d18":[{pt:"Abre lente de ampliação",en:"Opens magnifying lens",es:"Abrir lupa",it:"Apri lente di ingrandimento"}],"d18t":[{pt:"lente",en:"lens",es:"lente",it:"lente"}],"d19":[{pt:"Coloca as guias em uma janela móvel",en:"Open the tabs in a window mobile",es:"Coloca las guías en una ventana móvil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configuraçôes iniciais.",en:"Reload the map with the initial configurations.",es:"Recarga el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d20t":[{pt:"reinicia",en:"restart",es:"reinicia",it:"reinicia"}],"d21":[{pt:"Mede a distância entre dois ou mais pontos clicados no mapa (menor distância). O cálculo de distância é aproximado e sua precisão depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (shortest distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o más puntos marcados en el mapa (menor distancia). El cálculo de distancia es aproximado y su precisión depende de la escala del mapa.",it:"Misura la distanza tra due o più punti cliccati sulla mappa (minore distanza). Il calcolo della distanza è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21t":[{pt:"distância",en:"distance",es:"distancia",it:"distância"}],"d21a":[{pt:"Mede a área de um polígono desenhado na tela. O cálculo de área é aproximado e sua precisão depende da escala do mapa.",en:"It measures the area of a polgono drawn on the screen. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mide el área de un polígono dibujado sobre la pantalla. El cálculo del área es aproximado y su precisión depende de la escala del mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21at":[{pt:-"área",en:"area",es:"área",it:"área"}],"d22":[{pt:"Insere pontos no mapa em coordenadas geográficas. Ospontos incluídos podem ser transformados em linhas ou polígonos. Os pontos são armazenados em um tema temporário, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. The points included can be converted into lines or polygons. The points are stored in a temporary layer, and we can download it like shapefile.",es:"Inserte puntos en el mapa en coordenadas geográficas. Los puntos incluidos pueden transformarse en líneas o polígonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse la descarga en formato de archivo shape.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilità di effettuare il download del file Shapefile."}],"d22t":[{pt:"inserir pontos",en:"insert points",es:"insertar puntos",it:"inserir pontos"}],"d23":[{pt:"Insere um gráfico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores numéricos na tabela de atributos.",en:"Insert a graphic of the existing attributes on the selected layer in the clicked point. The layer must have columns with numerical values in the table of attributes.",es:"Inserte un gráfico en el punto marcado según los atributos existentes en el tema seleccionado. El tema debe tener campos con valores numéricos en la tabla de atributos.",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para seleção de elementos de um tema. Os elementos selecionados podem ser utilizados em outras operaçôes, como buffer e seleção por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other operations like buffer or selection by theme.",es:"Abre las herramientas para selección de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras operaciones como áreas de influencia o selección por tema",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d24t":[{pt:"Selecionar",en:"Select",es:"Seleccionar",it:"Selecionar"}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa opção para adicionar informaçôes ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opción para agregar información al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d25t":[{pt:"Inserir texto",en:"Insert text",es:"Insertar texto",it:"Inserir texto"}],"d26":[{pt:"Escolha o visual para os botões e outras características visuais do mapa",en:"Choose the visual for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras características visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait... generating files",es:"Espere... generando los archivos",it:"Attendere..."}],"d29":[{pt:"Estações METAR",en:"METAR-Br Stations",es:"Estaciones METAR-Br",it:"Estações metar"}],"d30":[{pt:"Linha do tempo",en:"Timeline",es:"Línea del tiempo",it:"Linha do tempo"}],"d31":[{pt:"Não existe nenhuma camada com etiquetas ativas",en:"There is no layer with active labels",es:"No existe ninguna capa con etiquetas activas",it:"Não existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navegação com o mouse",en:"Mouse navigation",es:"Navegación con el ratón",it:"Navegação com o mouse"}],"ge2":[{pt:"Barra de status",en:"Status bar",es:"Barra de estado",it:"Barra de status"}],"ge3":[{pt:"Mapa de referência",en:"Reference map",es:"Mapa de referencia",it:"Mapa de referência"}],"ge4":[{pt:"Escala e legenda",en:"Scale and legend",es:"Escala y leyenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosphere",es:"Atmósfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Coordinates grid",es:"Grilla de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Sunshine",es:"Luz del sol",it:"Luz do sol"}],"ge8":[{pt:"Limites políticos",en:"Political boundaries",es:"Límites políticos",it:"Limites políticos"}],"ge9":[{pt:"Construções em 3D",en:"Buildings in 3D",es:"Construciones en 3D",it:"Construções em 3D"}],"ge10":[{pt:"Estradas",en:"Roads",es:"Carreteras",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terrain",es:"Terreno",it:"Terreno"}],"x1":[{pt:"Página principal",en:"Home",es:"Inicio",it:"Página principal"}],"x2":[{pt:"Lista de menus",en:"Menu list",es:"Lista de menús",it:"Lista de menus"}],"x3":[{pt:"Miniaturas",en:"Thumbnails",es:"Miniaturas",it:"Miniaturas"}],"x4":[{pt:"Pesquisa na INDE",en:"Search in SDI of INDE-Br",es:"Buscar en IDE del INDE-Br",it:"Pesquisa na INDE"}],"x5":[{pt:"Editar subgrupos",en:"Edit subgroups",es:"Editar subgrupos",it:"Editar subgrupos"}],"x6":[{pt:"Editar temas",en:"Edit Theme",es:"Editar temas",it:"Editar temas"}],"x7":[{pt:"opção visível apenas para editores",en:"option visible only for editors",es:"opción visible solo para editores",it:"opção visível apenas para editores"}],"x8":[{pt:"Sistema de administração",en:"Admin. System",es:"Sistema de administración",it:"Sistema de administração"}],"x9":[{pt:"Editar árvore",en:"Edit tree",es:"Editar árbol",it:"Editar árvore"}],"x10":[{pt:"Editar menus",en:"Edit menus",es:"Editar menus",it:"Editar menus"}],"x11":[{pt:"Mostra a legenda em uma janela",en:"Show the legend in a window",es:"Muestra una leyenda en una ventana",it:"Mostra a legenda em uma janela"}],"x13":[{pt:"&Acute;rvore de camadas não encontrada",en:"Tree layers not found",es:"Arboles de capas no se encuentra",it:"&Acute;rvore de camadas não encontrada"}],"x14":[{pt:"sim",en:"si",es:"yes",it:"sim"}],"x15":[{pt:"não",en:"no",es:"no",it:"nao"}],"x16":[{pt:"Valor não definido",en:"Value not set",es:"Valor no establecido",it:"Valor não definido"}],"x17":[{pt:"Essa opção afeta apenas a impressão do mapa",en:"This option only affects the printing of the map",es:"Esta opción s&ocaute;lo afecta a la impresi&ocaute;n del mapa",it:"Essa opção afeta apenas a impressão do mapa"}],"x18":[{pt:"Nome não definido",en:"El nombre no se ha definido",es:"Name was not defined",it:"Name was not defined"}],"x19":[{pt:"Comentários de",en:"Reviews",es:"Comentarios",it:""}],"x20":[{pt:"Clique no mapa para desenhar o polígono",en:"Click the map to draw the polygon",es:"Haga clic en el mapa para dibujar el polígono",it:"Click the map to draw the polygon"}],"x21":[{pt:"Essa operação não funciona nessa interface",en:"This operation does not work on this interface",es:"Esta operación no funciona en esta interfaz",it:""}],"x22":[{pt:"Opção não disponível",en:"Option not available",es:"Opción no disponible",it:"Opci�n no disponible"}],"x23":[{pt:"Direção",en:"",es:"Dirección",it:"Direction"}],"x25":[{pt:"Método para calcular distâncias",en:"Method to calculate distances",es:"Método para calcular distancias",it:"Method to calculate distances"}],"x26":[{pt:"Voce quer mesmo encerrar a sessao?",en:"Do you really want to logout?",es:"¿Realmente desea salir?",it:""}],"x27":[{pt:"Usuário",en:"User",es:"Usuario",it:""}],"x28":[{pt:"Senha",en:"Password",es:"Contraseña",it:""}],"x29":[{pt:"Enviar",en:"Send",es:"Enviar",it:""}],"x30":[{pt:"Ativo",en:"Active",es:"Activo",it:""}],"x31":[{pt:"Erro",en:"Error",es:"Erro",it:""}],"x32":[{pt:"Enviar senha",en:"Send password",es:"Enviar la contraseña",it:""}],"x33":[{pt:"",en:"",es:"",it:""}]}; | |
3 | 3 | \ No newline at end of file | ... | ... |
classesjs/datadownload.js
... | ... | @@ -47,11 +47,11 @@ Propriedade: g_locaplic |
47 | 47 | Indica a localização do i3geo. Por default, procura no diretório onde foi executada a plicação datadownload. |
48 | 48 | No caso do datadownload.htm ser disparado de outro local, é necessário definir essa variável antes de chamar a função DDinicia |
49 | 49 | */ |
50 | -var loc = window.location.href; | |
50 | +loc = window.location.href; | |
51 | 51 | g_locaplic = loc.split("/datadownload.htm"); |
52 | 52 | g_locaplic = g_locaplic[0]; |
53 | 53 | |
54 | -var temp = loc.split("?"); | |
54 | +temp = loc.split("?"); | |
55 | 55 | if(temp[1]) |
56 | 56 | {temaDownload = temp[1];} |
57 | 57 | else |
... | ... | @@ -99,7 +99,7 @@ Valores: |
99 | 99 | |
100 | 100 | dir - indica que os dados serão buscados em diretórios no servidor. |
101 | 101 | |
102 | -menutemas - indica que os dados serão buscados no arquivo menutemas/menutemas.xml ou | |
102 | +menutemas - indica que os dados serão buscados no arquivo menutemas/menutemas.xml ou | |
103 | 103 | no sistema de administração do i3geo |
104 | 104 | */ |
105 | 105 | g_tipo = "menutemas"; |
... | ... | @@ -244,7 +244,7 @@ No HTML deve existir um DIV com id='corpo'. Nesse div ser&aacute; inclu&iacute;d |
244 | 244 | |
245 | 245 | Parametros: |
246 | 246 | |
247 | -dir - diretório no servidor | |
247 | +dir - diretório no servidor | |
248 | 248 | */ |
249 | 249 | function listaArquivos(dir) |
250 | 250 | { |
... | ... | @@ -264,7 +264,7 @@ function listaArquivos(dir) |
264 | 264 | ins += "<b>Diretórios:</b><br><br>"; |
265 | 265 | for (var ig=0;ig<retorno.data.diretorios.length; ig++) |
266 | 266 | { |
267 | - ins += "<span style=cursor:pointer onclick=listaArquivos('"+g_dirbase+d+"/"+retorno.data.diretorios[ig]+"') ><img src="+g_locaplic+"/imagens/folder-s.gif />"+retorno.data.diretorios[ig]+"</span><br><br>"; | |
267 | + ins += "<span style=cursor:pointer onclick=listaArquivos('"+g_dirbase+d+"/"+retorno.data.diretorios[ig]+"') ><img src="+g_locaplic+"/imagens/folder-s.gif />"+retorno.data.diretorios[ig]+"</span><br><br>"; | |
268 | 268 | } |
269 | 269 | ins += "<b>Arquivos:</b><br><br>"; |
270 | 270 | for (var ig=0;ig<retorno.data.arquivos.length; ig++) | ... | ... |
classesjs/dicionario.js
classesjs/i3geo.js
classesjs/i3geo_tudo_compacto47.js
... | ... | @@ -346,34 +346,34 @@ version: 2.9.0 |
346 | 346 | (function(){var c=YAHOO.util.Dom,i=YAHOO.lang,B="yui-pb",D=B+"-mask",A=B+"-bar",z=B+"-anim",q=B+"-tl",l=B+"-tr",k=B+"-bl",g=B+"-br",h="width",w="height",m="minValue",y="maxValue",j="value",a="anim",x="direction",e="ltr",t="rtl",G="ttb",s="btt",f="barEl",d="maskEl",v="ariaTextTemplate",n="animAcceleration",p="background-position",o="px",C="start",F="progress",u="complete";var r=function(b){r.superclass.constructor.call(this,document.createElement("div"),b);this._init(b)};YAHOO.widget.ProgressBar=r;r.MARKUP=['<div class="',A,'"></div><div class="',D,'"><div class="',q,'"></div><div class="',l,'"></div><div class="',k,'"></div><div class="',g,'"></div></div>'].join("");i.extend(r,YAHOO.util.Element,{_init:function(b){},initAttributes:function(I){r.superclass.initAttributes.call(this,I);this.set("innerHTML",r.MARKUP);this.addClass(B);var H,b=["id",h,w,"class","style"];while((H=b.pop())){if(H in I){this.set(H,I[H])}}this.setAttributeConfig(f,{readOnly:true,value:this.getElementsByClassName(A)[0]});this.setAttributeConfig(d,{readOnly:true,value:this.getElementsByClassName(D)[0]});this.setAttributeConfig(x,{value:e,validator:function(J){if(this._rendered){return false}switch(J){case e:case t:case G:case s:return true;default:return false}}});this.setAttributeConfig(y,{value:100,validator:i.isNumber,method:function(J){this.get("element").setAttribute("aria-valuemax",J);if(this.get(j)>J){this.set(j,J)}}});this.setAttributeConfig(m,{value:0,validator:i.isNumber,method:function(J){this.get("element").setAttribute("aria-valuemin",J);if(this.get(j)<J){this.set(j,J)}}});this.setAttributeConfig(h,{getter:function(){return this.getStyle(h)},method:this._widthChange});this.setAttributeConfig(w,{getter:function(){return this.getStyle(w)},method:this._heightChange});this.setAttributeConfig(v,{value:"{value}"});this.setAttributeConfig(j,{value:0,validator:function(J){return i.isNumber(J)&&J>=this.get(m)&&J<=this.get(y)},method:this._valueChange});this.setAttributeConfig(a,{validator:function(J){return!!YAHOO.util.Anim},setter:this._animSetter});this.setAttributeConfig(n,{value:null,validator:function(J){return i.isNumber(J)||i.isNull(J)},method:function(J){this._fixAnim(this.get(a),J)}})},render:function(H,I){if(this._rendered){return}this._rendered=true;var J=this.get(x);this.addClass(B);this.addClass(B+"-"+J);var b=this.get("element");b.tabIndex=0;b.setAttribute("role","progressbar");b.setAttribute("aria-valuemin",this.get(m));b.setAttribute("aria-valuemax",this.get(y));this.appendTo(H,I);this.redraw(false);this._previousValue=this.get(j);this._fixEdges();this.on("minValueChange",this.redraw);this.on("maxValueChange",this.redraw);return this},redraw:function(b){this._recalculateConstants();this._valueChange(this.get(j),b)},destroy:function(){this.set(a,false);this.unsubscribeAll();var b=this.get("element");if(b.parentNode){b.parentNode.removeChild(b)}},_previousValue:0,_barSpace:100,_barFactor:1,_rendered:false,_heightChange:function(b){if(i.isNumber(b)){b+=o}this.setStyle(w,b);this._fixEdges();this.redraw(false)},_widthChange:function(b){if(i.isNumber(b)){b+=o}this.setStyle(h,b);this._fixEdges();this.redraw(false)},_fixEdges:function(){if(!this._rendered||YAHOO.env.ua.ie||YAHOO.env.ua.gecko){return}var J=this.get(d),L=c.getElementsByClassName(q,undefined,J)[0],I=c.getElementsByClassName(l,undefined,J)[0],K=c.getElementsByClassName(k,undefined,J)[0],H=c.getElementsByClassName(g,undefined,J)[0],b=(parseInt(c.getStyle(J,w),10)-parseInt(c.getStyle(L,w),10))+o;c.setStyle(K,w,b);c.setStyle(H,w,b);b=(parseInt(c.getStyle(J,h),10)-parseInt(c.getStyle(L,h),10))+o;c.setStyle(I,h,b);c.setStyle(H,h,b)},_recalculateConstants:function(){var b=this.get(f);switch(this.get(x)){case e:case t:this._barSpace=parseInt(this.get(h),10)-(parseInt(c.getStyle(b,"marginLeft"),10)||0)-(parseInt(c.getStyle(b,"marginRight"),10)||0);break;case G:case s:this._barSpace=parseInt(this.get(w),10)-(parseInt(c.getStyle(b,"marginTop"),10)||0)-(parseInt(c.getStyle(b,"marginBottom"),10)||0);break}this._barFactor=this._barSpace/(this.get(y)-(this.get(m)||0))||1},_animSetter:function(I){var H,b=this.get(f);if(I){if(I instanceof YAHOO.util.Anim){H=I}else{H=new YAHOO.util.Anim(b)}H.onTween.subscribe(this._animOnTween,this,true);H.onComplete.subscribe(this._animComplete,this,true);this._fixAnim(H,this.get(n))}else{H=this.get(a);if(H){H.onTween.unsubscribeAll();H.onComplete.unsubscribeAll()}H=null}return H},_fixAnim:function(I,H){if(I){if(!this._oldSetAttribute){this._oldSetAttribute=I.setAttribute}var b=this;switch(this.get(x)){case e:I.setAttribute=function(J,L,K){L=Math.round(L);b._oldSetAttribute.call(this,J,L,K);if(J==h){b._oldSetAttribute.call(this,p,-L*H,o)}};break;case t:I.setAttribute=function(J,M,K){M=Math.round(M);b._oldSetAttribute.call(this,J,M,K);if(J==h){var L=b._barSpace-M;b._oldSetAttribute.call(this,"left",L,o);b._oldSetAttribute.call(this,p,-L+M*H,o)}};break;case G:I.setAttribute=function(J,L,K){L=Math.round(L);b._oldSetAttribute.call(this,J,L,K);if(J==w){b._oldSetAttribute.call(this,p,"center "+(-L*H),o)}};break;case s:I.setAttribute=function(J,M,K){M=Math.round(M);b._oldSetAttribute.call(this,J,M,K);if(J==w){var L=b._barSpace-M;b._oldSetAttribute.call(this,"top",L,o);b._oldSetAttribute.call(this,p,"center "+(M*H-L),o)}};break}}},_animComplete:function(){var b=this.get(j);this._previousValue=b;this.fireEvent(F,b);this.fireEvent(u,b);c.removeClass(this.get(f),z)},_animOnTween:function(b,H){var I=Math.floor(this._tweenFactor*H[0].currentFrame+this._previousValue);this.fireEvent(F,I)},_valueChange:function(J,H){var I=this.get(a),b=Math.floor((J-this.get(m))*this._barFactor);this._setAriaText(J);if(this._rendered){if(I){I.stop();if(I.isAnimated()){I._onComplete.fire()}}this.fireEvent(C,this._previousValue);r._barSizeFunctions[((H!==false)&&I)?1:0][this.get(x)].call(this,J,b,this.get(f),I)}},_setAriaText:function(H){var b=this.get("element"),I=i.substitute(this.get(v),{value:H,minValue:this.get(m),maxValue:this.get(y)});b.setAttribute("aria-valuenow",H);b.setAttribute("aria-valuetext",I)}});var E=[{},{}];r._barSizeFunctions=E;E[0][e]=function(J,b,H,I){c.setStyle(H,h,b+o);this.fireEvent(F,J);this.fireEvent(u,J)};E[0][t]=function(J,b,H,I){c.setStyle(H,h,b+o);c.setStyle(H,"left",(this._barSpace-b)+o);this.fireEvent(F,J);this.fireEvent(u,J)};E[0][G]=function(J,b,H,I){c.setStyle(H,w,b+o);this.fireEvent(F,J);this.fireEvent(u,J)};E[0][s]=function(J,b,H,I){c.setStyle(H,w,b+o);c.setStyle(H,"top",(this._barSpace-b)+o);this.fireEvent(F,J);this.fireEvent(u,J)};E[1][e]=function(J,b,H,I){c.addClass(H,z);this._tweenFactor=(J-this._previousValue)/I.totalFrames/I.duration;I.attributes={width:{to:b}};I.animate()};E[1][t]=E[1][e];E[1][G]=function(J,b,H,I){c.addClass(H,z);this._tweenFactor=(J-this._previousValue)/I.totalFrames/I.duration;I.attributes={height:{to:b}};I.animate()};E[1][s]=E[1][G]})();YAHOO.register("progressbar",YAHOO.widget.ProgressBar,{version:"2.9.0",build:"2800"}); |
347 | 347 | BalloonConfig=function(balloon,set){set=set||'';if(!balloon.configured||set=='GBubble'||set=='GBox'){balloon.fontColor='black';balloon.fontFamily='Arial, sans-serif';balloon.fontSize='12pt';balloon.minWidth=100;balloon.maxWidth=400;balloon.delayTime=750;balloon.vOffset=10;balloon.hOffset=10;balloon.stem=true;balloon.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubble';balloon.ieImage='balloon_ie.png';balloon.balloonImage='balloon.png';balloon.upLeftStem='up_left.png';balloon.downLeftStem='down_left.png';balloon.upRightStem='up_right.png';balloon.downRightStem='down_right.png';balloon.closeButton='close.png';balloon.closeButtonWidth=16;balloon.allowAJAX=true;balloon.allowIframes=true;balloon.trackCursor=true;balloon.shadow=20;balloon.padding=10;balloon.stemHeight=32;balloon.stemOverlap=3;balloon.vOffset=1;balloon.hOffset=1;balloon.opacity=0.9;balloon.configured=set||true}switch(set){case('GBoxxxx'):balloon.bgColor='whitesmoke';balloon.borderStyle='2px solid gray';balloon.padding=5;balloon.shadow=0;balloon.stem=true;balloon.opacity=0.8;balloon.hOffset=1;balloon.vOffset=1;balloon.allowFade=false;break;case('GPlain'):balloon.padding=5;balloon.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GPlain';balloon.ieImage=null;balloon.shadow=0;balloon.stemHeight=15;balloon.stemOverlap=1;balloon.opacity=0.85;break;case('GFade'):balloon.allowFade=true;balloon.fadeIn=1000;balloon.faedOut=200;break}}; |
348 | 348 | var currentBalloonClass;var balloonIsVisible;var balloonIsSticky;var balloonInvisibleSelects;var balloonIsSuppressed;var tooltipIsSuppressed;var Balloon=function(){this.trackCursor=true;var myObject=this.isIE()?window:document;myObject.onscroll=function(){Balloon.prototype.nukeTooltip()};window.onbeforeunload=function(){Balloon.prototype.nukeTooltip();balloonIsSuppressed=true};if(this.isIE()){this.suppress=true}return this};Balloon.prototype.showTooltip=function(evt,caption,sticky,width,height,x,y){if(!this.configured){BalloonConfig(this,'GBubble')}this.stopTrackingX=this.trackCursor?100:10;this.stopTrackingY=this.trackCursor?50:10;if(this.isIE()&&document.readyState.match(/complete/i)){this.suppress=false}if(this.suppress||balloonIsSuppressed){return false}if(tooltipIsSuppressed&&!sticky){return false}if(this.opacity&&this.opacity<1){this.opacity=parseInt(parseFloat(this.opacity)*100)}else if(this.opacity&&this.opacity==1){this.opacity=100}else if(!this.opacity){this.opacity==100}if(this.isKonqueror()){this.allowFade=false;this.opacity=100}if(this.isIE()&&this.allowFade){this.opacity=100}var mouseOver=true;try{var mouseOver=evt.type.match('mouseover','i')}catch(e){}if(!mouseOver){sticky=true;this.fadeOK=false;if(balloonIsVisible){this.hideTooltip()}}else{this.fadeOK=this.allowFade}if(balloonIsVisible&&!balloonIsSticky&&mouseOver){return false}if(balloonIsVisible&&balloonIsSticky&&!sticky){return false}try{var el=this.getEventTarget(evt)}catch(e){var el=evt}if(sticky&&mouseOver&&this.isSameElement(el,this.currentElement)){return false}this.currentElement=el;this.elCoords=this.getLoc(el,'region');if(!sticky){var mouseoutFunc=el.onmouseout;var closeBalloon=function(){Balloon.prototype.hideTooltip();if(mouseoutFunc){mouseoutFunc()}};if(!mouseOver){el.onmouseup=function(){return false}}}balloonIsSticky=sticky;this.hideTooltip();this.currentHelpText=this.getAndCheckContents(caption);if(!this.currentHelpText){return false}this.width=width+"px";this.height=height+"px";this.actualWidth=null;this.x=x;this.y=y;this.hideTooltip();this.container=document.createElement('div');this.container.id='balloonPreloadContainer';document.body.appendChild(this.container);this.setStyle(this.container,'position','absolute');this.setStyle(this.container,'top',-8888);this.setStyle(this.container,'font-family',this.fontFamily);this.setStyle(this.container,'font-size',this.fontSize);this.currentHelpText=this.currentHelpText.replace(/\&/g,'&amp');this.container.innerHTML=unescape(this.currentHelpText);if(this.images){this.balloonImage=this.balloonImage?this.images+'/'+this.balloonImage:false;this.ieImage=this.ieImage?this.images+'/'+this.ieImage:false;this.upLeftStem=this.upLeftStem?this.images+'/'+this.upLeftStem:false;this.upRightStem=this.upRightStem?this.images+'/'+this.upRightStem:false;this.downLeftStem=this.downLeftStem?this.images+'/'+this.downLeftStem:false;this.downRightStem=this.downRightStem?this.images+'/'+this.downRightStem:false;this.closeButton=this.closeButton?this.images+'/'+this.closeButton:false;this.images=false}if(this.ieImage&&(this.isIE()||this.isChrome())){if(this.isOldIE()||this.opacity||this.allowFade){this.balloonImage=this.ieImage}}if(!this.preloadedImages){var images=[this.balloonImage,this.closeButton];if(this.ieImage){images.push(this.ieImage)}if(this.stem){images.push(this.upLeftStem,this.upRightStem,this.downLeftStem,this.downRightStem)}var len=images.length;for(var i=0;i<len;i++){if(images[i]){this.preload(images[i])}}this.preloadedImages=true}currentBalloonClass=this;if(!mouseOver)el.onmouseup=function(){return false};this.currentEvent=evt;evt.cancelBubble=true;this.setActiveCoordinates([]);this.doShowTooltip();this.pending=true};Balloon.prototype.preload=function(src){var i=new Image;i.src=src;this.setStyle(i,'position','absolute');this.setStyle(i,'top',-8000);document.body.appendChild(i);document.body.removeChild(i)};Balloon.prototype.doShowTooltip=function(){var self=currentBalloonClass;if(balloonIsVisible){return false}if(!self.parent){if(self.parentID){self.parent=document.getElementById(self.parentID)}else{self.parent=document.body}self.xOffset=self.getLoc(self.parent,'x1');self.yOffset=self.getLoc(self.parent,'y1')}window.clearTimeout(self.timeoutFade);if(!balloonIsSticky){self.setStyle('visibleBalloonElement','display','none')}self.parseIntAll();var balloon=self.makeBalloon();var pageWidth=YAHOO.util.Dom.getViewportWidth();var pageCen=Math.round(pageWidth/2);var pageHeight=YAHOO.util.Dom.getViewportHeight();var pageLeft=YAHOO.util.Dom.getDocumentScrollLeft();var pageTop=YAHOO.util.Dom.getDocumentScrollTop();var pageMid=pageTop+Math.round(pageHeight/2);self.pageBottom=pageTop+pageHeight;self.pageTop=pageTop;self.pageLeft=pageLeft;self.pageRight=pageLeft+pageWidth;var vOrient=self.activeTop>pageMid?'up':'down';var hOrient=self.activeRight>pageCen?'left':'right';var helpText=self.container.innerHTML;self.actualWidth=self.getLoc(self.container,'width');if(!isNaN(self.actualWidth)){self.actualWidth+=10}self.parent.removeChild(self.container);var wrapper=document.createElement('div');wrapper.id='contentWrapper';self.contents.appendChild(wrapper);wrapper.innerHTML=helpText;self.setBalloonStyle(vOrient,hOrient,pageWidth,pageLeft);if(balloonIsSticky){self.addCloseButton()}balloonIsVisible=true;self.pending=false;self.showHide();self.startX=self.activeLeft;self.startY=self.activeTop;self.fade(0,self.opacity,self.fadeIn)};Balloon.prototype.addCloseButton=function(){var self=currentBalloonClass;var margin=Math.round(self.padding/2);var closeWidth=self.closeButtonWidth||16;var balloonTop=self.getLoc('visibleBalloonElement','y1')+margin+self.shadow;var BalloonLeft=self.getLoc('topRight','x2')-self.closeButtonWidth-self.shadow-margin;var closeButton=document.getElementById('closeButton');if(!closeButton){closeButton=new Image;closeButton.setAttribute('id','closeButton');closeButton.setAttribute('src',self.closeButton);closeButton.onclick=function(){Balloon.prototype.nukeTooltip();var temp=$i('marcaIdentifica');if(temp){temp.parentNode.removeChild(temp)}};self.setStyle(closeButton,'position','absolute');document.body.appendChild(closeButton)}if(self.isIE()){BalloonLeft=BalloonLeft-5}self.setStyle(closeButton,'top',balloonTop);self.setStyle(closeButton,'left',BalloonLeft);self.setStyle(closeButton,'display','inline');self.setStyle(closeButton,'cursor','pointer');self.setStyle(closeButton,'z-index',999999999)};Balloon.prototype.makeBalloon=function(){var self=currentBalloonClass;var balloon=document.getElementById('visibleBalloonElement');if(balloon){self.hideTooltip()}balloon=document.createElement('div');balloon.setAttribute('id','visibleBalloonElement');self.parent.appendChild(balloon);self.activeBalloon=balloon;self.parts=new Array();var parts=new Array('contents','topRight','bottomRight','bottomLeft');for(var i=0;i<parts.length;i++){var child=document.createElement('div');child.setAttribute('id',parts[i]);balloon.appendChild(child);if(parts[i]=='contents')self.contents=child;self.parts.push(child)}if(self.displayTime){self.timeoutAutoClose=window.setTimeout(this.hideTooltip,self.displayTime)}return balloon};Balloon.prototype.setBalloonStyle=function(vOrient,hOrient,pageWidth,pageLeft){var self=currentBalloonClass;var balloon=self.activeBalloon;if(typeof(self.shadow)!='number')self.shadow=0;if(!self.stem)self.stemHeight=0;var fullPadding=self.padding+self.shadow;var insidePadding=self.padding;var outerWidth=self.actualWidth+fullPadding;var innerWidth=self.actualWidth;self.setStyle(balloon,'position','absolute');self.setStyle(balloon,'top',-9999);self.setStyle(balloon,'z-index',1000000);if(self.height){self.setStyle('contentWrapper','height',self.height-fullPadding)}if(self.width){self.setStyle(balloon,'width',self.width);innerWidth=self.width-fullPadding;if(balloonIsSticky){innerWidth-=self.closeButtonWidth}self.setStyle('contentWrapper','width',innerWidth)}else{self.setStyle(balloon,'width',outerWidth);self.setStyle('contentWrapper','width',innerWidth)}if(!self.width&&self.maxWidth&&outerWidth>self.maxWidth){self.setStyle(balloon,'width',self.maxWidth);self.setStyle('contentWrapper','width',self.maxWidth-fullPadding)}if(!self.width&&self.minWidth&&outerWidth<self.minWidth){self.setStyle(balloon,'width',self.minWidth);self.setStyle('contentWrapper','width',self.minWidth-fullPadding)}self.setStyle('contents','z-index',2);self.setStyle('contents','color',self.fontColor);self.setStyle('contents','font-family',self.fontFamily);self.setStyle('contents','font-size',self.fontSize);self.setStyle('contents','background','url('+self.balloonImage+') top left no-repeat');self.setStyle('contents','padding-top',fullPadding);self.setStyle('contents','padding-left',fullPadding);self.setStyle('bottomRight','background','url('+self.balloonImage+') bottom right no-repeat');self.setStyle('bottomRight','position','absolute');self.setStyle('bottomRight','right',0-fullPadding);self.setStyle('bottomRight','bottom',0-fullPadding);self.setStyle('bottomRight','height',fullPadding);self.setStyle('bottomRight','width',fullPadding);self.setStyle('bottomRight','z-index',-1);self.setStyle('topRight','background','url('+self.balloonImage+') top right no-repeat');self.setStyle('topRight','position','absolute');self.setStyle('topRight','right',0-fullPadding);self.setStyle('topRight','top',0);self.setStyle('topRight','width',fullPadding);self.setStyle('bottomLeft','background','url('+self.balloonImage+') bottom left no-repeat');self.setStyle('bottomLeft','position','absolute');self.setStyle('bottomLeft','left',0);self.setStyle('bottomLeft','bottom',0-fullPadding);self.setStyle('bottomLeft','height',fullPadding);self.setStyle('bottomLeft','z-index',-1);if(this.stem){var stem=document.createElement('img');stem.style.zIndex=50000;self.setStyle(stem,'position','absolute');balloon.appendChild(stem);if(vOrient=='up'&&hOrient=='left'){stem.src=self.upLeftStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='down'&&hOrient=='left'){stem.src=self.downLeftStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='up'&&hOrient=='right'){stem.src=self.upRightStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'left',self.shadow)}else if(vOrient=='down'&&hOrient=='right'){stem.src=self.downRightStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'left',self.shadow)}if(self.fadeOK&&self.isIE()){self.parts.push(stem)}}if(self.allowFade){self.setOpacity(1)}else if(self.opacity){self.setOpacity(self.opacity)}if(hOrient=='left'){var pageWidth=self.pageRight-self.pageLeft;var activeRight=pageWidth-self.activeLeft;self.setStyle(balloon,'right',activeRight)}else{var activeLeft=self.activeRight-self.xOffset;self.setStyle(balloon,'left',activeLeft)}var overflow=balloonIsSticky?'auto':'hidden';self.setStyle('contentWrapper','overflow',overflow);if(balloonIsSticky){self.setStyle('contentWrapper','margin-right',self.closeButtonWidth)}var balloonLeft=self.getLoc(balloon,'x1');var balloonRight=self.getLoc(balloon,'x2');var scrollBar=20;if(hOrient=='right'&&balloonRight>(self.pageRight-fullPadding)){var width=(self.pageRight-balloonLeft)-fullPadding-scrollBar;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}else if(hOrient=='left'&&balloonLeft<(self.pageLeft+fullPadding)){var width=(balloonRight-self.pageLeft)-fullPadding;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}var balloonWidth=self.getLoc(balloon,'width');var balloonHeight=self.getLoc(balloon,'height');var vOverlap=self.isOverlap('topRight','bottomRight');var hOverlap=self.isOverlap('bottomLeft','bottomRight');if(vOverlap){self.setStyle('topRight','height',balloonHeight-vOverlap[1])}if(hOverlap){self.setStyle('bottomLeft','width',balloonWidth-hOverlap[0])}if(vOrient=='up'){var activeTop=self.activeTop-balloonHeight;self.setStyle(balloon,'top',activeTop)}else{var activeTop=self.activeBottom;self.setStyle(balloon,'top',activeTop)}var balloonTop=self.getLoc(balloon,'y1');var balloonBottom=self.height?balloonTop+self.height:self.getLoc(balloon,'y2');var deltaTop=balloonTop<self.pageTop?self.pageTop-balloonTop:0;var deltaBottom=balloonBottom>self.pageBottom?balloonBottom-self.pageBottom:0;if(vOrient=='up'&&deltaTop){var newHeight=balloonHeight-deltaTop;if(newHeight>(self.padding*2)){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'top',self.pageTop+self.padding);self.setStyle(balloon,'height',newHeight)}}if(vOrient=='down'&&deltaBottom){var newHeight=balloonHeight-deltaBottom-scrollBar;if(newHeight>(self.padding*2)+scrollBar){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'height',newHeight)}}var iframe=balloon.getElementsByTagName('iframe');if(iframe[0]){iframe=iframe[0];var w=self.getLoc('contentWrapper','width');if(balloonIsSticky&&!this.isIE()){w-=self.closeButtonWidth}var h=self.getLoc('contentWrapper','height');self.setStyle(iframe,'width',w);self.setStyle(iframe,'height',h);self.setStyle('contentWrapper','overflow','hidden')}self.setStyle('topRight','height',self.getLoc(balloon,'height'));self.setStyle('bottomLeft','width',self.getLoc(balloon,'width'));self.hOrient=hOrient;self.vOrient=vOrient};Balloon.prototype.fade=function(opacStart,opacEnd,millisec){var self=currentBalloonClass||new Balloon;if(!millisec||!self.allowFade){return false}opacEnd=opacEnd||100;var speed=Math.round(millisec/100);var timer=0;for(o=opacStart;o<=opacEnd;o++){self.timeoutFade=setTimeout('Balloon.prototype.setOpacity('+o+')',(timer*speed));timer++}};Balloon.prototype.setOpacity=function(opc){var self=currentBalloonClass;if(!self||!opc)return false;var o=parseFloat(opc/100);var parts=self.isIE()?self.parts:[self.activeBalloon];var len=parts.length;for(var i=0;i<len;i++){self.doOpacity(o,opc,parts[i])}};Balloon.prototype.doOpacity=function(op,opc,el){var self=currentBalloonClass;if(!el)return false;self.setStyle(el,'opacity',op);self.setStyle(el,'filter','alpha(opacity='+opc+')');self.setStyle(el,'MozOpacity',op);self.setStyle(el,'KhtmlOpacity',op)};Balloon.prototype.nukeTooltip=function(){this.hideTooltip(1)};Balloon.prototype.hideTooltip=function(override){if(override&&typeof override=='object')override=false;if(balloonIsSticky&&!override)return false;var self=currentBalloonClass;Balloon.prototype.showHide(1);Balloon.prototype.cleanup();if(self){window.clearTimeout(self.timeoutTooltip);window.clearTimeout(self.timeoutFade);window.clearTimeout(self.timeoutAutoClose);if(balloonIsSticky){self.currentElement=null}self.startX=0;self.startY=0}balloonIsVisible=false;balloonIsSticky=false};Balloon.prototype.cleanup=function(){var self=currentBalloonClass;var body;if(self){body=self.parent?self.parent:self.parentID?document.getElementById(self.parentID)||document.body:document.body}else{body=document.body}var bubble=document.getElementById('visibleBalloonElement');var close=document.getElementById('closeButton');var cont=document.getElementById('balloonPreloadContainer');if(bubble){body.removeChild(bubble)}if(close){body.removeChild(close)}if(cont){body.removeChild(cont)}};hideAllTooltips=function(){var self=currentBalloonClass;if(!self)return;window.clearTimeout(self.timeoutTooltip);if(self.activeBalloon)self.setStyle(self.activeBalloon,'display','none');balloonIsVisible=false;balloonIsSticky=false;currentBalloonClass=null};Balloon.prototype.setActiveCoordinates=function(evt){var self=currentBalloonClass;if(!self){return true}var evt=evt||window.event||self.currentEvent;if(!evt){return true}self.currentEvent={};for(var i in evt){self.currentEvent[i]=evt[i]}self.hOffset=self.hOffset||1;self.vOffset=self.vOffset||1;self.stemHeight=self.stem&&self.stemHeight?(self.stemHeight||0):0;var scrollTop=0;var scrollLeft=0;var XY=[self.x,self.y];var adjustment=self.hOffset<20?10:0;self.activeTop=scrollTop+XY[1]-adjustment-self.vOffset-self.stemHeight;self.activeLeft=scrollLeft+XY[0]-adjustment-self.hOffset;self.activeRight=scrollLeft+XY[0];self.activeBottom=scrollTop+XY[1]+self.vOffset+2*adjustment;if(balloonIsVisible&&!balloonIsSticky){var deltaX=Math.abs(self.activeLeft-self.startX);var deltaY=Math.abs(self.activeTop-self.startY);if(XY[0]<self.elCoords.left||XY[0]>self.elCoords.right||XY[1]<self.elCoords.top||XY[1]>self.elCoords.bottom){}if(deltaX>self.stopTrackingX||deltaY>self.stopTrackingY){}else if(self.trackCursor){var b=self.activeBalloon;var bwidth=self.getLoc(b,'width');var bheight=self.getLoc(b,'height');var btop=self.getLoc(b,'y1');var bleft=self.getLoc(b,'x1');if(self.hOrient=='right'){self.setStyle(b,'left',self.activeRight)}else if(self.hOrient=='left'){self.setStyle(b,'right',null);var newLeft=self.activeLeft-bwidth;self.setStyle(b,'left',newLeft)}if(self.vOrient=='up'){self.setStyle(b,'top',self.activeTop-bheight)}else if(self.vOrient=='down'){self.setStyle(b,'top',self.activeBottom)}}}return true};Balloon.prototype.eventXY=function(event){var XY=new Array(2);var e=event||window.event;if(!e){return false}if(e.pageX||e.pageY){XY[0]=e.pageX;XY[1]=e.pageY;return XY}else if(e.clientX||e.clientY){XY[0]=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;XY[1]=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;return XY}};Balloon.prototype.getEventTarget=function(event){var targ;var e=event||window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)targ=targ.parentNode;return targ};Balloon.prototype.setStyle=function(el,att,val){if(!el){return false}if(typeof(el)!='object'){el=document.getElementById(el)}if(!el){return false}var v=val;if(val&&att.match(/left|top|bottom|right|width|height|padding|margin/)){val=new String(val);if(!val.match(/auto/)){val+='px'}}if(att=='z-index'){if(el.style){el.style.zIndex=parseInt(val)}}else{if(this.isIE()&&att.match(/^left|right|top|bottom$/)&&!parseInt(val)&&val!=0){val=null}YAHOO.util.Dom.setStyle(el,att,val)}};Balloon.prototype.getLoc=function(el,request){var region=YAHOO.util.Dom.getRegion(el);switch(request){case('y1'):return parseInt(region.top);case('y2'):return parseInt(region.bottom);case('x1'):return parseInt(region.left);case('x2'):return parseInt(region.right);case('width'):return(parseInt(region.right)-parseInt(region.left));case('height'):return(parseInt(region.bottom)-parseInt(region.top));case('region'):return region}return region};Balloon.prototype.parseIntAll=function(){this.padding=parseInt(this.padding);this.shadow=parseInt(this.shadow);this.stemHeight=parseInt(this.stemHeight);this.stemOverlap=parseInt(this.stemOverlap);this.vOffset=parseInt(this.vOffset);this.delayTime=parseInt(this.delayTime);this.width=parseInt(this.width);this.maxWidth=parseInt(this.maxWidth);this.minWidth=parseInt(this.minWidth);this.fadeIn=parseInt(this.fadeIn)||1000};Balloon.prototype.showHide=function(visible){var self=currentBalloonClass||new Balloon;if(self.isOldIE()){var balloonContents=document.getElementById('contentWrapper');if(!visible&&balloonContents){var balloonSelects=balloonContents.getElementsByTagName('select');var myHash=new Object();for(var i=0;i<balloonSelects.length;i++){var id=balloonSelects[i].id||balloonSelects[i].name;myHash[id]=1}balloonInvisibleSelects=new Array();var allSelects=document.getElementsByTagName('select');for(var i=0;i<allSelects.length;i++){var id=allSelects[i].id||allSelects[i].name;if(self.isOverlap(allSelects[i],self.activeBalloon)&&!myHash[id]){balloonInvisibleSelects.push(allSelects[i]);self.setStyle(allSelects[i],'visibility','hidden')}}}else if(balloonInvisibleSelects){for(var i=0;i<balloonInvisibleSelects.length;i++){var id=balloonInvisibleSelects[i].id||balloonInvisibleSelects[i].name;self.setStyle(balloonInvisibleSelects[i],'visibility','visible')}balloonInvisibleSelects=null}}if(self.hide){var display=visible?'inline':'none';for(var n=0;n<self.hide.length;n++){if(self.isOverlap(self.activeBalloon,self.hide[n])){self.setStyle(self.hide[n],'display',display)}}}};Balloon.prototype.isOverlap=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');if(!R1||!R2)return false;var intersect=R1.intersect(R2);if(intersect){intersect=new Array((intersect.right-intersect.left),(intersect.bottom-intersect.top))}return intersect};Balloon.prototype.isSameElement=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');var same=R1.contains(R2)&&R2.contains(R1);return same?true:false};Balloon.prototype.getAndCheckContents=function(caption){this.currentHelpText=this.getContents(caption);this.loadedFromElement=false;return this.currentHelpText};Balloon.prototype.getContents=function(section){if(!this.helpUrl&&!this.activeUrl)return section;if(this.loadedFromElement)return section;var url=this.activeUrl||this.helpUrl;url+=this.activeUrl?'':'?section='+section;this.activeUrl=null;var ajax;if(window.XMLHttpRequest){ajax=new XMLHttpRequest()}else{ajax=new ActiveXObject("Microsoft.XMLHTTP")}if(ajax){ajax.open("GET",url,false);ajax.onreadystatechange=function(){};try{ajax.send(null)}catch(e){}var txt=this.escapeHTML?escape(ajax.responseText):ajax.responseText;return txt||section}else{return section}};Balloon.prototype.isIE=function(){return document.all&&!window.opera};Balloon.prototype.isOldIE=function(){if(navigator.appVersion.indexOf("MSIE")==-1)return false;var temp=navigator.appVersion.split("MSIE");return parseFloat(temp[1])<7};Balloon.prototype.isKonqueror=function(){return navigator.userAgent.toLowerCase().indexOf('konqueror')!=-1};Balloon.prototype.isChrome=function(){return navigator.userAgent.toLowerCase().indexOf('chrome')>-1}; |
349 | -i3GEOF=[];YAHOO.namespace("i3GEO");i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",tamanhodoc:[],temaAtivo:"",contadorAtualiza:0,cria:function(){if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}var temp,tamanho;temp=window.location.href.split("?");if(temp[1]){i3GEO.configura.sid=temp[1];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}if(i3GEO.Interface.ALTTABLET!=""){if(i3GEO.util.detectaTablet()){return}}if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])},inicia:function(retorno){var montaMapa,mashup,tamanho;if(typeof("i3GEOmantemCompatibilidade")==='function'){i3GEOmantemCompatibilidade()}montaMapa=function(retorno){try{var temp,abreJM;if(retorno===""){alert("Ocorreu um erro no mapa - montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;if(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width,10)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}i3GEO.Interface.inicia()}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if($i("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}abreJM="sim";if(i3GEO.util.pegaCookie("botoesAjuda")){abreJM=i3GEO.util.pegaCookie("botoesAjuda");i3GEO.barraDeBotoes.AJUDA=(abreJM==="sim")?true:false}if(i3GEO.configura.iniciaJanelaMensagens===true){i3GEO.ajuda.abreJanela()}if(i3GEO.configura.liberaGuias.toLowerCase()==="sim"){i3GEO.guias.libera()}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if(i3GEO.configura.sid===""){mashup=function(retorno){i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}if(i3GEO.mapa.AUTORESIZE===true){i3GEO.mapa.ativaAutoResize()}},aposIniciar:function(){if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.inicia()}},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(retorno===""){corpoMapa.call();return}if(!retorno.data){alert(retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.Interface.redesenha();if($i("i3GEOidentificalistaTemas")){g_tipoacao="identifica";g_operacao='identifica'}else{g_operacao=""}if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+retorno.data.variaveis.tempo,"");temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[YAHOO.util.Dom.getViewportWidth(),YAHOO.util.Dom.getViewportHeight()];Dw=YAHOO.util.Dom.getDocumentWidth();Dh=YAHOO.util.Dom.getDocumentHeight();novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i("mst");if(temp){temp.style.width="100%"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;i3GEO.php.mudatamanho(i3GEO.atualiza,h,w);switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();break}if(i3GEO.guias.TIPO==="sanfona"){i3GEO.guias.ALTURACORPOGUIAS=h-(antigoh-i3GEO.guias.ALTURACORPOGUIAS)}else{i3GEO.guias.ALTURACORPOGUIAS=h}return[w,h]},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}}; | |
350 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/á|à |ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/Ã/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<input onchange=\""+onch+"\" tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.ResizePanel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas,n,nome="";if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td> <input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value=' ' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value=' ' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento,nx="",texto="Cor",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.ResizePanel(id,{height:"480px",modal:false,width:"380px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versao adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)}; | |
351 | -g_traducao={"p1":[{pt:"O i3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre. <a href='http://mapas.mma.gov.br/download' target=blank > Download</a>",it:"I3geo é un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Subtítulo",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tamaño",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable surrounding",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable logo",es:"Activar/desactivar logomarca",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da seleção",en:"Selection color",es:"Color de la selección",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color del fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grado de coordenadas",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Template",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprieta"}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Image map format",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Base layers",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Subtitulo",it:"Attiva legenda"}],"p18":[{pt:"Não imprime a legenda",en:"Disable legend",es:"Desactivar Subtitulo",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",en:"Enables or disables the legend of a theme in the print option on the map",es:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",it:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa"}],"p20":[{pt:"Tela remota",en:"Remote screen",es:"Tela remota",it:"Tela remota"}],"p21":[{pt:"Animação",en:"Animation",es:"Animación",it:"Animation"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"Análise",en:"Analysis",es:"Análisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprieta"}],"u1":[{pt:"Sobre o i3Geo",en:"About i3Geo",es:"Sobre i3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos códigos",en:"Doc. of the codes",es:"Doc. de los códigos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u4a":[{pt:"Manual do usuário",en:"User manual",es:"Manual do usuário",it:"Manual do usuário"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software público",en:"Software público",es:"Software público",it:"Software pubblico"}],"u5b":[{pt:"Lista de funções",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometrías",it:"Geometrie"}],"u7":[{pt:"Grade de poligonos",en:"Polygon grid",es:"Grado de polígonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grado de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hexágonos",en:"Grid of Hexagons",es:"Grado de hexágonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Entorno (Buffer)",it:"Buffer"}],"u11":[{pt:"Centróide",en:"Centroid",es:"Centro geométrico",it:"Baricentro"}],"u11a":[{pt:"Distância entre pontos",en:"Point distance",es:"Distancia de puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N point in polygon",es:"N puntos en polígono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en polígono/matriz",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribuição de pontos",en:"Point distribution",es:"Distribución de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u15a":[{pt:"Ferramentas",en:"Tools",es:"Herramientas",it:"Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Tomar imágenes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grado",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Polígono",en:"Polygon",es:"Poligonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolv",es:"Dissolve",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupa",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro médio",en:"Mean center",es:"Centro médio",it:"Centro médio"}],"u29":[{pt:"Editor vetorial",en:"Vector editor",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui ou clique para excluir",en:"Drag the layer here to remove",es:"Arrastre el tema aqui ó haga clic para excluir",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",en:"Filters the list of layers",es:"filtra a lista de camadas",it:"filtra a lista de camadas"}],"t2b":[{pt:"Abre a legenda do mapa",en:"Opens the map legend",es:"Abre a legenda do mapa",it:"Abre a legenda do mapa"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Turn the layer on/off on the map. Wait a few moments to get the map redesigned or press the button to apply it.",es:"Haga clic para conectar o desconectar este tema, mostrándolo o no en el mapa. Después de alterar el estado del tema, espere algunos instantes para que el mapa sea rediseñado, o haga clic en el botón aplicar que se mostrará.",it:"Fare clic per attivare o disattivare questo tema. Dopo aver modificato lo stato del tema, La mappa aggiornata sar� visualizzata dopo qualche istante. Per visualizzare subito cliccare su Applica"}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn all layers on",es:"Haga clic para conectar los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn all layers off",es:"Haga clic para desconectar los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa seleção",en:"Clear selection",es:"Limpia la selección",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a seleção",en:"Zoom to selection",es:"Zoom a la selección",it:"Zoom della selezione"}],"t5":[{pt:"Limpa seleção existente nesse tema",en:"Clear selection",es:"Limpia la selección existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download in shapefile format",es:"Haga clic para hacer el download",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"dragging or wait",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the draw order",es:"Arrastre para cambiar la orden",it:"Trascina per modificare l'ordine"}],"t9":[{pt:"A escala do tema é compatível com a escala do mapa",en:"The scale of the layer is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema � compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema é incompatível com a escala do mapa",en:"The scale of the layer is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema � incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema não é conhecida",en:"The scale of the layer is not known",es:"La escala del tema no es conocida",it:"La scala del tema non � conosciuta"}],"t12":[{pt:"excluir",en:"delete",es:"Excluir",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"up",es:"Sube",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Drag the layer up",es:"Haga clic para subir ese tema en la orden de diseño",it:"Clicca per sollevare questo tema nell�ordine di progettazione"}],"t15":[{pt:"desce",en:"down",es:"Baja",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Drag the layer down",es:"Haga clic para bajar este tema en la orden de diseño",it:"Clicca per scendere questo tema nell�ordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"zoom to a layer",es:"Zoom para el tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Click to adjust the map in order to show the whole layer",es:"Haga clic para ajustar el mapa de forma para que muestre todo el tema",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Opções e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Subtitulo",it:"Legenda"}],"t19":[{pt:"Altera a transparência do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency.",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati pi� bassi siano visti"}],"t20":[{pt:"Opacidade",en:"Opacity",es:"Opacidad",it:"Opacit�"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Change layer name.",es:"Cambia el nombre actual del tema. Utilice para mejorar el subtitulo del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema con base en sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts on the subject, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Texto...",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que serão mostradas quando o mouse é estacionado sobre um elemento desse tema.",en:"Set the tooltips that will be shown when the mouse is over the element of that layer.",es:"Defina las etiquetas que se mostrarán cuando el ratón se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Tooltip...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informações, com base na tabela de atributos.",en:"Filter based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtro...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to that layer.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table...",es:"Tabla...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a alteração da forma de representação desse tema.",en:"Opens the editor of legend, allowing the modification of the form of representation of this theme.",es:"Abre el editor de subtítulo, permitiendo la alteración de la forma de representación de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Legend edit...",es:"Editar subtítulo...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"The data shows that layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompaña el ratón",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Muestra en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema visível apenas em determinadas escalas",en:"the layer is visible in specific scales",es:"capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gráfico",en:"Graphic",es:"Gráfico",it:"Grafico"}],"t37a":[{pt:"Tema com gráficos",en:"Theme chart",es:"Gráfico",it:"Grafico"}],"t37b":[{pt:"Gráfico interativo",en:"Interactive chart",es:"Gráfico",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padrão SLD.",en:"Export the legend to SLD.",es:"Exporta a legenda para o padrão SLD.",it:"Exporta a legenda para o padrão SLD."}],"t39":[{pt:"Exportar SLD",en:"SLD...",es:"SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Open the tool that lets you change the SQL data access",es:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"SQL...",es:"SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain...",es:"Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"SLD apply...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comment",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Most popular",es:"Mais populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",en:"Interval in seconds after which the layer will be updated. To ignore, leave blank",es:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",it:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizador"}],"t49":[{pt:"Mapa temático 3d",en:"Thematic map 3d",es:"Mapa temático 3d",it:"Mapa temático 3d"}],"a1":[{pt:"procurar tema:",en:"search layer:",es:"Buscar datos:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Upload de shape file",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload dbf or CSV file",es:"Upload de archivo dbf o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Download de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Web Map Context (WMC) Importer",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"WMS server connection",es:"Conectar con el servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"WMS-T server connection",es:"Conectar con el servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"GeoRss connection",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Click to connect or disconnect layer, showing it or not on the map. After changing the layer status, wait a few moments to be redesigned the map, or click in the button apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostrándolo o no en el mapa. Después de alterar el estado del tema, espere algunos instantes para que el mapa sea rediseñado, o haga clic en el botón aplicar que aparecerá",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verr� visualizzato."}],"a9":[{pt:"fonte",en:"font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"código:",en:"code",es:"Código",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir no Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Upload SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"a15":[{pt:"Conexões",en:"Conections",es:"Conexões",it:"Conexões"}],"a16":[{pt:"Serviços",en:"Services",es:"Servicios",it:"Servers"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Catálogo",en:"Catalog",es:"Catalogo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agrega",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Subtítulo",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca rápida",en:"Quick search",es:"Búsqueda rápida",it:"Ricerca rapida"}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"dinâmico",en:"dynamic",es:"Dinámico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz´-lo no mapa. O centro do mapa ser´ deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazará para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrangência geográfica da inicialização.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajustándola para mostrar la misma área geográfica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d2t":[{pt:"enquadramento inicial",en:"initial extent",es:"enquadramento inicial",it:"enquadramento inicial"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a região indicada por um retângulo. Após ativada, clique e arraste o mouse sobre o mapa na área de zoom desejada.",en:"Extends the map - place the clicked point in the center of the screen or extends the region indicated by a rectangular.After enabled, click and drag the mouse over the map in the area of zoom desired.",es:"Amplía el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o amplía la región indicada por un rectángulo. Después de activarla, haga clic y arrastre el ratón sobre el mapa en el área de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nell�area di zoom desiderata."}],"d3t":[{pt:"clique e arraste para ampliar",en:"click and drag to enlarge",es:"clique e arraste para ampliar",it:"clique e arraste para ampliar"}],"d4":[{pt:"Desloca a região visível no mapa. Após ativada, clique e arraste o mouse sobre o mapa para deslocar a região visível.",en:"Shifts the region visible on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desloca la región visible en el mapa",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d4t":[{pt:"clique e arraste para deslocar",en:"click and drag to move",es:"clique e arraste para deslocar",it:"clique e arraste para deslocar"}],"d5":[{pt:"Amplia o mapa tendo como referência o centro atual.",en:"Magnify the map with the reference the current center.",es:"Amplía el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d5t":[{pt:"aproximar",en:"zoom in",es:"aproximar",it:"aproximar"}],"d6":[{pt:"Reduz o mapa tendo como referência o centro atual.",en:"Reduces the map as having reference the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d6t":[{pt:"afastar",en:"zoom out",es:"afastar",it:"afastar"}],"d7":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on it.",es:"Muestra información sobre un punto en el mapa. Después de activarla haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7t":[{pt:"clique para identificar",en:"click to identify",es:"clique para identificar",it:"clique para identificar"}],"d7a":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. Once activated, stop the mouse for a few moments at the desired point or click on it.",es:"Muestra información sobre un punto en el mapa. Después de activarla, pare el ratón por algunos instantes en el punto deseado o haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d7at":[{pt:"etiqueta",en:"label",es:"etiqueta",it:"etiqueta"}],"d8":[{pt:"Mostra a extensão geográfica atual em coordenadas geográficas",en:"It shows the extent of current geographic coordinates",es:"Muestra la extensión geográfica actual en coordenadas geográficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d8t":[{pt:"extensão atual",en:"total extent",es:"extensão atual",it:"extensão atual"}],"d9":[{pt:"Abre/fecha o mapa de referência",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d9t":[{pt:"mapa de referência",en:"reference map",es:"mapa de referência",it:"mapa de referência"}],"d10":[{pt:"Digite o novo valor de escala e clique no botão aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el botón aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrangência atual do mapa. Faça um zoom no mapa antes de abrir essa opção. Regiôes muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current scope of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very long search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opción. Regiones muy extensas pueden ocasionar una búsqueda muy lenta",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dell�apertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d11t":[{pt:"buscar na Wikipédia",en:"search in Wikipédia",es:"buscar na Wikipédia",it:"buscar na Wikipédia"}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usuário no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3d",en:"Generates file for 3d",es:"Genera archivo para 3d",it:"Genera file per 3d"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de satélite da região vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region's main views on the map",es:"Abre Google Maps, mostrando una imagen de satélite de la región en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d15t":[{pt:"Google Maps",en:"Google Maps",es:"Google Maps",it:"Google Maps"}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Busca documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d16t":[{pt:"Scielo",en:"Scielo",es:"Scielo",it:"Scielo"}],"d17":[{pt:"Projeto Confluence. Pontos de intersecção de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersección de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d17t":[{pt:"confluências",en:"confluences",es:"confluências",it:"confluências"}],"d18":[{pt:"Abre lente de ampliação",en:"Opens lens to expansion",es:"Abre lente de ampliación",it:"Apri lente di ingrandimento"}],"d18t":[{pt:"lente",en:"lens",es:"lente",it:"lente"}],"d19":[{pt:"Coloca as guias em uma janela móvel",en:"Open the tabs in a window mobile",es:"Coloca las guías en una ventana móvil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configuraçôes iniciais.",en:"Reload the map with the initial configurations.",es:"Rediseña el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d20t":[{pt:"reinicia",en:"restart",es:"reinicia",it:"reinicia"}],"d21":[{pt:"Mede a distância entre dois ou mais pontos clicados no mapa (menor distância). O cálculo de distância é aproximado e sua precisão depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (less distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o más puntos marcados en el mapa (menor distancia). El cálculo de distancia es aproximado y su precisión depende de la escala del mapa",it:"Misura la distanza tra due o pi� punti cliccati sulla mappa (minore distanza). Il calcolo della distanza � approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21t":[{pt:"distância",en:"distance",es:"distância",it:"dist�ncia"}],"d21a":[{pt:"Mede a área de um polígono desenhado na tela. O cálculo de área é aproximado e sua precisão depende da escala do mapa.",en:"It measures the area on the map. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mede a área de um polígono desenhado na tela. O cálculo de área é aproximado e sua precisão depende da escala do mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie � approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21at":[{pt:"área",en:"area",es:"área",it:"área"}],"d22":[{pt:"Insere pontos no mapa em coordenadas geográficas. Ospontos incluídos podem ser transformados em linhas ou polígonos. Os pontos são armazenados em um tema temporário, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. Items included can be converted into lines or polygons. Items are stored in a temporary layer, can be to download shapefile.",es:"Inserte puntos en el mapa en coordenadas geográficas. Los puntos incluidos pueden transformarse en líneas o polígonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse el download del archivo shapefile.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilit� di effettuare il download del file Shapefile."}],"d22t":[{pt:"inserir pontos",en:"insert points",es:"inserir pontos",it:"inserir pontos"}],"d23":[{pt:"Insere um gráfico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores numéricos na tabela de atributos.",en:"Insert a graphic in the clicked point as the exist attributes in the chosen layer. The layer must have items with numerical values in the table of attributes.",es:"Inserte un gráfico en el punto marcado según los atributos existentes en el tema elejido. El tema debe tener puntos con valores numéricos en la tabla de atributos",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para seleção de elementos de um tema. Os elementos selecionados podem ser utilizados em outras operaçôes, como buffer e seleção por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other buffer or selection operation by layer .",es:"Abre las herramientas para selección de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras ",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d24t":[{pt:"Selecionar",en:"Select",es:"Selecionar",it:"Selecionar"}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa opção para adicionar informaçôes ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opción para agregar información al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d25t":[{pt:"Inserir texto",en:"Text insert",es:"Inserir texto",it:"Inserir texto"}],"d26":[{pt:"Escolha o visual para os botões e outras características visuais do mapa",en:"Choose look for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras características visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait...",es:"Espere...",it:"Attendere..."}],"d29":[{pt:"Estações metar",en:"Metar stations",es:"Estações metar",it:"Estações metar"}],"d30":[{pt:"Linha do tempo",en:"Time line",es:"Linha do tempo",it:"Linha do tempo"}],"d31":[{pt:"Não existe nenhuma camada com etiquetas ativas",en:"There is no layer with active labels",es:"Não existe nenhuma camada com etiquetas ativas",it:"Não existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navegação com o mouse",en:"Mouse navigation",es:"Navegação com o mouse",it:"Navegação com o mouse"}],"ge2":[{pt:"Barra de status",en:"Status bar",es:"Barra de status",it:"Barra de status"}],"ge3":[{pt:"Reference map",en:"Mapa de referência",es:"Mapa de referência",it:"Mapa de referência"}],"ge4":[{pt:"Escala e legenda",en:"Scale and legend",es:"Escala e legenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosphere",es:"Atmosfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Coordinates grid",es:"Grade de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Sunshine",es:"Luz do sol",it:"Luz do sol"}],"ge8":[{pt:"Limites políticos",en:"Political boundaries",es:"Limites políticos",it:"Limites políticos"}],"ge9":[{pt:"Construções em 3d",en:"Buildings in 3D",es:"Construções em 3d",it:"Construções em 3d"}],"ge10":[{pt:"Estradas",en:"Roads",es:"Estradas",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terrain",es:"Terreno",it:"Terreno"}],"x1":[{pt:"Página principal",en:"Home",es:"Página principal",it:"Página principal"}],"x2":[{pt:"Lista de menus",en:"Menu list",es:"Lista de menus",it:"Lista de menus"}],"x3":[{pt:"Miniaturas",en:"Thumbnails",es:"Miniaturas",it:"Miniaturas"}],"x4":[{pt:"Pesquisa na INDE",en:"Search in SDI",es:"Pesquisa na INDE",it:"Pesquisa na INDE"}],"x5":[{pt:"Editar subgrupos",en:"Subgroups editing",es:"Editar subgrupos",it:"Editar subgrupos"}],"x6":[{pt:"Editar temas",en:"Theme editing",es:"Editar temas",it:"Editar temas"}],"x7":[{pt:"opção visível apenas para editores",en:"option visible only to editors",es:"opção visível apenas para editores",it:"opção visível apenas para editores"}],"x8":[{pt:"Sistema de administração",en:"Management System",es:"Sistema de administração",it:"Sistema de administração"}],"x9":[{pt:"Editar árvore",en:"Edit tree",es:"Editar árvore",it:"Editar árvore"}],"x10":[{pt:"Editar menus",en:"Edit menu",es:"Editar menus",it:"Editar menus"}],"x11":[{pt:"Mostra a legenda em uma janela",en:"Show the legend in a window",es:"Mostra a legenda em uma janela",it:"Mostra a legenda em uma janela"}],"x13":[{pt:"&Acute;rvore de camadas não encontrada",en:"Tree layers not found",es:"Arboles de capas no se encuentra",it:"&Acute;rvore de camadas não encontrada"}],"x14":[{pt:"sim",en:"si",es:"yes",it:"sim"}],"x15":[{pt:"não",en:"no",es:"no",it:"nao"}],"x16":[{pt:"Valor não definido",en:"Value not set",es:"Valor no establecido",it:"Valor não definido"}],"x17":[{pt:"Essa opção afeta apenas a impressão do mapa",en:"This option only affects the printing of the map",es:"Esta opción s&ocaute;lo afecta a la impresi&ocaute;n del mapa",it:"Essa opção afeta apenas a impressão do mapa"}],"x18":[{pt:"Nome não definido",en:"El nombre no se ha definido",es:"Name was not defined",it:"Name was not defined"}],"x19":[{pt:"Comentários de",en:"Reviews",es:"Comentarios",it:""}],"x20":[{pt:"Clique no mapa para desenhar o polígono",en:"Click the map to draw the polygon",es:"Haga clic en el mapa para dibujar el polígono",it:"Click the map to draw the polygon"}],"x21":[{pt:"Essa operação não funciona nessa interface",en:"This operation does not work on this interface",es:"Esta operación no funciona en esta interfaz",it:""}],"x22":[{pt:"Opção não disponível",en:"Option not available",es:"Opción no disponible",it:"Opci�n no disponible"}],"x23":[{pt:"Direção",en:"",es:"Dirección",it:"Direction"}],"x25":[{pt:"Método para calcular distâncias",en:"Method to calculate distances",es:"Método para calcular distancias",it:"Method to calculate distances"}],"x26":[{pt:"Voce quer mesmo encerrar a sessao?",en:"Do you really want to logout?",es:"¿Realmente desea salir?",it:""}],"x27":[{pt:"Usuário",en:"User",es:"Usuario",it:""}],"x28":[{pt:"Senha",en:"Password",es:"Contraseña",it:""}],"x29":[{pt:"Enviar",en:"Send",es:"Enviar",it:""}],"x30":[{pt:"Ativo",en:"Active",es:"Activo",it:""}],"x31":[{pt:"Erro",en:"Error",es:"Erro",it:""}],"x32":[{pt:"",en:"",es:"",it:""}]}; | |
352 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.idioma={MOSTRASELETOR:true,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id){if(i3GEO.idioma.DICIONARIO[id]){var t=i3GEO.idioma.DICIONARIO[id][0];return t[i3GEO.idioma.ATUAL]}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k=0;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel,temp,iu=i3GEO.util;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<550){w="width:12px;"}else{w=""}for(i=0;i<n;i++){temp=i3GEO.idioma.SELETORES[i];ins+='<img style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+iu.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+temp+'\')" ';if(temp==="en"){ins+='alt="Ingles" id="uk" />'}if(temp==="pt"){ins+='alt="Portugues" id="brasil" />'}if(temp==="es"){ins+='alt="Espanhol" id="espanhol" />'}if(temp==="it"){ins+='alt="Italiano" id="italiano" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}}};var $trad=function(id){return(i3GEO.idioma.traduzir(id))};(function(){try{var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c);g_linguagem=c}else{if(typeof(g_linguagem)!=="undefined"){i3GEO.idioma.define(g_linguagem)}else{g_linguagem="pt";i3GEO.idioma.define("pt")}}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}}catch(e){alert("Problemas com idiomas "+e)}})(); | |
353 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}cpJSON=new cpaint();cpJSON.set_response_type("JSON");cpJSON.set_transfer_mode("POST");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.locaplic não esta definida")}if(i3GEO.configura.sid===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.sid não esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereSHPgrafico",$trad("o1"));cpJSON.call(p,"insereSHPgrafico",retorno,par)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};cpJSON.call(p,"insereSHP",retorno,par)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao,par)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao,par)},excluitema:function(funcao,temas){var layer,retorno,p,n,i,par;i3GEO.php.verifica();retorno=function(retorno){i3GEO.janela.fechaAguarde("excluitema");n=temas.length;for(i=0;i<n;i++){if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(temas[i]);if(layer.length>0){i3geoOL.removeLayer(layer[0])}}if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(temas[i]);if(indice!==false){i3GeoMap.overlayMapTypes.removeAt(indice)}}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(temas[i]);i3GeoMap.getFeatures().removeChild(indice)}}funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("excluitema",$trad("o1"));p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php";par="funcao=excluitema&temas="+temas+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"excluitema",retorno,par)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID,retorno=function(retorno){i3GEO.janela.fechaAguarde("reordenatemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reordenatemas",$trad("o1"));cpJSON.call(p,"reordenatemas",retorno,par)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaHTML",funcao,par)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe,retorno=function(retorno){i3GEO.janela.fechaAguarde("inverteStatusClasse");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("inverteStatusClasse",$trad("o1"));cpJSON.call(p,"inverteStatusClasse",retorno,par)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"ligaDesligaTemas",retorno,par)},pegalistademenus:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistademenus",funcao,par)},pegalistadegrupos:function(funcao,id_menu,listasgrupos){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadegrupos",funcao,par)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadeSubgrupos",funcao,par)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao,par)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao,par)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao,par)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao,par)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao,par)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},listadrives:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao,par)},listaarquivos:function(funcao,caminho){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao,par)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao,par)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao,par)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatamanho");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatamanho",$trad("o1"));cpJSON.call(p,"pegaSistemas",retorno,par)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ativalogo&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("ativalogo");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("ativalogo",$trad("o1"));cpJSON.call(p,"ativalogo",retorno,par)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereAnnotation");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereAnnotation",$trad("o1"));cpJSON.call(p,"inserefeature",retorno,par)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"identificaunico",funcao,par)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=recuperamapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("recuperamapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("recuperamapa",$trad("o1"));cpJSON.call(p,"recuperamapa",retorno,par)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao,par)},referenciadinamica:function(funcao,zoom,tipo){i3GEO.php.verifica();if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferenciaDinamica",funcao,par)},referencia:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referencia&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferencia",funcao,par)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao,par)},aproxima:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aproxima",funcao,par)},afasta:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"afasta",funcao,par)},zoomponto:function(funcao,x,y,tamanho,simbolo,cor){i3GEO.php.verifica();if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}var retorno=function(retorno){i3GEO.janela.fechaAguarde("zoomponto");if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(x,y)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.pan2ponto(x,y)}funcao.call(funcao,retorno)},p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor;i3GEO.janela.abreAguarde("zoomponto",$trad("o1"));cpJSON.call(p,"zoomponto",retorno,par)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao,par)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){var retorno;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;atualiza=true;geo=false}if(geo===undefined){geo=false}if(atualiza===undefined){atualiza=true}if(ext===undefined){alert("extensao nao definida");return}retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":if(atualiza===true){i3GEO.Interface.googlemaps.zoom2extent(ext)}break;case"googleearth":if(atualiza===true){i3GEO.Interface.googleearth.zoom2extent(ext)}break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(ext);break}try{funcao.call(funcao,retorno)}catch(e){}};var p=locaplic+"/classesphp/mapa_controle.php";var par="funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo;cpJSON.call(p,"mudaext",retorno,par)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudaescala");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudaescala",$trad("o1"));cpJSON.call(p,"mudaescala",retorno,par)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"crialente",funcao,par)},geradestaque:function(funcao,tema,ext){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext,retorno=function(retorno){i3GEO.janela.fechaAguarde("geradestaque");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("geradestaque",$trad("o1"));cpJSON.call(p,"geradestaque",retorno,par)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoPT",funcao,par)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=selecaobox&ext="+box+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao,par)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoext",funcao,par)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoatrib2",funcao,par)},selecaotema:function(funcao,temao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaotema",funcao,par)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("sobetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("sobetema",$trad("o1"));cpJSON.call(p,"sobetema",retorno,par)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("descetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("descetema",$trad("o1"));cpJSON.call(p,"descetema",retorno,par)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("fontetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("fontetema",$trad("o1"));cpJSON.call(p,"fontetema",retorno,par)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomtema",$trad("o1"));cpJSON.call(p,"zoomtema",retorno,par)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomsel",$trad("o1"));cpJSON.call(p,"zoomsel",retorno,par)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("limpasel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("limpasel",$trad("o1"));cpJSON.call(p,"limpasel",retorno,par)},invertestatuslegenda:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("invertestatuslegenda");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("invertestatuslegenda",$trad("o1"));cpJSON.call(p,"invertestatuslegenda",retorno,par)},aplicaCorClasseTema:function(funcao,idtema,idclasse,rgb){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("aplicaCorClasseTema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("aplicaCorClasseTema",$trad("o1"));cpJSON.call(p,"aplicaCorClasseTema",retorno,par)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatransp");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatransp",$trad("o1"));cpJSON.call(p,"mudatransp",retorno,par)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudanome");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudanome",$trad("o1"));cpJSON.call(p,"mudanome",retorno,par)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid){if(arguments.length===11){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao,par)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaSHP");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaSHP",$trad("o1"));cpJSON.call(p,"adicionaTemaSHP",retorno,par)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaIMG");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaIMG",$trad("o1"));cpJSON.call(p,"adicionaTemaIMG",retorno,par)},identifica:function(funcao,x,y,resolucao,locaplic,sid){var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica&opcao=tip&xy="+x+","+y+"&resolucao=5&g_sid="+sid;cpJSON.call(p,"identifica",funcao,par)},identifica2:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas="";resolucao=5}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao="+resolucao+"&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){par+="&tema="+tema}cpJSON.call(p,"identifica",funcao,par)},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("reiniciaMapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reiniciaMapa",$trad("o1"));cpJSON.call(p,"reiniciaMapa",retorno,par)},procurartemas:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemas2:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas2&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemasestrela:function(funcao,nivel,fatorestrela,locaplic){if(arguments.length===3){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemasestrela&map_file=&nivel="+nivel+"&fatorestrela="+fatorestrela+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemasestrela");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemasestrela",$trad("o1"));cpJSON.call(p,"foo",retorno,par)}catch(e){}},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=adtema&temas="+temas+"&g_sid="+sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("adtema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adtema",$trad("o1"));cpJSON.call(p,"adtema",retorno,par)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao,par)},googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googlemaps",$trad("o1"));cpJSON.call(p,"googlemaps",retorno,par)},googleearth:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googleearth&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googleearth");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googleearth",$trad("o1"));cpJSON.call(p,"googleearth",retorno,par)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("openlayers",$trad("o1"));cpJSON.call(p,"openlayers",retorno,par)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.recalcPar();par+="&mapexten="+i3GEO.parametros.mapexten}cpJSON.call(p,"corpo",funcao,par)},converte2googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2googlemaps",$trad("o1"));cpJSON.call(p,"converte2googlemaps",retorno,par)},converte2openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2openlayers",$trad("o1"));cpJSON.call(p,"converte2openlayers",retorno,par)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaMapa&"+parametros,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"criaMapa",funcao,par)},inicia:function(funcao,embedLegenda,w,h){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"iniciaMapa",funcao,par)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao,par)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php",par="funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao,par)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer;cpJSON.call(p,"listaLayersWMS",funcao,par)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php",par="map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao,par)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaItensTema",funcao,par)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaRegistros",funcao,par)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=extregistros®istro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao,par)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao,par)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg&map_file=";cpJSON.call(p,"listaEpsg",funcao,par)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema,retorno=function(retorno){i3GEO.janela.fechaAguarde("criatemaSel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("criatemaSel",$trad("o1"));cpJSON.call(p,"chavegoogle",retorno,par)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao,par)},alteraData:function(funcao,tema,data){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data;cpJSON.call(p,"alteradata",funcao,par)},dadosPerfilRelevo:function(funcao,opcao,pontos,amostragem,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem+"&item="+item)},funcoesGeometriasWkt:function(funcao,listaWkt,operacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=funcoesGeometriasWkt&operacao="+operacao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&geometrias="+listaWkt)}}; | |
354 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.configura={grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"},{nome:$trad("u15a"),id:"ferramentas"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu1",text:$trad("u1"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u4a"),url:"javascript:i3GEO.ajuda.abreDoc('/documentacao/manual-i3geo-4_7-pt.pdf')"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"javascript:i3GEO.ajuda.abreDoc('/ajuda_usuario.php')"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("d27")+'</b></span>',url:"#"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Serviços WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperbólica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}],"ferramentas":[{id:"omenudataFerramentas0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("g4a")+'</b></span>',url:"#"},{id:"omenudataFerramentas4a",text:$trad("g1a"),url:"javascript:i3GEO.arvoreDeTemas.flutuante()"},{id:"omenudataFerramentas1a",text:$trad("t20"),url:"javascript:i3GEO.mapa.dialogo.opacidade()"},{id:"omenudataFerramentas2a",text:$trad("p21"),url:"javascript:i3GEO.mapa.dialogo.animacao()"},{id:"omenudataFerramentas3a",text:$trad("d24t"),url:"javascript:i3GEO.mapa.dialogo.selecao();"},{id:"omenudataFerramentas0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a7")+'</b></span>',url:"#"},{id:"omenudataFerramentas1b",text:$trad("t31"),url:"javascript:i3GEO.tema.dialogo.tabela()"},{id:"omenudataFerramentas2b",text:$trad("t23"),url:"javascript:i3GEO.tema.dialogo.procuraratrib()"},{id:"omenudataFerramentas3b",text:$trad("t25"),url:"javascript:i3GEO.tema.dialogo.toponimia()"},{id:"omenudataFerramentas4b",text:$trad("t27"),url:"javascript:i3GEO.tema.dialogo.etiquetas()"},{id:"omenudataFerramentas5b",text:$trad("t29"),url:"javascript:i3GEO.tema.dialogo.filtro()"},{id:"omenudataFerramentas6b",text:$trad("t33"),url:"javascript:i3GEO.tema.dialogo.editaLegenda()"},{id:"omenudataFerramentas7b",text:$trad("t42"),url:"javascript:i3GEO.tema.dialogo.cortina()"},{id:"omenudataFerramentas8b",text:$trad("t37a"),url:"javascript:i3GEO.tema.dialogo.graficotema()"},{id:"omenudataFerramentas9b",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataFerramentas10b",text:$trad("t49"),url:"javascript:i3GEO.tema.dialogo.tme()"},{id:"omenudataFerramentas0c",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a15")+'</b></span>',url:"#"},{id:"omenudataFerramentas1c",text:$trad("a16"),url:"javascript:i3GEO.arvoreDeTemas.dialogo.conectaservico()"},{id:"omenudataFerramentas0d",text:'<span style=color:gray;text-decoration:underline; ><b>Upload</b></span>',url:"#"},{id:"omenudataFerramentas3d",text:"Vetor (shp,dbf,csv,gpx,kml)",url:"javascript:i3GEO.arvoreDeTemas.dialogo.uploadarquivo()"}]}},tipoimagem:"nenhum",ajustaDocType:true,tipotip:"balao",alturatip:"200px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:70,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:1800,iniciaJanelaMensagens:false,mostraRosaDosVentos:"nao",liberaGuias:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:"",constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),titulo:$trad("d2t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"localizar",tipo:"",dica:$trad("o2"),titulo:$trad("o2"),funcaoonclick:function(){if(!$i("janelaBuscaRapida")){var janela=i3GEO.janela.cria("258px","20px","","","","Busca rápida","janelaBuscaRapida",false,"hd","","");$i("janelaBuscaRapida_corpo").style.backgroundColor="white";i3GEO.gadgets.mostraBuscaRapida(janela[2].id)}}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),titulo:$trad("d3t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.mensagemSimples("Pressione a tecla CTRL junto com o botão esquerdo do mouse e arraste para definir a área de zoom","?");g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}var temp;temp="zoom";i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);g_operacao='navega';g_tipoacao='zoomli';i3GEO.barraDeBotoes.ativaIcone("zoomli");marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLzoom);return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}if(i3GEO.eventos.MOUSEDOWN.toString().search("i3GEO.navega.zoomBox.inicia()")<0){i3GEO.eventos.MOUSEDOWN.push("i3GEO.navega.zoomBox.inicia()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}i3GEO.barraDeBotoes.BOTAOPADRAO="zoomli"}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),titulo:$trad("d4t"),funcaoonclick:function(){var temp;g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="pan";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="pan_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}return}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),titulo:$trad("d5t"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),titulo:$trad("d6t"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),titulo:$trad("d7t"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");g_tipoacao='identifica';g_operacao='identifica';cliqueIdentifica=function(){if(g_operacao==="identifica"||i3GEO.barraDeBotoes.BOTAOPADRAO==="identifica"){g_operacao="identifica";eval(i3GEO.configura.funcaoIdentifica)}var temp=function(){},i;i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp);i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica");i=$i("i3GEOmarcaIdentifica");if(i){i.style.display="block"}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")<0){i3GEO.eventos.MOUSECLIQUE.push("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSECLIQUE.remove("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),titulo:$trad("d7at"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){alert($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");g_tipoacao='identifica';g_operacao='identifica';verificaTip=function(){if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}if($i("marcaIdentifica")){return}if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoTip)}else{i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")>0){i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSECLIQUE.push("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSEPARADO.push("verificaTip()")}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),titulo:$trad("d8t"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),titulo:$trad("d9t"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),titulo:$trad("d11t"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),titulo:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",titulo:"fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),titulo:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),titulo:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),titulo:$trad("d15t"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),titulo:$trad("d16t"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),titulo:$trad("d17t"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),titulo:$trad("d18t"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),titulo:$trad("d20t"),funcaoonclick:function(){var temp=function(){var url=(window.location.href.split("?"));window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),titulo:$trad("d21t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),titulo:$trad("d21at"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"barraedicao",tipo:"",dica:$trad("u29"),titulo:$trad("u29"),funcaoonclick:function(){i3GEO.barraDeBotoes.editor.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),titulo:$trad("d22t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),titulo:$trad("d24t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),titulo:$trad("d25t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",titulo:"roteamento",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","Rota");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="Não foi possível criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);alert("Clique o ponto de origem da rota")}}]}}; | |
355 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.parametros.mapexten;cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{alert("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}}; | |
356 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.desenho={richdraw:"",estilos:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w){try{i3GEO.desenho.richdraw.renderer.create('circ','',i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){padrao=i3GEO.desenho.estilos[padrao];i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}}; | |
357 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.Interface={TABLET:false,ALTTABLET:"openlayers_t.htm",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:20,BARRADEZOOMLEFT:10,ATUAL:"openlayers",IDCORPO:"corpoMapa",ATIVAMENUCONTEXTO:false,IDMAPA:"",STATUS:{atualizando:[],trocando:false},atual2gm:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(google){i3GEO.Interface.atual2gm.initemp()}}catch(e){i3GEO.util.scriptTag("http://www.google.com/jsapi?callback=i3GEO.Interface.atual2gm.loadMaps","","",false)}},loadMaps:function(){google.load("maps","3",{callback:"i3GEO.Interface.atual2gm.initemp",other_params:"sensor=false"})},initemp:function(){var temp=function(){$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.googlemaps.inicia();i3GEO.janela.fechaAguarde("googleMapsAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("openlayers",i3GEO.configura.locaplic+"/imagens/dobraopenlayers.png")};i3GEO.php.converte2googlemaps(temp)}},atual2ol:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(OpenLayers){i3GEO.Interface.atual2ol.initemp()}}catch(e){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/openlayers/OpenLayers211.js.php","i3GEO.Interface.atual2ol.initemp()","",false)}},initemp:function(){var temp=function(){OpenLayers.ImgPath="../pacotes/openlayers/img/";$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.openlayers.inicia();i3GEO.janela.fechaAguarde("OpenLayersAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("googlemaps",i3GEO.configura.locaplic+"/imagens/dobragooglemaps.png");i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten)};i3GEO.php.converte2openlayers(temp)}},redesenha:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()},aplicaOpacidade:function(opacidade){i3GEO.Interface[i3GEO.Interface.ATUAL].aplicaOpacidade(opacidade)},atualizaMapa:function(){switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()}},atualizaTema:function(retorno,tema){i3GEO.Interface[i3GEO.Interface.ATUAL].atualizaTema(retorno,tema)},adicionaKml:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}i3GEO.navega.autoRedesenho.ativa();i3GEO.util.defineValor("i3geo_escalanum","value",i3GEO.parametros.mapscale);if((i3GEO.parametros.geoip==="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.Interface[i3GEO.Interface.ATUAL].inicia();if($i(i3GEO.login.divnomelogin)&&i3GEO.util.pegaCookie("i3geousuarionome")){$i(i3GEO.login.divnomelogin).innerHTML=i3GEO.util.pegaCookie("i3geousuarionome")}},alteraParametroLayers:function(parametro,valor){i3GEO.Interface[i3GEO.Interface.ATUAL].alteraParametroLayers(parametro,valor)},ativaBotoes:function(){if(i3GEO.Interface.STATUS.trocando===false){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{i3GEO.Interface[i3GEO.Interface.ATUAL].ativaBotoes()}}},openlayers:{FUNDOTEMA:"yellow",TILES:false,BUFFER:0,GADGETS:{PanZoomBar:true,PanZoom:false,LayerSwitcher:true,ScaleLine:true,OverviewMap:false},MINEXTENT:[-0.0005,-0.0005,0.0005,0.0005],MAXEXTENT:[-180,-90,180,90],LAYERSADICIONAIS:[],redesenha:function(){var openlayers=i3GEO.Interface.openlayers;openlayers.criaLayers();openlayers.ordenaLayers();openlayers.recalcPar();i3GEO.janela.fechaAguarde();openlayers.sobeLayersGraficos()},cria:function(w,h){var f,ins,mi=i3GEO.Interface.openlayers.MINEXTENT,ma=i3GEO.Interface.openlayers.MAXEXTENT,i=$i(i3GEO.Interface.IDCORPO),bb=i3GEO.barraDeBotoes;OpenLayers.DOTS_PER_INCH=i3GEO.util.calculaDPI();OpenLayers._getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/openlayers/"};if(i){f=$i("openlayers");if(!f){ins='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w+"px";f.style.height=h+"px"}i3GEO.Interface.IDMAPA="openlayers";if(i3GEO.Interface.TABLET===true){i3geoOL=new OpenLayers.Map({div:"openlayers",theme:null,controls:[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]})}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;i3geoOL=new OpenLayers.Map('openlayers',{controls:[],fractionalZoom:true,minResolution:"auto",minExtent:new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3]),maxResolution:"auto",maxExtent:new OpenLayers.Bounds(ma[0],ma[1],ma[2],ma[3]),allOverlays:false})}},inicia:function(){var montaMapa=function(){var pz,temp,layers,i,texto,estilo,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});if(openlayers.GADGETS.PanZoom===true){pz=new OpenLayers.Control.PanZoom();i3geoOL.addControl(pz);pz.div.style.zIndex=5000}openlayers.criaLayers();temp=$i("listaLayersBase");if(temp){estilo="cursor:pointer;vertical-align:top;padding-top:5px;";if(navm){estilo="border:0px solid white;cursor:pointer;vertical-align:middle;padding-top:0px;"}temp={"propriedades":[]};layers=i3geoOL.getLayersBy("isBaseLayer",true);layersn=layers.length;for(i=0;i<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].id+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}i3GEO.Interface.ativaBotoes();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}};if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);"}i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}},aplicaOpacidade:function(opacidade){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer&&layer.isBaseLayer===false){layer.setOpacity(opacidade)}}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+=" <span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,j="",html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,camada,urllayer,opcoes,i,n,temp=$i("i3GEOprogressoDiv"),fundoIsBase=true;if(temp){i3GEO.Interface.STATUS.atualizando=[];temp.style.display="none"}try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.Vector("Nenhum",{displayInLayerSwitcher:true,visibility:false,isBaseLayer:true,singleTile:true});i3geoOL.addLayer(layer);if($i(i3geoOL.id+"_events")){$i(i3geoOL.id+"_events").style.backgroundColor="rgb("+i3GEO.parametros.cordefundo+")"}}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:false,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){layer="";camada=i3GEO.arvoreDeCamadas.CAMADAS[i];opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES);if(i3geoOL.getLayersByName(camada.name).length===0&&camada.name.toLowerCase()!="copyright"){urllayer=url+"&layer="+camada.name+"&r="+Math.random();try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes);if(camada.wmssrs!=""&&layer.url){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||camada.type===0||camada.type===4||camada.type===8){opcoes.singleTile=true}else{temp=camada.type===3?opcoes.singleTile=false:opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES)}layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}if(layer&&layer!=""){temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}if(i3GEO.parametros.copyright!=""&&!$i("i3GEOcopyright")){temp=document.createElement("div");temp.id="i3GEOcopyright";temp.style.display="block";temp.style.top="0px";temp.style.left="0px";temp.style.zIndex=5000;temp.style.position="absolute";temp.innerHTML="<p class=paragrafo >"+i3GEO.parametros.copyright+"</p>";$i(i3GEO.Interface.IDMAPA).appendChild(temp)}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"&&layers[i].name!="Nenhum"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},inverteModoTile:function(){if(i3GEO.Interface.openlayers.TILES===true){i3GEO.Interface.openlayers.TILES=false}else{i3GEO.Interface.openlayers.TILES=true}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer){i3geoOL.removeLayer(layer,false)}}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){if(layers[i].url){url=layers[i].url;reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");eval("layers[i].mergeNewParams({"+parametro+":valor})");layers[i].redraw()}}},loadStartLayer:function(event){var p=$i("i3GEOprogressoDiv");if($i("ArvoreTituloTema"+event.object.name)){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA);if(p){p.style.display="block";i3GEO.arvoreDeCamadas.progressBar.set('maxValue',i3GEO.Interface.STATUS.atualizando.length);i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')-1)}}},loadStopLayer:function(event){var p=$i("i3GEOprogressoDiv");i3GEO.Interface.STATUS.atualizando.remove(event.object.name);if($i("ArvoreTituloTema"+event.object.name)){YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","");if(p){p.style.display="block";if(i3GEO.Interface.STATUS.atualizando.length>0){i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')+1)}else{i3GEO.arvoreDeCamadas.progressBar.set('value',0);p.style.display="none"}}}},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];if(layer){i3geoOL.setLayerIndex(layer,maiorindice+i)}}},sobeDesceLayer:function(tema,tipo){var layer=i3geoOL.getLayersByName(tema)[0],indice;if(layer){indice=i3geoOL.getLayerIndex(layer);if(tipo==="sobe"){i3geoOL.setLayerIndex(layer,indice+1)}else{i3geoOL.setLayerIndex(layer,indice-1)}}},ligaDesliga:function(obj){var layers=i3geoOL.getLayersByName(obj.value),desligar="",ligar="",b;if(layers.length>0){{layers[0].setVisibility(obj.checked)}if(obj.checked){ligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value)}b=new Image();b.src=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemasbeacon&desligar="+desligar+"&ligar="+ligar+"&adicionar=nao&g_sid="+i3GEO.configura.sid;b.onerror=function(){i3GEO.mapa.legendaHTML.atualiza()}}},ativaFundo:function(id){i3geoOL.setBaseLayer(i3geoOL.getLayer(id));i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].url){layers[i].mergeNewParams({r:Math.random()});layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&","");layers[i].url=layers[i].url+"&&";if(layers[i].visibility===true){layers[i].redraw()}}}},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){if(layer.url){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&","");layer.url=layer.url+"&&";layer.redraw()}}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){var modoAtual="";i3GEO.eventos.ativa($i("openlayers"));i3geoOL.events.register("movestart",i3geoOL,function(e){var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});i3geoOL.events.register("moveend",i3geoOL,function(e){var xy;modoAtual="";i3GEO.Interface.openlayers.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});i3geoOL.events.register("mousemove",i3geoOL,function(e){var p,lonlat,d,pos;if(modoAtual==="move"){return}p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}})},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();i3GEO.gadgets.atualizaEscalaNumerica(parseInt(escalaAtual,10))},zoom2ext:function(ext){var m,b;m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b)},pan2ponto:function(x,y){i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{MAPOPTIONS:{scaleControl:true},OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},removeTodosLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.removeTodosLayers();i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");if(w){f.style.width=w+"px";f.style.height=h+"px"}}i3GeoMap="";i3GEO.Interface.IDMAPA="googlemapsdiv";if(i3GEO.Interface.TABLET===false){i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=true;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=true;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=true}},ativaZoomBox:function(){i3GeoMap.enableKeyDragZoom({key:'ctrl'})},inicia:function(){var pol,ret,montaMapa;pol=i3GEO.parametros.mapexten;ret=pol.split(" ");montaMapa=function(retorno){var sw,ne,dobra=$i("i3GEOdobraPagina");try{i3GeoMap=new google.maps.Map($i(i3GEO.Interface.IDMAPA),i3GEO.Interface.googlemaps.MAPOPTIONS)}catch(e){alert(e);return}if(dobra){$i(i3GEO.Interface.IDMAPA).appendChild(dobra)}if(!$i("keydragzoom_script")){js=i3GEO.configura.locaplic+"/pacotes/google/keydragzoom.js.php";i3GEO.util.scriptTag(js,"i3GEO.Interface.googlemaps.ativaZoomBox()","keydragzoom_script")}i3GeoMap.setMapTypeId(i3GEO.Interface.googlemaps.TIPOMAPA);sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne));i3GeoMapOverlay=new google.maps.OverlayView();i3GeoMapOverlay.draw=function(){};i3GEO.Interface.googlemaps.criaLayers();i3GeoMapOverlay.setMap(i3GeoMap);i3GEO.Interface.googlemaps.registraEventos();if(i3GEO.Interface.STATUS.trocando===false){i3GEO.gadgets.mostraInserirKml()}i3GEO.Interface.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));if(i3GEO.Interface.STATUS.trocando===false){i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor()}i3GEO.gadgets.mostraMenuSuspenso();g_operacao="";g_tipoacao="";if(i3GEO.Interface.STATUS.trocando===true){$i(i3GEO.arvoreDeCamadas.IDHTML).innerHTML=""}if(i3GEO.Interface.STATUS.trocando===false){i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)}if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(this)"}i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googlemaps.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googlemaps.adicionaKml(true,i3GEO.parametros.kmlurl)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}};i3GEO.php.googlemaps(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0)}}}},criaImageMap:function(nomeLayer){var i3GEOTileO="",s;s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var pos,modoAtual="";google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao="";var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});google.maps.event.addListener(i3GeoMap,"dragend",function(){var xy;modoAtual="";i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar()});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){var xy;i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela;if(modoAtual==="move"){return}ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i,divmapa=$i("googlemapsdiv"),divimg,n;divimg=divmapa.getElementsByTagName("img");n=divimg.length;if(divimg&&n>0){for(i=0;i<n;i++){if(divimg[i].src.search("&layer="+nomeLayer+"&")>0){return divimg[i].parentNode.parentNode.parentNode}}}return false},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="",n,i,lista=[],listatemp;if(obj.checked&&!indice){ligar=obj.value;listatemp=i3GEO.arvoreDeCamadas.listaLigadosDesligados()[0];n=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<n;i++){if(i3GEO.util.in_array(i3GEO.arvoreDeCamadas.CAMADAS[i],listatemp)){lista.push(i3GEO.arvoreDeCamadas.CAMADAS[i])}}n=lista.length;indice=0;for(i=0;i<n;i++){if(lista[i]==obj.value){indice=n-1-i}}i3GEO.Interface.googlemaps.insereLayer(obj.value,indice);i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},aplicaOpacidade:function(opacidade){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,div;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(camada&&camada.name){div=i3GEO.Interface.googlemaps.retornaDivLayer(camada.name);if(div){YAHOO.util.Dom.setStyle(div,"opacity",opacidade)}}}},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var pol=mapexten,ret=pol.split(" "),sw=new google.maps.LatLng(ret[1],ret[0]),ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+=" <span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, this.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, this.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, this.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, this.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)"}i=$i(i3GEO.Interface.IDCORPO);if(i){i3GeoMap3d=document.createElement("div");i3GeoMap3d.style.width=w+"px";i3GeoMap3d.style.height=h+"px";i.style.height=h;i3GeoMap3d.id="i3GeoMap3d";i3GeoMap3d.style.zIndex=0;i.appendChild(i3GeoMap3d)}google.load("earth","1")},inicia:function(){google.earth.createInstance("i3GeoMap3d",i3GEO.Interface.googleearth.iniciaGE,i3GEO.Interface.googleearth.falha)},iniciaGE:function(object){var montaMapa=function(retorno){i3GeoMap=object;i3GeoMap.getWindow().setVisibility(true);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.Interface.googleearth.criaLayers();var options=i3GeoMap.getOptions(),layerRoot=i3GeoMap.getLayerRoot();options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled);options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility);options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility);options.setScaleLegendVisibility(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility);options.setAtmosphereVisibility(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility);options.setGridVisibility(i3GEO.Interface.googleearth.GADGETS.setGridVisibility);layerRoot.enableLayerById(i3GeoMap.LAYER_BORDERS,i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS);layerRoot.enableLayerById(i3GeoMap.LAYER_BUILDINGS,i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS);layerRoot.enableLayerById(i3GeoMap.LAYER_ROADS,i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS);layerRoot.enableLayerById(i3GeoMap.LAYER_TERRAIN,i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN);i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun);i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW);i3GEO.Interface.googleearth.POSICAOTELA=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO));i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googleearth.adicionaListaKml()}i3GEO.Interface.googleearth.registraEventos();if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googleearth.adicionaKml(true,i3GEO.parametros.kmlurl,i3GEO.parametros.kmlurl,false)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}};i3GEO.php.googleearth(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice,layer;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice===false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=0,i=0;if(n>0){for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice}else{return false}},aplicaOpacidade:function(opacidade){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),i;for(i=0;i<n;i++){i3GeoMap.getFeatures().getChildNodes().item(i).setOpacity(opacidade)}},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar()});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","","Ferramentas","i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div> ';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+=" <span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}}; | |
358 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={AUTORESIZE:false,GEOXML:[],insereDobraPagina:function(tipo,imagem){var novoel=$i("i3GEOdobraPagina");if(!novoel){novoel=document.createElement("img")}novoel.src=imagem;novoel.id="i3GEOdobraPagina";if(tipo==="googlemaps"){novoel.onclick=function(){i3GEO.Interface.atual2gm.inicia()}}if(tipo==="openlayers"){novoel.onclick=function(){i3GEO.Interface.atual2ol.inicia()}}novoel.style.cursor="pointer";novoel.style.position="absolute";novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.zIndex="50000";novoel.style.left=i3GEO.parametros.w-35+"px";YAHOO.util.Event.addListener(novoel,"click",YAHOO.util.Event.stopPropagation);$i(i3GEO.Interface.IDMAPA).appendChild(novoel)},reposicionaDobraPagina:function(){var novoel=$i("i3GEOdobraPagina");if(!novoel){return}novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.left=i3GEO.parametros.w-35+"px"},ativaAutoResize:function(){window.onresize=function(){var Dw,Dh,r=false;Dw=YAHOO.util.Dom.getViewportWidth();Dh=YAHOO.util.Dom.getViewportHeight();if(Math.abs(Dw-i3GEO.tamanhodoc[0])>50){r=true}if(Math.abs(Dh-i3GEO.tamanhodoc[1])>50){r=true}if(r===false){return}i3GEO.tamanhodoc=[Dw,Dh];setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.reposiciona()}else{i3GEO.guias.ajustaAltura()}i3GEO.mapa.reposicionaDobraPagina()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(codigo){if(codigo===""){return}if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")}},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert($trad("x21"));return}i3GEO.php.ativalogo(i3GEO.atualiza);var cr=$i("i3GEOcopyright");if(cr){if(cr.style.display==="block"){cr.style.display="none"}else{cr.style.display="block"}}},verifica:function(retorno){try{if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:true,ID:"",cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg,temp=function(retorno){var ins,elementos,i,temp,re;re=new RegExp("<img src='' />","g");if(i3GEO.mapa.legendaHTML.ID!==""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!=="erro")&&(retorno.data!==undefined)){ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -45px; top: -22px;">Mostra a legenda em uma janela</p></div>'}temp=retorno.data.legenda;temp=temp.replace(re,"");ins+="<div id='corpoLegi' >"+temp+"</div>";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;i<elementos.length;i+=1){elementos[i].style.display="none"}}};if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}idleg=$i("wlegenda");if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},libera:function(){var temp=function(retorno){var novoel,temp,n,i,janela;if(!$i("moveLegi")){novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";temp='<div class="hd" >Legenda</div>';temp+='<div id="wlegenda" style="display:block;padding:5px 2px 5px 0px;text-align:left;background-color:white;height:300px;width:300px;overflow:auto" ></div>';novoel.innerHTML=temp;document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("moveLegi",{width:"302px",fixedcenter:true,constraintoviewport:false,underlay:"shadow",close:true,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();novoel.onmouseover=function(){if($i("moveLegi").style.display==="block"){YAHOO.util.Dom.setStyle("moveLegi","opacity",1)}};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle("moveLegi","opacity",0.20)}}else{janela=YAHOO.i3GEO.janela.manager.find("moveLegi")}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i<n;i+=1){temp[i].style.display="none"}janela.show()};i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{animacao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.animacao()","animacao","animacao")},opacidade:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()","opacidademapa","opacidademapa")},telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' > </a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var pos,temp,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span style='text-decoration:underline;text-align:left;font-size:9pt'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "&&ds[0]&&ds[0]!=" "){try{nds=ds.length;for(s=0;s<nds;s+=1){for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}ins+="<nl>";mostra=true}else{ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+valor+"</span><br>";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; | |
359 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.tema={TEMPORIZADORESID:{},exclui:function(tema){g_operacao="excluitema";var p;try{p=document.getElementById("idx"+tema).parentNode.parentNode.parentNode;do{p.removeChild(p.childNodes[0])}while(p.childNodes.length>0);p.parentNode.removeChild(p)}catch(e){}i3GEO.php.excluitema(i3GEO.atualiza,[tema]);i3GEO.mapa.ativaTema("");i3GEO.temaAtivo=""},fonte:function(tema){i3GEO.mapa.ativaTema(tema);window.open(i3GEO.configura.locaplic+"/admin/abrefontemapfile.php?tema="+tema)},sobe:function(tema){i3GEO.mapa.ativaTema(tema);var temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.sobetema(temp,tema)},desce:function(tema){i3GEO.mapa.ativaTema(tema);var temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.descetema(temp,tema)},zoom:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomtema(i3GEO.atualiza,tema)},zoomsel:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomsel(i3GEO.atualiza,tema)},limpasel:function(tema){i3GEO.mapa.ativaTema(tema);g_operacao="limpasel";var temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,tema)};i3GEO.php.limpasel(temp,tema)},mudatransp:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var valor="",temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,idtema)};if($i("tr"+idtema)){valor=$i("tr"+idtema).value}if(valor!==""){i3GEO.php.mudatransp(temp,idtema,valor)}else{alert($trad("x16"))}},invertestatuslegenda:function(idtema){alert($trad("x17"));i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.arvoreDeCamadas.atualiza()};i3GEO.php.invertestatuslegenda(temp,idtema)},alteracorclasse:function(idtema,idclasse,rgb){i3GEO.mapa.ativaTema(idtema);var temp=function(){i3GEO.atualiza();i3GEO.Interface.atualizaTema("",idtema);i3GEO.arvoreDeCamadas.atualizaLegenda(idtema)};i3GEO.php.aplicaCorClasseTema(temp,idtema,idclasse,rgb)},mudanome:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="mudanome";var valor="";if($i("nn"+idtema)){valor=$i("nn"+idtema).value}if(valor!==""){i3GEO.php.mudanome(i3GEO.atualiza,idtema,valor)}else{alert($trad("x18"))}},mostralegendajanela:function(idtema,nome,tipoOperacao){var retorna,janela;if(tipoOperacao==="ativatimer"){mostralegendajanelaTimer=setTimeout("i3GEO.tema.mostralegendajanela('"+idtema+"','"+nome+"','abrejanela')",4000)}if(tipoOperacao==="abrejanela"){try{clearTimeout(mostralegendajanelaTimer)}catch(e){}retorna=function(retorno){$i("janelaLegenda"+idtema+"_corpo").innerHTML=retorno.data.legenda};if(!$i("janelaLegenda"+idtema)){janela=i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false);janela[2].style.textAlign="left";janela[2].style.background="white";janela[2].innerHTML=$trad("o1")}i3GEO.php.criaLegendaHTML(retorna,idtema,"legenda3.htm")}if(tipoOperacao==="desativatimer"){clearTimeout(mostralegendajanelaTimer)}},temporizador:function(idtema,tempo){if(!tempo){tempo=$i("temporizador"+idtema).value}if(tempo!=""&&parseInt(tempo,10)>0){eval('i3GEO.tema.TEMPORIZADORESID.'+idtema+' = {tempo: '+tempo+',idtemporizador: setInterval(function('+idtema+'){if(!$i("arrastar_'+idtema+'")){delete(i3GEO.tema.TEMPORIZADORESID.'+idtema+');return;}i3GEO.Interface.atualizaTema("",idtema);},parseInt('+tempo+',10)*1000)};')}else{try{window.clearInterval(i3GEO.tema.TEMPORIZADORESID[idtema].idtemporizador);delete(i3GEO.tema.TEMPORIZADORESID[idtema])}catch(e){}}},dialogo:{tme:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tme()","tme","tme")},mostraWms:function(tema){i3GEO.janela.mensagemSimples(i3GEO.configura.locaplic+"/ogc.php?tema="+tema,"WMS url")},comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"","","<img src='"+i3GEO.configura.locaplic+"/imagens/player_volta.png' style=cursor:pointer onclick='javascript:history.go(-1)'><span style=position:relative;top:-2px; > "+$trad("x19")+" "+tema+" </span><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js";i3GEO.util.scriptTag(js,"i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}else{i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo)}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' > </a>")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}}; | |
360 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.analise={dialogo:{graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},linhaDoTempo:function(){i3GEO.janela.cria("450px","300px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' > </a>");atualizaLinhaDoTempo=function(){var doc="";try{if(navn){if($i("wdocai")){doc=$i("wdocai").contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){i3GEO.parametros.r==="nao"?alert($trad("x22")):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="1px"}g_tipoacao="mede"}else{if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.richdraw.fecha()}var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='<div class="hd" style="font-size:11px"> Distância aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" > </a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td> </td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td> Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td> <input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:"330px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeDistancia.fechaJanela)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","");janela=YAHOO.i3GEO.janela.manager.find("mostradistancia")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1]);if(navm&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var janela;i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostradistancia");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},clique:function(){var n,d,decimal,dd;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> "+$trad("x23")+" (DMS)= "+r;texto+="<br>"+$trad("x24")+": "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};var x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;g_areapixel<0?alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >Área aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" > </a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostraarea",{width:"220px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeArea.fechaJanela)}else{janela=YAHOO.i3GEO.janela.manager.find("mostraarea")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1])},fechaJanela:function(){var janela;i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostraarea");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},clique:function(){var n,m;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{if(navn){pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1)}}catch(men){}m=i3GEO.calculo.area(pontosdistobj,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}}; | |
361 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.maparef={fatorZoomDinamico:-3,SELETORTIPO:true,PERMITEFECHAR:true,PERMITEDESLOCAR:true,TRANSICAOSUAVE:false,OPACIDADE:65,TOP:4,RIGHT:20,inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef,janela;if($i("i3geo_winRef")){janela=YAHOO.i3GEO.janela.manager.find("i3geo_winRef");janela.show();janela.bringToTop();return}if(navm){i3GEO.maparef.TRANSICAOSUAVE=false}if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='<div class="hd" style="text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">';ins+='<span id=maparefmaismenosZoom style=display:none > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> ";if(this.SELETORTIPO){ins+="<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>";ins+="<option value='fixo' select >fixo</option>";ins+="<option value='mapa' >mapa</option>";ins+="<option value='dinamico' >dinâmico</option>";ins+="</select>"}ins+="</div>"}ins+='<div class="bd" style="border:1px solid black;text-align:left;padding:3px;height: 150px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;display:none" onload="javascript:this.style.display = \'block\'" id="imagemReferencia" src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;if(i3GEO.maparef.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100);novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100)}}document.body.appendChild(novoel)}if($i("i3geo_winRef").style.display!=="block"){$i("i3geo_winRef").style.display="block";this.PERMITEDESLOCAR?temp="shadow":temp="none";janela=new YAHOO.widget.Panel("i3geo_winRef",{height:"177px",width:"156px",fixedcenter:false,constraintoviewport:true,underlay:temp,close:i3GEO.maparef.PERMITEFECHAR,visible:true,draggable:i3GEO.maparef.PERMITEDESLOCAR,modal:false,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);if(i3GEO.maparef.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.render();janela.show();try{janela.header.style.height="20px"}catch(e){};r=$i("i3geo_winRef_c");if(r){r.style.clip="rect(0px, 160px, 185px, 0px)";r.style.position="absolute"}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));$i("mapaReferencia").style.height="150px";$i("i3geo_winRef").style.border="1px solid gray";moveX=pos[0]+i3GEO.parametros.w+153-i3GEO.maparef.RIGHT-300;moveY=pos[1]+i3GEO.maparef.TOP;if(i3GEO.Interface.ATUAL==="googlemaps"){moveY+=30}janela.moveTo(moveX,moveY);escondeRef=function(){YAHOO.util.Event.removeListener(janela.close,"click");$i("imagemReferencia").src="";janela.destroy();i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none")};YAHOO.util.Event.addListener(janela.close,"click",escondeRef);i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block");if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",temp)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width="156px"}},atualiza:function(forca){if(arguments.length===0){forca=false}var tiporef,temp,re;temp=$i("refDinamico")?tiporef=$i("refDinamico").value:tiporef="fixo";if($i("mapaReferencia")){temp=$i("maparefmaismenosZoom");if(tiporef==="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}if(tiporef==="fixo"){if(i3GEO.parametros.utilizacgi.toLowerCase()!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference')}}if(tiporef==="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}}else{i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.maparef.atualiza()")}},processaImagem:function(retorno){var m,box,temp,tiporef="fixo";if((retorno.data!=="erro")&&(retorno.data!==undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;temp=$i("imagemReferencia");if(temp){m=new Image();m.src=refimagem;temp.src=m.src}temp=$i("refDinamico");if(temp){tiporef=temp.value}if(tiporef!=="fixo"){box=$i("boxref");if(box){box.style.display="none"}return}i3GEO.maparef.atualizaBox()}},atualizaBox:function(){var box=i3GEO.maparef.criaBox(),w;i3GEO.calculo.ext2rect("boxref",i3GEO.parametros.extentref,i3GEO.parametros.mapexten,i3GEO.parametros.celularef,$i("mapaReferencia"));w=parseInt(box.style.width,10);if(w>120){box.style.display="none";return}box.style.display="block";box.style.top=parseInt(box.style.top,10)+4+"px";box.style.left=parseInt(box.style.left,10)+4+"px";if(w<3){box.style.width="3px";box.style.height="3px"}},criaBox:function(){var box=$i("boxref");if(!box){novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.cursor="move";novoel.style.backgroundColor="RGB(120,220,220)";novoel.style.borderWidth="3px";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=0.4}$i("mapaReferencia").appendChild(novoel);boxrefdd=new YAHOO.util.DD("boxref");novoel.onmouseup=function(){var rect,telaminx,telamaxx,telaminy,m,x,ext;rect=$i("boxref");telaminx=parseInt(rect.style.left,10);telamaxy=parseInt(rect.style.top,10);telamaxx=telaminx+parseInt(rect.style.width,10);telaminy=telamaxy+parseInt(rect.style.height,10);m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)};return novoel}else{return box}},click:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(objposicaocursor.ddx,objposicaocursor.ddy);return}try{i3GEO.php.pan(i3GEO.atualiza,i3GEO.parametros.mapscale,"ref",objposicaocursor.refx,objposicaocursor.refy)}catch(e){i3GEO.janela.fechaAguarde("i3GEO.atualiza")}}}; | |
362 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.ajuda={ATIVAJANELA:true,DIVAJUDA:"i3geo_ajuda",DIVLETREIRO:"i3geo_letreiro",MENSAGEMPADRAO:$trad("p1"),TRANSICAOSUAVE:true,OPACIDADE:20,abreDoc:function(url){if(!url){url="/documentacao/index.html"}window.open(i3GEO.configura.locaplic+url)},abreJanela:function(){try{var nx,ny,corpo,texto,janela,temp,largura=262,YU=YAHOO.util,pos=[20,i3GEO.parametros.h/2];if(this.ATIVAJANELA===false){return}temp=$i("contemFerramentas");if(temp){largura=parseInt(temp.style.width,10)-5}if(!$i("janelaMenTexto")){corpo=$i(i3GEO.Interface.IDCORPO);if(corpo){pos=YU.Dom.getXY(corpo)}else{corpo=$i(i3GEO.Interface.IDMAPA);if(corpo){pos=YU.Dom.getXY(corpo)}}nx=pos[0]-largura-3;ny=i3GEO.parametros.h-78;texto='<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>';if(nx<0){nx=10;ny=ny-50}janela=i3GEO.janela.cria(largura-3,"auto","",nx,ny," ","i3geo_janelaMensagens",false,"hd","","",true);janela[2].innerHTML=texto;YU.Event.addListener(janela[0].close,"click",i3GEO.ajuda.fechaJanela);this.ativaCookie()}}catch(e){}},ativaCookie:function(){var i=i3GEO.util.insereCookie;i("g_janelaMen","sim");i("botoesAjuda","sim")},ativaLetreiro:function(mensagem){var l;if($i(i3GEO.ajuda.DIVLETREIRO)){if(arguments.length===0){mensagem=i3GEO.parametros.mensagens}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.ajuda.ativaLetreiro()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.ajuda.ativaLetreiro()")}try{clearTimeout(i3GEO.ajuda.tempoLetreiro)}catch(e){i3GEO.ajuda.tempoLetreiro=""}l=$i(i3GEO.ajuda.DIVLETREIRO);if(l.style.display==="none"){return}l.style.cursor="pointer";if(mensagem===""){l.value="";return}if(l.size===1){l.size=i3GEO.parametros.w/8}BMessage=mensagem+" ---Clique para parar--- ";l.onclick=function(){l.style.display="none"};if(BMessage!==" ---Clique para parar--- "){BQuantas=0;BSize=l.size;BPos=BSize;BSpeed=1;BSpaces="";i3GEO.ajuda.mostraLetreiro()}i3GEO.ajuda.mostraLetreiro(mensagem)}},desativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","nao")},fechaJanela:function(){i3GEO.ajuda.desativaCookie();i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body)},mostraJanela:function(texto){var j=$i(this.DIVAJUDA),k=$i("janelaMenTexto"),jm=$i("i3geo_janelaMensagens"),Dom=YAHOO.util.Dom,h=parseInt(Dom.getStyle(jm,"height"),10);if(j){j.innerHTML=texto===""?"-":texto}else{if(h){Dom.setY("i3geo_janelaMensagens",Dom.getY(jm)+h)}if(k){k.innerHTML=texto}if(this.TRANSICAOSUAVE){texto!==""?Dom.setStyle(jm,"opacity","1"):Dom.setStyle(jm,"opacity",(this.OPACIDADE/100))}h=parseInt(Dom.getStyle(jm,"height"),10);if(h){Dom.setY(jm,Dom.getY(jm)-h)}}},mostraLetreiro:function(){for(var count=0;count<BPos;count+=1){BSpaces+=" "}if(BPos<1){$i(i3GEO.ajuda.DIVLETREIRO).value=BMessage.substring(Math.abs(BPos),BMessage.length);if(BPos+BMessage.length<1){BPos=BSize;BQuantas=BQuantas+1}}else{$i(i3GEO.ajuda.DIVLETREIRO).value=BSpaces+BMessage}BPos-=BSpeed;if(BQuantas<2){i3GEO.ajuda.tempoLetreiro=setTimeout(function(){i3GEO.ajuda.mostraLetreiro()},140)}},redesSociais:function(){i3GEO.janela.cria("400px","400px",i3GEO.configura.locaplic+"/ferramentas/redessociais/index.php","","",$trad("u5c"),YAHOO.util.Dom.generateId(null,"redes"))}}; | |
363 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}YAHOO.namespace("i3GEO.janela");YAHOO.i3GEO.janela.manager=new YAHOO.widget.OverlayManager();YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();YAHOO.i3GEO.janela.managerAguarde=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 2px 5px 2px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,OPACIDADEAGUARDE:50,TIPS:[],ULTIMOZINDEX:0,prepara:function(){var iu=i3GEO.util;iu.escondePin();iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza){if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}var i,wlargurA,ins,novoel,wdocaiframe,temp,fix,underlay,ifr,janela;if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(!classe||classe==""){classe="hd"}if(!id||id===""){id="wdoca"}if(!modal||modal===""){modal=false}ifr=false;if(i3GEO.Interface&&i3GEO.Interface.ATUAL==="googleearth"){i3GEO.janela.TRANSICAOSUAVE=false;ifr=true}fix=false;if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}temp=navm?0:2;wlargurA=parseInt(wlargura,10)+temp+"px";ins='<div id="'+id+'_cabecalho" class="'+classe+'" style="background-color:white;">';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' style='z-index:2;position:absolute;left:3px;top:2px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"}ins+="<span style='font-size:10px;'>"+texto+"</span>";if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12+"px";temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)+"px"}$i(id+'_corpo').style.width=parseInt(wlargura,10)+"px"}if(waltura==="auto"){janela=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:"none",fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{janela=new YAHOO.widget.ResizePanel(id,{hideMode:'offsets',iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}if(nx!==""&&nx!=="center"){janela.moveTo(nx,ny+50)}YAHOO.i3GEO.janela.manager.register(janela);if(this.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.cfg.setProperty("zIndex",[10000]);janela.render();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}if(ifr===true){janela.iframe.style.zIndex=0}temp=$i(id+"_corpo");if(temp){if(navm){temp.style.paddingRight="0px"}temp.style.width=parseInt(temp.style.width,10)-2+"px"}if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(janela.close,"click",i3GEO.janela.fecha,janela,{id:id},true);return([janela,$i(id+"_cabecalho"),$i(id+"_corpo")])},minimiza:function(id){var temp=$i(id+"_corpo"),n,i,m=YAHOO.i3GEO.janela.manager.find(id);if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe}}else{temp.style.display="block";if(m){m.showIframe}}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}},fecha:function(event,args){var i,id;i3GEO.util.escondePin();i3GEO.util.escondeBox();if(i3GEO.janela.ANTESFECHA){for(i=0;i<i3GEO.janela.ANTESFECHA.length;i++){eval(i3GEO.janela.ANTESFECHA[i])}}if(i3GEO.janela.id){id=i3GEO.janela.id}else{id=event.id}if(id==undefined){id=args.id}i3GEO.janela.destroi(id)},destroi:function(id){var janela=YAHOO.i3GEO.janela.manager.find(id);i3GEO.util.removeScriptTag(id+"_script");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w+"px";i.style.height=h+"px"}},abreAguarde:function(id,texto){var pos,temp,janela;if(!id||id==undefined){return}janela=YAHOO.i3GEO.janela.managerAguarde.find(id);pos=[0,0];if($i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(i3GEO.janela.AGUARDEMODAL==true){texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>"}if(!janela){janela=new YAHOO.widget.Panel(id,{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:i3GEO.janela.AGUARDEMODAL,monitorresize:false});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){janela.setBody(texto);janela.body.style.padding="5px"}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){janela.setHeader("<span><img id=aguardeGifAberto src='"+i3GEO.configura.locaplic+"/imagens/aguarde.gif' /></span> <span style=font-size:8px >"+YAHOO.i3GEO.janela.managerAguarde.overlays.length+"</span>")}if(i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();try{janela.header.style.height="20px"}catch(e){}temp=$i(id+"_c");if(temp){temp.style.backgroundColor=""}YAHOO.util.Dom.setStyle(temp,"opacity",i3GEO.janela.OPACIDADEAGUARDE/100)},fechaAguarde:function(id){if(id!=undefined){var janela=YAHOO.i3GEO.janela.managerAguarde.find(id);if(janela){YAHOO.i3GEO.janela.managerAguarde.remove(janela);janela.destroy()}}},ativaAlerta:function(){YAHOO.namespace("i3GEO.janela.dialogInfo");YAHOO.i3GEO.janela.dialogInfo=new YAHOO.widget.SimpleDialog("simpledialog1",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:"fecha",handler:function(){this.hide()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.i3GEO.janela.manager.register(YAHOO.i3GEO.janela.dialogInfo);YAHOO.i3GEO.janela.dialogInfo.setHeader("Alerta");YAHOO.i3GEO.janela.dialogInfo.render(document.body);window.alert=function(texto){YAHOO.i3GEO.janela.dialogInfo.cfg.setProperty("text",texto);YAHOO.i3GEO.janela.dialogInfo.show()}},mensagemSimples:function(texto,cabecalho){var janela;if($i("mensagemSimples1")){janela=YAHOO.i3GEO.janela.manager.find("mensagemSimples1")}else{janela=new YAHOO.widget.SimpleDialog("mensagemSimples1",{width:"300px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""});YAHOO.i3GEO.janela.manager.register(janela);janela.setHeader(cabecalho);janela.render(document.body)}janela.setHeader(cabecalho);janela.cfg.setProperty("text",texto);janela.show()},tip:function(cabecalho){var Nid,i,novoel,res;if(arguments.length===0){cabecalho="fixar"}Nid=YAHOO.util.Dom.generateId();i=$i("i3geo_rosa");if(i){i.style.display="none"}if($i(i3GEO.Interface.IDCORPO)){$i("img").title=""}novoel=document.createElement("div");novoel.id=Nid;novoel.style.position="absolute";novoel.style.zIndex=5000;novoel.style.textAlign="left";novoel.style.background="white";if(navm){novoel.style.filter="alpha(opacity=90)"}else{novoel.style.opacity=".9"}document.body.appendChild(novoel);i3GEO.janela.TIPS.push($i(Nid));res="<div id='"+Nid+"cabecatip' style='text-align:left;background-color:rgb(240,240,240)'>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:$i(\""+Nid+"cabecatip\").innerHTML =\"\";' >"+cabecalho+"</span></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9+"px";ist.left=objposicaocursor.telax-5+"px";ist.display="block";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.excluiTips('todos')")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.excluiTips('todos')")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.janela.excluiTips('naofixos')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.janela.excluiTips('naofixos')")}return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,slider="",bg,thumb;janela=i3GEO.janela.cria(230,200,"","","","Opacidade","opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;bg="slider-bg";thumb="slider-thumb";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},comboCabecalhoTemas:function(idDiv,idCombo,ferramenta,tipo){var temp=$i(idDiv);if(temp){temp.innerHTML="";i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var container=$i(idDiv),c;container.innerHTML=retorno.dados;container.style.left="0px";container.styletextAlign="left";c=$i(idCombo);c.style.width="150px";c.style.border="solid #B4B4B4 1px";c.style.top="6px";c.style.left="2px";c.style.position="relative";c.style.fontSize="10px";c.style.color="#686868";if(i3GEO.temaAtivo!==""){c.value=i3GEO.temaAtivo}if(i3GEOF[ferramenta].tema){c.value=i3GEOF[ferramenta].tema}if(c.value===""){i3GEOF[ferramenta].tema="";$i("i3GEOF."+ferramenta+"_corpo").innerHTML=""}c.onchange=function(){var valor=$i(idCombo).value;if(valor!==""){i3GEO.mapa.ativaTema(valor);i3GEOF[ferramenta].tema=valor;$i("i3GEOF."+ferramenta+"_corpo").innerHTML="";eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');")}}},temp.id,"",false,tipo)}temp="i3GEO.janela.comboCabecalhoTemas('"+idDiv+"','"+idCombo+"','"+ferramenta+"','"+tipo+"')";if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(temp)<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push(temp)}}};try{YAHOO.widget.ResizePanel=function(el,userConfig){if(arguments.length>0){YAHOO.widget.ResizePanel.superclass.constructor.call(this,el,userConfig)}};YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE="yui-resizepanel";YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE="resizehandle";YAHOO.extend(YAHOO.widget.ResizePanel,YAHOO.widget.Panel,{init:function(el,userConfig){YAHOO.widget.ResizePanel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.ResizePanel);var Dom=YAHOO.util.Dom,oInnerElement=this.innerElement,oResizeHandle=document.createElement("DIV"),sResizeHandleId=this.id+"_resizehandle";oResizeHandle.id=sResizeHandleId;oResizeHandle.className=YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE;Dom.addClass(oInnerElement,YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE);this.resizeHandle=oResizeHandle;function initResizeFunctionality(){var me=this,oHeader=this.header,oBody=this.body,oFooter=this.footer,nStartWidth,nStartHeight,aStartPos=0,nBodyBorderTopWidth,nBodyBorderBottomWidth,nBodyTopPadding,nBodyBottomPadding,nBodyOffset=0;oInnerElement.appendChild(oResizeHandle);this.ddResize=new YAHOO.util.DragDrop(sResizeHandleId,this.id);this.ddResize.setHandleElId(sResizeHandleId);this.ddResize.onMouseDown=function(e){nStartWidth=oInnerElement.offsetWidth;nStartHeight=oInnerElement.offsetHeight;if(YAHOO.env.ua.ie&&document.compatMode==="BackCompat"){nBodyOffset=0}else{nBodyBorderTopWidth=parseInt(Dom.getStyle(oBody,"borderTopWidth"),10);nBodyBorderBottomWidth=parseInt(Dom.getStyle(oBody,"borderBottomWidth"),10);nBodyTopPadding=parseInt(Dom.getStyle(oBody,"paddingTop"),10);nBodyBottomPadding=parseInt(Dom.getStyle(oBody,"paddingBottom"),10);nBodyOffset=nBodyBorderTopWidth+nBodyBorderBottomWidth+nBodyTopPadding+nBodyBottomPadding}me.cfg.setProperty("width",nStartWidth+"px");aStartPos=[Event.getPageX(e),Event.getPageY(e)]};this.ddResize.onDrag=function(e){var aNewPos=[Event.getPageX(e),Event.getPageY(e)],nOffsetX=aNewPos[0]-aStartPos[0],nOffsetY=aNewPos[1]-aStartPos[1],nNewWidth=Math.max(nStartWidth+nOffsetX,10),nNewHeight=Math.max(nStartHeight+nOffsetY,10),nBodyHeight=(nNewHeight-(oFooter.offsetHeight+oHeader.offsetHeight+nBodyOffset));me.cfg.setProperty("width",nNewWidth+"px");oBody.style.width=nNewWidth-4+"px";if(nBodyHeight<0){nBodyHeight=0}oBody.style.height=nBodyHeight+"px";if($i("wdocai")){$i("wdocai").style.height=nBodyHeight+"px";$i("wdocai").style.width=oBody.style.width+"px"}};this.ddResize.onMouseUp=this.ddResize.onDrag.call()}function onBeforeShow(){initResizeFunctionality.call(this);this.unsubscribe("beforeShow",onBeforeShow)}function onBeforeRender(){if(!this.footer){this.setFooter("")}if(this.cfg.getProperty("visible")){initResizeFunctionality.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}this.unsubscribe("beforeRender",onBeforeRender)}this.subscribe("beforeRender",onBeforeRender);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.initEvent.fire(YAHOO.widget.ResizePanel)},toString:function(){return"ResizePanel "+this.id}})}catch(e){} | |
364 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/gisicons/show-layers.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/gisicons/show-catalog.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/gisicons/show-legend.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",click:function(){var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp;ins="<br><div id='banners' style='overflow:auto;text-align:left'>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div><a href='"+link+"'><img src='"+temp.IMAGEM+"'></a></div><br>";ins+="<div><p style=text-align:center >"+nome+"</p></div><br>";ig1++}while(ig1<ig1lt)}$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML=ins+"</div>"};$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde...";i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas)}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){guia.style.height=altura+"px"}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]}},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px";if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";temp.left=config.larguraPuxador+"px";temp.width="0px";temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px";temp=$i("i3GEOguiaMovelIcones").style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";temp.top="38px";temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.20);if($i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL);if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.abreFecha()}},mostraIcones:function(){if($i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="";if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ins+="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;;' /></button>"}}$i("i3GEOguiaMovelIcones").innerHTML=ins;i3GEO.guias.guiaMovel.desativaIcones();if($i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id)){$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.backgroundColor="#cedff2";$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.boxShadow="none"}},desativaIcones:function(){var ims=$i("i3GEOguiaMovelIcones").getElementsByTagName("button"),n=ims.length,i;for(i=0;i<n;i++){ims[i].style.backgroundColor="white";ims[i].style.boxShadow=""}},ativa:function(chave){if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.escondeGuias();i3GEO.guias.mostra(chave);i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.desativaIcones();if($i(i3GEO.guias.CONFIGURA[chave].id)){$i(i3GEO.guias.CONFIGURA[chave].id).parentNode.style.backgroundColor="#cedff2";$i(i3GEO.guias.CONFIGURA[chave].id).parentNode.style.boxShadow="none"}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;$i("i3GEOguiaMovelIcones").style.display="none";$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1;if(molde.style.display==="block"){$i("i3GEOguiaMovelIcones").style.display="none";$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim.animate();anim1.animate();anim1.onComplete.subscribe(function(){molde.style.display="none"})}else{molde.style.display="block";attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){$i("i3GEOguiaMovelIcones").style.display="block";$i("i3GEOguiaMovelConteudo").style.display="block";i3GEO.guias.guiaMovel.mostraIcones();YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});anim.animate();anim1.animate()}}}}; | |
365 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeCamadas={BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:true,finaliza:"",EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:true,ANIMAMAPA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true},CAMADAS:"",CAMADASINICIAIS:"",ARVORE:null,IDHTML:"listaTemas",SID:null,LOCAPLIC:null,ATIVATEMA:"",cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=(i3GEO.parametros.w/2)-75+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){eval(i3GEO.arvoreDeCamadas.finaliza)}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,newVal,root,tempNode,titulo,d,c,ltema,temaNode,i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("a7")+"</b></td><td>";titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode);estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:noGrupo,expanded:d},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var ins="",imb=i3GEO.util.$im("branco.gif"),estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(this.ARRASTARLIXEIRA===true){ins+="<img "+estilo("i3geo_lixeira")+" onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='"+$trad("t2")+"' />"}if(this.FILTRAR===true){ins+="<img "+estilo("i3geo_filtro")+" onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' />"}if(this.ABRELEGENDA===true){ins+="<img "+estilo("soltaleg2")+" onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' />"}if(this.ALTERAOPACIDADE===true){ins+="<img "+estilo("opacidadeMapa")+" onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='"+$trad("t20")+"' />"}if(this.ANIMAMAPA===true&&(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps")){ins+="<img "+estilo("animaMapa")+" onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='"+$trad("p21")+"' />"}if(this.LIGARDESLIGARTODOS===true){ins+=" <img "+estilo("olhoAberto")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' />";ins+=" <img "+estilo("olhoFechado")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' />"}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick.call()}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var opcoesNode,idtema,ltema,farol,mfarol,tnome="",imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+=" <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+=" <img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+=" <img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+=" <img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.fonte===true){tnome+=" <img class='fonte' src='"+imb+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(funcoes.zoomtema===true)){tnome+=" <img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node);if(funcoes.compartilhar===true&<ema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:false,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&<ema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;if(funcoes.opacidade===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+" <a class='tic' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+" <a class='tic' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","8","")+" <a class='tic' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' href='#' />"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","10","")+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if((ltema.type<4||ltema.type===8)&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&<ema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&<ema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&<ema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}if(funcoes.tme===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t49"),$trad("t49"),'i3GEO.tema.dialogo.tme(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar){desativar=original.data.desativar;nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.configura.templateLegenda!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.configura.templateLegenda)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name)};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:top;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' >";estilo=navm?"cursor:pointer;vertical-align:15%;":"cursor:pointer;";html+="<input class=inputsb style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:20%;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img style='"+estilo+"' src='"+tema.iconetema+"' />"}if(tema.contextoescala.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+=" <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:20%;color:black;";if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA){html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};try{clearTimeout(tempoBotaoAplicar)}catch(erro){}tempoBotaoAplicar="";if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(idtema,camadas){var i;if(!camadas){camadas=i3GEO.arvoreDeCamadas.CAMADAS}i=camadas.length;while(i>0){i-=1;if(camadas[i].name===idtema){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}if(operador==="menor"){if(temp<valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; | |
366 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.navega={TEMPONAVEGAR:600,FATORZOOM:2,timerNavega:null,centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.aproxima(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.afasta(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.zoomponto(i3GEO.atualiza,"+x+","+y+","+tamanho+",'"+simbolo+"','"+cor+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{alert("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.mudaext(i3GEO.atualiza,'"+tipoimagem+"','"+ext+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},aplicaEscala:function(locaplic,sid,escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true)}},panFixo:function(locaplic,sid,direcao,w,h,escala){var x=0,y=0,f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(w===""){w=i3GEO.parametros.w}if(h===""){h=i3GEO.parametros.h}if(escala===""){escala=i3GEO.parametros.mapscale}switch(direcao){case"norte":y=h/6;x=w/2;break;case"sul":y=h-(h/6);x=w/2;break;case"leste":x=w-(w/6);y=h/2;break;case"oeste":x=w/6;y=h/2;break;case"nordeste":y=h/6;x=w-(w/6);break;case"sudeste":y=h-(h/6);x=w-(w/6);break;case"noroeste":y=h/6;x=w/6;break;case"sudoeste":y=h-(h/6);x=w/6;break}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.pan(x,y);return}f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.pan(i3GEO.atualiza,"+escala+",'',"+x+","+y+");";try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},panFixoNorte:function(){i3GEO.navega.panFixo('','','norte','','','')},panFixoSul:function(){i3GEO.navega.panFixo('','','sul','','','')},panFixoOeste:function(){i3GEO.navega.panFixo('','','oeste','','','')},panFixoLeste:function(){i3GEO.navega.panFixo('','','leste','','','')},mostraRosaDosVentos:function(){var novoel,setas,i;try{if(i3GEO.configura.mostraRosaDosVentos==="nao"){return}if(g_tipoacao==="area"){return}}catch(e){}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10||objposicaocursor.imgy>(i3GEO.parametros.h-10)){return}if(!$i("i3geo_rosa")){novoel=document.createElement("div");novoel.id="i3geo_rosa";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navn){novoel.style.opacity=".7"}else{novoel.style.filter="alpha(opacity=70)"}document.body.appendChild(novoel)}setas="<table id='rosaV' >";setas+="<tr onclick=\"javascript:i3GEO.configura.mostraRosaDosVentos='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>";setas+="<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','noroeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','norte','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','nordeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','oeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><table><tr>";setas+="<td><img class='rosamais' title='aproxima' onclick=\"i3GEO.navega.zoomin('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="<td><img class='rosamenos' title='afasta' onclick=\"i3GEO.navega.zoomout('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="</tr></table></td>";setas+="<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','leste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudoeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27+"px";i.style.left=objposicaocursor.telax-27+"px";i.style.display="block";if($i("img")){YAHOO.util.Event.addListener($i("img"),"mousemove",function(){var i=$i("i3geo_rosa");i.style.display="none";YAHOO.util.Event.removeListener(escondeRosa)})}i3GEO.ajuda.mostraJanela('Clique nas pontas da rosa para navegar no mapa. Clique em x para parar de mostrar essa opção.')},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}var i=$i("i3geoboxZoom").style;i.width=0+"px";i.height=0+"px";i.visibility="visible";i.display="block";i.left=objposicaocursor.telax+"px";i.top=objposicaocursor.telay+"px";boxxini=objposicaocursor.telax;boxyini=objposicaocursor.telay;tamanhox=0;tamanhoy=0;if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.zoomBox.desloca()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.zoomBox.desloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}},criaBox:function(){if(i3GEO.navega.timerNavega!==null){return}if(!$i("i3geoboxZoom")){var novoel;novoel=document.createElement("div");novoel.style.width="0px";novoel.style.height="0px";novoel.id="i3geoboxZoom";novoel.style.display="none";novoel.style.fontSize="0px";if(navn){novoel.style.opacity=0.25}novoel.style.backgroundColor="gray";novoel.style.position="absolute";novoel.style.border="2px solid #ff0000";if(navm){novoel.style.filter="alpha(opacity=25)"}novoel.onmousemove=function(){var b,wb,hb;b=$i("i3geoboxZoom").style;wb=parseInt(b.width,10);hb=parseInt(b.height,10);if(navm){if(wb>2){b.width=wb-2+"px"}if(hb>2){b.height=hb-2+"px"}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.navega.zoomBox.termina()};document.body.appendChild(novoel)}},desloca:function(){var bxs,ppx,py;if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}bxs=$i("i3geoboxZoom").style;if(bxs.display!=="block"){return}ppx=objposicaocursor.telax;py=objposicaocursor.telay;if(navm){if((ppx>boxxini)&&((ppx-boxxini-2)>0)){bxs.width=ppx-boxxini-2+"px"}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2+"px"}if(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2+"px"}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2+"px"}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){var valor,v,x1,y1,x2,y2,f,limpa=function(){};if(g_tipoacao!=='zoomli'){i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");return}try{if(i3GEO.navega.timerNavega!==null){return}valor=i3GEO.calculo.rect2ext("i3geoboxZoom",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxZoom");if(bxs){bxs.style.display="none";bxs.style.visibility="hidden";bxs.style.width=0+"px";bxs.style.height=0+"px"}};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.zoomBox.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(v);return}f="i3GEO.navega.timerNavega = null;i3GEO.navega.zoomExt('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','"+i3GEO.configura.tipoimagem+"','"+v+"')";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){limpa.call();return}}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.lente.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.lente.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.lente.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.lente.movimenta()")}},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){alert("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.lente.movimenta()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.lente.atualiza()")},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0 75 75 0)';novoeli=document.createElement("div");novoeli.id="div_di";novoel.appendChild(novoeli);$i("div_di").innerHTML="<p style='position:absolute;top:0px;left:0px'>+-</p>"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(160,0,"","center","center","Feche para parar destaque ","ativadesativaDestaque");YAHOO.util.Event.addListener(janela[0].close,"click",i3GEO.navega.destacaTema.desativa);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.destacaTema.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.destacaTema.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.destacaTema.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()")}},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.destacaTema.atualiza()");i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()");i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+" "+(objposicaocursor.imgx-10)+" "+(objposicaocursor.imgy-10)+" "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+')'}}},barraDeZoom:{cria:function(){var temp="",estilo;if(navn){temp+='<div style="text-align:center;position:relative;left:9px" >'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='<div id="vertMaisZoom" style="'+estilo+'"></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';if(navm){temp+='<div id=vertMenosZoom style="left:-1px;" ></div>'}else{temp+='<div id=vertMenosZoom ></div>'}if(navn){temp+='</div>'}return temp},ativa:function(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w+"px";iclone.style.height=i3GEO.parametros.h+"px";iclone.style.top=corpo.style.top+"px";iclone.style.left=corpo.style.left+"px";$i("img").style.display="none";iclone.style.display="block"}}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousemove=function(){try{var iclone,corpo,nt,nl,velhoh,velhow,nh=0,nw=0,t,l,fatorEscala;iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}nt=0;nl=0;i3geo_ns=parseInt(i3GEO.parametros.mapscale,10);if((g_fatordezoom>0)&&(g_fatordezoom<7)){g_fatordezoom=g_fatordezoom+1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh/g_fatordezoom;nw=velhow/g_fatordezoom;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t+((velhoh-nh)*0.5);nl=l+((velhow-nw)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if((g_fatordezoom<0)&&(g_fatordezoom>-7)){g_fatordezoom=g_fatordezoom-1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh*g_fatordezoom*-1;nw=velhow*g_fatordezoom*-1;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t-((nh-velhoh)*0.5);nl=l-((nw-velhow)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if(iclone){iclone.style.width=nw+"px";iclone.style.height=nh+"px";if(iclone.style.pixelTop){iclone.style.pixelTop=nt}else{iclone.style.top=nt+"px"}if(iclone.style.pixelLeft){iclone.style.pixelLeft=nl}else{iclone.style.left=nl+"px"}}if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3geo_ns}}catch(e){}}}}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}i3GEO.util.criaBox();g_operacao="navega";var idgoogle="googlemaps"+Math.random();i3GEO.janela.cria((i3GEO.parametros.w/2)+25+"px",(i3GEO.parametros.h/2)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>",idgoogle);atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}}; | |
367 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],NAVEGAMAPA:[],MOUSEPARADO:["i3GEO.navega.mostraRosaDosVentos()"],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:[],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(this.TIMERPARADO)}catch(e){this.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(this.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEDOWN)},mouseupMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEUP)},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(this.MOUSECLIQUE)},executaEventos:function(eventos){var f=0;try{if(eventos.length>0){f=eventos.length-1;if(f>=0){do{if(eventos[f]!==""){eval(eventos[f])}}while(f--)}}}catch(e){eventos[f]=""}},posicaoMouseMapa:function(e){var teladd,teladms,container="",targ="",pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;if(!e){e=window.event}try{if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){}if(container!=="divGeometriasTemp"&&container!=="mapaReferencia"){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googlemaps","googleearth","openlayers"])){return}}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id===""&&$i(i3GEO.Interface.IDMAPA)){targ=$i(i3GEO.Interface.IDMAPA)}try{if(g_panM!=='undefined'&&g_panM==="sim"){pos=i3GEO.util.pegaPosicaoObjeto(targ.parentNode)}else{pos=i3GEO.util.pegaPosicaoObjeto(targ)}if(g_panM==="sim"){pos[0]=pos[0]-i3GEO.parametros.w;pos[1]=pos[1]-i3GEO.parametros.h}}catch(m){pos=i3GEO.util.pegaPosicaoObjeto(targ)}mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.pixelsize;ex=i3GEO.parametros.mapexten;try{if(targ.id==="imagemReferencia"){c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;r=$i("i3geo_rosa");if(r){r.style.display="none"}}}catch(e){i3GEO.parametros.celularef=0}teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex,targ.id);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout(function(){i3GEO.eventos.mouseParado()},i3GEO.configura.tempoMouseParado)}catch(e){}try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=true;try{objmapaparado="parar"}catch(e){}};docMapa.onmousedown=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousedownMapa()}};docMapa.onclick=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousecliqueMapa()}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa()}}},botaoDireita:function(exy){try{var k=(navm)?event.button:exy.button;if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){var x,y,doc=document;if(arguments.length===0){ixg="ixg";ixm="ixm";ixs="ixs";iyg="iyg";iym="iym";iys="iys";if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}if(g_tipoacao!=="capturaponto"){return}else{try{if(doc){x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById(ixg)){doc.getElementById(ixg).value=x[0]}if(doc.getElementById(ixm)){doc.getElementById(ixm).value=x[1]}if(doc.getElementById(ixs)){doc.getElementById(ixs).value=x[2]}if(doc.getElementById(iyg)){doc.getElementById(iyg).value=y[0]}if(doc.getElementById(iym)){doc.getElementById(iym).value=y[1]}if(doc.getElementById(iys)){doc.getElementById(iys).value=y[2]}}}catch(m){}}}}; | |
368 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:true,uploadlocal:true,uploadarquivo:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,conectargeojson:true,nuvemTags:true,nuvemTagsFlash:false,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true,carousel:true,inde:true,uploadgpx:true,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true,flutuante:true},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:false,IDSMENUS:[],RETORNAGUIA:"",IDHTML:"arvoreAdicionaTema",LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,flutuante:function(){var janela,temp,cabecalho,minimiza,idold,corpo,altura;cabecalho=function(){};if($i("i3GEOFcatalogo_corpo")){return}minimiza=function(){i3GEO.janela.minimiza("i3GEOFcatalogo")};altura=i3GEO.parametros.w-150;if(altura>500){altura=500}janela=i3GEO.janela.cria("360px",altura+"px","","","",$trad("g1a"),"i3GEOFcatalogo",false,"hd",cabecalho,minimiza);temp=function(){delete(i3GEO.arvoreDeTemas.ARVORE)};YAHOO.util.Event.addListener(janela[0].close,"click",temp,janela[0].panel,{id:janela[0].id},true);corpo=$i("i3GEOFcatalogo_corpo");corpo.style.backgroundColor="white";corpo.innerHTML=$trad("o1");corpo.style.overflow="auto";if($i(i3GEO.arvoreDeTemas.IDHTML)){$i(i3GEO.arvoreDeTemas.IDHTML).innerHTML=""}idold=i3GEO.arvoreDeTemas.IDHTML;delete(i3GEO.arvoreDeTemas.ARVORE);i3GEO.arvoreDeTemas.IDHTML="i3GEOFcatalogo_corpo";i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"");i3GEO.arvoreDeTemas.IDHTML=idold},listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos não definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0,expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,temp;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.arvoreDeTemas.checked=false;i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\")";html+="onclick='javascript:"+adiciona+"' "+" type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >"+layer+" - "+titulo+"</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){var c,m,i,k,jj,j;if(i3GEO.arvoreDeTemas.IDSMENUS.length===0){i3GEO.arvoreDeTemas.MENUS=retorno.data}else{i3GEO.arvoreDeTemas.MENUS=[];c=retorno.data.length;m=i3GEO.arvoreDeTemas.IDSMENUS.length;for(i=0,j=c;i<j;i+=1){for(k=0,jj=m;k<jj;k+=1){if(retorno.data[i].idmenu===i3GEO.arvoreDeTemas.IDSMENUS[k]){i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i])}}}}if(funcao!==""){eval(funcao+"(retorno)")}};i3GEO.php.pegalistademenus(retorno)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data[0];if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var montanos=function(retorno){try{var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight:false},node)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red'>Nada encontrado<br><br></span>",isLeaf:true,expanded:false,enableHighlight:false},node)}}}node.loadComplete()}catch(e){}};i3GEO.php.procurartemasestrela(montanos,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1)},cria:function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes,tipoBotao){if(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.IDHTML)},montaArvore:function(){var tempNode,tempNode1,retorno,root,insp,outrasOpcoes,dados,c,i,j,conteudo,editor;(function(){function changeIconMode(){buildTree()}function buildTree(){i3GEO.arvoreDeTemas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<br><br><table><tr>"+"<td><span style='font-size:12px'> "+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' > </a></span></td>"+"<td><input onclick='javascript:this.select();' class='digitar' type='text' id='i3geo_buscatema' size='15' value='' /></td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table> ";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+" <br>",isLeaf:true,enableHighlight:false,expanded:false,hasIcon:false},root)}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin' target=blank >Sistema de administração</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/arvore.html' target=blank >Editar árvore</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='opção visível apenas para editores' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >Editar menus</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php?tipoxml=kml' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/visual/default/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.flutuante===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='#' onclick='i3GEO.arvoreDeTemas.flutuante()' >Abrir em janela flutuante</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<b> OGC-WMS</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>"+editor,idwms:"raiz",expanded:false,enableHighlight:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<b> "+$trad("t46")+"</b> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' > </a>",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+$im("e"+ig+".png")+"' />",enableHighlight:false,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<b> <span title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<b> <span title='nao publicado' ><s>"+dados[i].nomemenu+"</s></span>"+editor}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu,enableHighlight:false,expanded:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,1);if(dados[i].status==="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"<b>Sistemas</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' > </a>",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<s>"+sis[ig].NOME+"</s>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','Sistemas')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt);if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}}},adicionaNoNavegacaoDir:function(){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){var temp=function(){var drives,iglt,ig,drive,tempNode;drives=i3GEO.arvoreDeTemas.DRIVES;if(drives==undefined||drives==""||drives.length===0){i3GEO.arvoreDeTemas.ARVORE.draw();return}iglt=drives.length;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' > </a>",enableHighlight:false,expanded:false},i3GEO.arvoreDeTemas.ARVORE.getRoot());ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho,enableHighlight:false,expanded:false},tempNode);drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig+=1}while(ig<iglt);i3GEO.arvoreDeTemas.ARVORE.draw()};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,temp)}},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra&&raiz[i].nome!=""){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&grupos[i].nome!=undefined){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' ><s>"+grupos[i].nome+"</s></span>"}}d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos,1);tempNode.isLeaf=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&subgrupos[i].nome!=undefined){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' ><s>"+subgrupos[i].nome+"</s></span>"}}d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaSubGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' ><s>"+temas[i].nome+"</s></span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,conteudo,dirs,tempNode,arquivos;dirs=retorno.data.diretorios;for(ig=0;ig<dirs.length;ig+=1){tempNode=new YAHOO.widget.HTMLNode({html:dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='i3GEO.util.adicionaSHP(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:conteudo,caminho:node.data.caminho+"/"+conteudo},node)}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html,estilo="",clique;if(navm){estilo="padding-top:1px;"}html="<td style='"+estilo+"'><span>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img title='"+tema.tid+"' src='"+$im("down1.gif")+"'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{if(i3GEO.arvoreDeTemas.ATIVATEMAIMEDIATO===false){clique="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeTemas.adicionaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicar\",this)'"}else{clique="onclick='i3GEO.arvoreDeTemas.adicionaTemas([\""+tema.tid+"\"])'"}}html+=clique;if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="</td><td title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='cursor:pointer;font-size:11px;text-align:left;color:"+cor+";padding-left:0px;' "+clique+">";html+=tema.nome;html+="</td></span>";return(html)},propTemas:function(node){var html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >"+$trad("x19")+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface=openlayers_t.htm&temasa="+node.data.idtema+"&layers="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface=openlayers_t.htm&temasa="+node.data.idtema+"&layers="+node.data.idtema;new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>":"<img src='"+i3GEO.util.$im("e0.png")+"'/>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0,imb=i3GEO.util.$im("branco.gif"),OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS,estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(OPCOESADICIONAIS.refresh===true){ins+="<td><img "+estilo("refresh")+" onclick='i3GEO.arvoreDeTemas.atualiza()' title='Refresh'/></td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectaservico()' title='"+$trad("a15")+"'/></td>";t+=20;ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' title='"+$trad("a14")+"'/></td>";t+=20}else{if(OPCOESADICIONAIS.uploadgpx===true){ins+="<td><img "+estilo("uploadgpx")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' title='upload GPX'/></td>";t+=20}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<td><img "+estilo("uploaddbf")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' title='"+$trad("a2b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.uploadlocal===true){ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.upload()' title='"+$trad("a2")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carregaKml===true){ins+="<td><img "+estilo("carregarKml")+" onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' title='Kml'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwms===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' title='"+$trad("a4")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<td><img "+estilo("conectarwmst")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' title='"+$trad("a4b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<td><img "+estilo("conectargeorss")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' title='"+$trad("a5")+"'/></td>";t+=20}}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img "+estilo("download")+" onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' title='"+$trad("a3")+"'/></td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img "+estilo("importarwmc")+" onclick='i3GEO.arvoreDeTemas.dialogo.importarwmc()' title='"+$trad("a3a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img "+estilo("carouselTemas")+" onclick='i3GEO.arvoreDeTemas.dialogo.carouselTemas()' title='Miniaturas'/></td>";t+=20}if(OPCOESADICIONAIS.inde===true){ins+="<td><img "+estilo("buscaInde")+" onclick='i3GEO.arvoreDeTemas.dialogo.buscaInde()' title='Pesquisa na INDE'/></td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk="";if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,html:d,expanded:false},nodePalavra)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,expanded:false,html:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var temp;try{clearTimeout(tempoBotaoAplicar)}catch(e){}tempoBotaoAplicar="";i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length===1&&i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){temp=window.confirm("O tema existe no mapa. Adiciona novamente?");if(!temp){return}}if(tsl.length>0){temp=function(retorno){i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!==i3GEO.guias.ATUAL){i3GEO.guias.escondeGuias();i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.php.adtema(temp,tsl.toString())}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig+=1){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFuploadarquivo")};titulo="Upload de arquivo</a>";janela=i3GEO.janela.cria("250px","150px","","","",titulo,"i3GEOFuploadarquivo",false,"hd",cabecalho,minimiza);$i("i3GEOFuploadarquivo_corpo").style.backgroundColor="white";$i("i3GEOFuploadarquivo_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de arquivo</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.uploadlocal===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.upload()' /></td>"+" <td>Shape file</td>"+" </tr>"}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' /></td>"+" <td>DBF ou CSV</td>"+" </tr>"}if(OPCOESADICIONAIS.uploadgpx===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' /></td>"+" <td>GPX</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadkml()' /></td>"+" <td>KML ou KMZ</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},conectaservico:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFconectaservico")};titulo="Conexão com serviços</a>";janela=i3GEO.janela.cria("260px","150px","","","",titulo,"i3GEOFconectaservico",false,"hd",cabecalho,minimiza);$i("i3GEOFconectaservico_corpo").style.backgroundColor="white";$i("i3GEOFconectaservico_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de conex&aatilde;o</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.carregaKml===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' /></td>"+" <td>KML</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwms===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' /></td>"+" <td>WMS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' /></td>"+" <td>WMS-T</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' /></td>"+" <td>GeoRSS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeojson===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeojson()' /></td>"+" <td>GeoJson</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},carregaKml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carregakml/index.js","i3GEOF.carregakml.criaJanelaFlutuante()","i3GEOF.carregakml_script")},carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},buscaInde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/index.js","i3GEOF.buscainde.criaJanelaFlutuante()","i3GEOF.buscainde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.js","i3GEOF.nuvemtags.criaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","","Nuvem Flash")},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","Diretórios")},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/index.js","i3GEOF.importarwmc.criaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' > </a>")},conectarwmst:function(){var l,a;if(i3GEO.parametros.w){l=i3GEO.parametros.w+150}else{l=400}if(i3GEO.parametros.h){a=i3GEO.parametros.h+200}else{a=350}i3GEO.janela.cria(l/2+"px",a/2+"px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' > </a>")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeojson:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectargeojson/index.js","i3GEOF.conectargeojson.criaJanelaFlutuante()","i3GEOF.conectargeojson_script")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=29' > </a>")},upload:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js","i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")},uploaddbf:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js","i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")},uploadgpx:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadgpx/index.js","i3GEOF.uploadgpx.criaJanelaFlutuante()","i3GEOF.uploadgpx_script")},uploadkml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadkml/index.js","i3GEOF.uploadkml.criaJanelaFlutuante()","i3GEOF.uploadkml_script")}},abrejanelaIframe:function(w,h,s){var janelaeditor=i3GEO.janela.cria(w,h,s,parseInt(Math.random()*100,10),10,s,"janela"+i3GEO.util.randomRGB(),false);YAHOO.util.Event.addListener(janelaeditor[0].close,"click",i3GEO.arvoreDeTemas.atualiza,janelaeditor[0].panel,{id:janelaeditor[0].id},true)}}; | |
369 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={ATIVA:true,TIPO:"yui",OFFSET:-205,MAXBOTOES:11,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{localizar:true,zoomli:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,selecao:true,google:true,barraedicao:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.Interface.ATUAL==="openlayers"){try{i3GEO.Interface.openlayers.OLzoom.deactivate()}catch(e){}}var estilo,temp,ist,cor,ko;this.BOTAOCLICADO=icone;ko=this.LISTABOTOES.length-1;if(this.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(this.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(this.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(this.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(this.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(this.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(this.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){if(i3GEO.barraDeBotoes.ATIVA===false){return}var temp,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43+"px";temp.style.left=posX+18+"px"}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{temp=l[b].iddiv;if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){if(i3GEO.barraDeBotoes.ATIVA===false){return}i3GEO.barraDeBotoes.AJUDA=false;euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(),temp="dockBg-r.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP);if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="dockBg-r2.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-l.png"}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.ATIVAJANELA=true;i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}};if(!$i("euDockMensagem")){temp=document.createElement("div");temp.style.top="38px";temp.style.color="gray";temp.style.textAlign="center";temp.style.fontSize="10px";temp.innerHTML="";temp.id="euDockMensagem";euEnv.euDockArray.euDock_0.div.appendChild(temp)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,e,wj,recuo,novoel,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.i3GEO.janela.botoes=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})}else{YAHOO.i3GEO.janela.botoes=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})}}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","hd2")}},ativaMenuContexto:function(idbarra){if(i3GEO.barraDeBotoes.ATIVA===false){return}var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:" <span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+idbarra;$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){i3GEO.barraDeBotoes.BARRAS[i].show()}}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var i,n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i]&&BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){i3GEO.barraDeBotoes.editor.carregaJs("janelaEditorVetorial")},carregaJs:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js","i3GEO.barraDeBotoes.editor.ativaPainel('"+idjanela+"')","openlayers.js",true)}else{if(!i3GEO.editorOL.layergrafico){i3GEO.editorOL.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="Editor vetorial";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}"}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.editorOL.layergrafico=new OpenLayers.Layer.Vector("Edição",{styleMap:styleMap1,displayInLayerSwitcher:false,visibility:true});i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]);i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}; | |
349 | +i3GEOF=[];YAHOO.namespace("i3GEO");var i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",tamanhodoc:[],temaAtivo:"",contadorAtualiza:0,cria:function(){if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}var temp,tamanho;temp=window.location.href.split("?");if(temp[1]){i3GEO.configura.sid=temp[1];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}if(i3GEO.Interface.ALTTABLET!=""){if(i3GEO.util.detectaTablet()){return}}if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])},inicia:function(retorno){var montaMapa,mashup,tamanho;if(typeof("i3GEOmantemCompatibilidade")==='function'){i3GEOmantemCompatibilidade()}montaMapa=function(retorno){try{var temp,abreJM;if(retorno===""){alert("Ocorreu um erro no mapa - montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;if(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width,10)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}i3GEO.Interface.inicia()}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if($i("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}abreJM="sim";if(i3GEO.util.pegaCookie("botoesAjuda")){abreJM=i3GEO.util.pegaCookie("botoesAjuda");i3GEO.barraDeBotoes.AJUDA=(abreJM==="sim")?true:false}if(i3GEO.configura.iniciaJanelaMensagens===true){i3GEO.ajuda.abreJanela()}if(i3GEO.configura.liberaGuias.toLowerCase()==="sim"){i3GEO.guias.libera()}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if(i3GEO.configura.sid===""){mashup=function(retorno){i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}if(i3GEO.mapa.AUTORESIZE===true){i3GEO.mapa.ativaAutoResize()}},aposIniciar:function(){if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.inicia()}},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(retorno===""){corpoMapa.call();return}if(!retorno.data){alert(retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.Interface.redesenha();if($i("i3GEOidentificalistaTemas")){g_tipoacao="identifica";g_operacao='identifica'}else{g_operacao=""}if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+retorno.data.variaveis.tempo,"");temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[YAHOO.util.Dom.getViewportWidth(),YAHOO.util.Dom.getViewportHeight()];Dw=YAHOO.util.Dom.getDocumentWidth();Dh=YAHOO.util.Dom.getDocumentHeight();novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i("mst");if(temp){temp.style.width="100%"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;i3GEO.php.mudatamanho(i3GEO.atualiza,h,w);switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();break}if(i3GEO.guias.TIPO==="sanfona"){i3GEO.guias.ALTURACORPOGUIAS=h-(antigoh-i3GEO.guias.ALTURACORPOGUIAS)}else{i3GEO.guias.ALTURACORPOGUIAS=h}return[w,h]},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}}; | |
350 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/á|à |ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/Ã/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<input onchange=\""+onch+"\" tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.ResizePanel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas,n,nome="";if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td> <input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value=' ' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value=' ' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento,nx="",texto="Cor",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.ResizePanel(id,{height:"480px",modal:false,width:"380px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versao adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)}; | |
351 | +g_traducao={"p1":[{pt:"O i3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre!. <a href='http://mapas.mma.gov.br/download' target=blank > Descargar</a>",it:"I3geo è un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tamaño",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable Border",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable Logo",es:"Activar/desactivar Logo",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Color of Selection",es:"Color de la selección",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color de fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Gratíla",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Plantilla",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Format of Image Map",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Capas Base",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Leyenda",it:"Attiva legenda"}],"p18":[{pt:"Não imprime a legenda",en:"Disable legend",es:"Desactivar Leyenda",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",en:"Enable or disable the legend of a theme in the print option of the map",es:"Activa o desactiva la leyenda de un tema en la opción de impresión del mapa",it:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa"}],"p20":[{pt:"Tela remota",en:"Remote screen",es:"Pantalla remota",it:"Tela remota"}],"p21":[{pt:"Animação",en:"Animation",es:"Animación",it:"Animation"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"Análise",en:"Analysis",es:"Análisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"u1":[{pt:"Sobre o i3Geo",en:"About i3Geo",es:"Acerca de i3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos códigos",en:"Doc. of the codes",es:"Doc. de los códigos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u4a":[{pt:"Manual do usuário",en:"User manual",es:"Manual de usuario",it:"Manual do usuário"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software público",en:"Software público Brazil",es:"Software público Brasil",it:"Software pubblico"}],"u5b":[{pt:"Lista de funções",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometrías",it:"Geometrie"}],"u7":[{pt:"Grade de poligonos",en:"Polygon grid",es:"Grado de polígonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Gratíla de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hexágonos",en:"Grid of Hexagons",es:"Gratíla de hexágonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Area Influencia (Buffer)",it:"Buffer"}],"u11":[{pt:"Centróide",en:"Centroid",es:"Centroide",it:"Baricentro"}],"u11a":[{pt:"Distância entre pontos",en:"Distance between points",es:"Distancia entre puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N points in polygon",es:"N puntos en polígono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en polígono/raster",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribuição de pontos",en:"Points distribution",es:"Distribución de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u15a":[{pt:"Ferramentas",en:"Tools",es:"Herramientas",it:"Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Captar imágenes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Gratíla",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Polígono",en:"Polygon",es:"Polígonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolve",es:"Disolver",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupar",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro médio",en:"Middle center",es:"Centro medio",it:"Centro médio"}],"u29":[{pt:"Editor vetorial",en:"Vector editor",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui ou clique para excluir",en:"Drag the layer here or make click to remove",es:"Arrastre el tema aquí ó haga clic para excluir",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",en:"Filters the list of layers",es:"Filtra la lista de capas",it:"filtra a lista de camadas"}],"t2b":[{pt:"Abre a legenda do mapa",en:"Opens the map legend",es:"Despliega la leyenda del mapa",it:"Abre a legenda do mapa"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Click to enable or disable this theme, showing it or not on the map. After changing the status of the theme, wait a few moments to get the map to be reloaded, or click the Apply button that will be display.",es:"Haga clic para activar o desactivar este tema, mostrándolo o no en el mapa. Después de cambiar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el botón aplicar que se mostrará.",it:"Fare clic per attivare o disattivare questo tema. Dopo aver modificato lo stato del tema, La mappa aggiornata sarà visualizzata dopo qualche istante. Per visualizzare subito cliccare su Applica"}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn on all layers",es:"Haga clic para activar todos los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn off all layers",es:"Haga clic para desactivar todos los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa seleção",en:"Clear selection",es:"Limpia la selección",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a seleção",en:"Zoom to selection",es:"Zoom a la selección",it:"Zoom della selezione"}],"t5":[{pt:"Limpa seleção existente nesse tema",en:"Clear selection existing in this theme",es:"Limpia la selección existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download this theme in shapefile format",es:"Haga clic para descargar este tema en formato shape",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"Dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"Click and Dragg to rearrange order. Drag and drop to remove. Please to wait to see the legend",es:"Haga clic y arrastre para cambiar el orden. Arrastre y suelte remover. Aguarde para ver la leyenda.",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the order",es:"Arrastre para cambiar el orden",it:"Trascina per modificare l'ordine"}],"t9":[{pt:"A escala do tema é compatível com a escala do mapa",en:"The scale of the theme is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema è compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema é incompatível com a escala do mapa",en:"The scale of the theme is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema è incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema não é conhecida",en:"The scale of the layer is unknown",es:"La escala del tema no es conocida",it:"La scala del tema non è conosciuta"}],"t12":[{pt:"excluir",en:"Delete",es:"Eliminar",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete this layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"Up",es:"Subir",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Click to move up the layer in design order",es:"Haga clic para subir ese tema en la orden de diseño",it:"Clicca per sollevare questo tema nellordine di progettazione"}],"t15":[{pt:"desce",en:"Down",es:"Bajar",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Click to move down the layer in design order",es:"Haga clic para bajar este tema en la orden de diseño",it:"Clicca per scendere questo tema nellordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"Zoom to layer",es:"Zoom al tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Zoom all",es:"Zoom a todo",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Opções e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"t19":[{pt:"Altera a transparência do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency. It make possible to see inferior layers",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati più bassi siano visti"}],"t20":[{pt:"Opacidade",en:"Opacity",es:"Opacidad",it:"Opacità"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Rename layer. Use it for make a better legend of the map",es:"Renombrar tema. Utilice para mejorar la leyenda del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema en base a sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts about this theme, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Etiquetas..",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que serão mostradas quando o mouse é estacionado sobre um elemento desse tema.",en:"Define the label that will be shown when the mouse is over one element of this theme.",es:"Defina las etiquetas que se mostrarán cuando el ratón se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Label...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informações, com base na tabela de atributos.",en:"Insert a Filter in this theme for show specific information, based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtrar...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to this theme.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table of attributes...",es:"Tabla de atributos...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a alteração da forma de representação desse tema.",en:"Opens the legend editor, allowing the modification of the form of representation of this theme.",es:"Abre el editor de leyenda, permitiendo la alteración de la forma de representación de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Edit Legend...",es:"Editar leyenda...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"Shows the data of this layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompaña el ratón",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Mostrar en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema visível apenas em determinadas escalas",en:"Layer is visible in specific scales",es:"Capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gráfico",en:"Graphic",es:"Gráfico",it:"Grafico"}],"t37a":[{pt:"Tema com gráficos",en:"Theme with chart",es:"Tema con Gráfico",it:"Grafico"}],"t37b":[{pt:"Gráfico interativo",en:"Interactive chart",es:"Gráfico Interactivo",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padrão SLD.",en:"Export the legend to standard SLD.",es:"Exporta la leyenda para estándar SLD.",it:"Exporta a legenda para o padrão SLD."}],"t39":[{pt:"Exportar SLD",en:"Export to SLD...",es:"Exportar a SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Opens the tool that lets you change the SQL data access",es:"Abre una herramienta que permite alterar el SQL de acceso a los datos",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"Edit SQL...",es:"Editar SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain efect...",es:"Efecto Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"Apply SLD...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comment",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Most popular",es:"Mas populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",en:"Interval in seconds after which the layer will be updated. To ignore, leave blank",es:"Intervalo en segundos despues del cual la capa será actualizada. Para ignorar, deje en blanco.",it:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizador"}],"t49":[{pt:"Mapa temático 3D",en:"Thematic map 3D",es:"Mapa temático 3D",it:"Mapa temático 3D"}],"a1":[{pt:"procurar tema:",en:"Search layer:",es:"Buscar Tema:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Subir archivo shape",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload DBF or CSV file",es:"Subir archivo DBF o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Descarga de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Import Web Map Context (WMC)",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"Connect to WMS Server",es:"Conectar al servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"Connect to WMS-T Server",es:"Conectar al servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"Connect to GeoRss",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Nube de Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Click to connect or disconnect this layer, showing it or not on the map. After changing the layer status, wait a few moments to be reloaded on the map, or click in the button Apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostrándolo o no en el mapa. Después de alterar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el botón aplicar que aparecerá",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verrà visualizzato."}],"a9":[{pt:"Fonte",en:"Font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"código:",en:"Code",es:"Código",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir en Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Subir SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"a15":[{pt:"Conexões",en:"Conections",es:"Conexiones",it:"Conexões"}],"a16":[{pt:"Serviços",en:"Services",es:"Servicios",it:"Servers"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Catálogo",en:"Catalog",es:"Catálogo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agregar",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca rápida",en:"Quick search",es:"Búsqueda rápida",it:"Ricerca rapida"}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"dinâmico",en:"Dynamic",es:"Dinámico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz´-lo no mapa. O centro do mapa ser´ deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazará para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrangência geográfica da inicialização.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajustándola para mostrar la misma área geográfica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d2t":[{pt:"Enquadramento inicial",en:"Initial extent",es:"Encuadre inicial",it:"enquadramento inicial"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a região indicada por um retângulo. Após ativada, clique e arraste o mouse sobre o mapa na área de zoom desejada.",en:"Extends the map - places the point where you clicked in the center of the screen or extends to the region indicated by a rectangle. Once activated, click and drag the mouse over the map in the desired zoom area",es:"Amplía el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o amplía a la región indicada con un rectángulo. Después de activarla, haga clic y arrastre el ratón sobre el mapa en el área de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nellarea di zoom desiderata."}],"d3t":[{pt:"clique e arraste para ampliar",en:"Click and drag to enlarge",es:"Haga click y arraste para ampliar",it:"clique e arraste para ampliar"}],"d4":[{pt:"Desloca a região visível no mapa. Após ativada, clique e arraste o mouse sobre o mapa para deslocar a região visível.",en:"Moves the visible region on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desplaza la región visible en el mapa. Después de activada, haga clic y arrastre el ratón sobre el mapa para mover la región visible.",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d4t":[{pt:"clique e arraste para deslocar",en:"Click and drag to move",es:"Haga Click y arraste para mover",it:"clique e arraste para deslocar"}],"d5":[{pt:"Amplia o mapa tendo como referência o centro atual.",en:"Magnify the map with the reference the current center.",es:"Amplía el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d5t":[{pt:"aproximar",en:"zoom in",es:"Acercar",it:"aproximar"}],"d6":[{pt:"Reduz o mapa tendo como referência o centro atual.",en:"Reduces the map with the reference of the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d6t":[{pt:"afastar",en:"Zoom out",es:"Alejar",it:"afastar"}],"d7":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on the map.",es:"Muestra información sobre un punto en el mapa. Después de activarla haga clic sobre el mapa.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7t":[{pt:"clique para identificar",en:"Click to identify",es:"Click para identificar",it:"clique para identificar"}],"d7a":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. After activated, stop the mouse for a moment at the desired point or click on it.",es:"Muestra información sobre un punto en el mapa. Después de activarse, detenga el ratón por un momento en el punto deseado o haga click en él.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d7at":[{pt:"etiqueta",en:"Label",es:"Etiqueta",it:"etiqueta"}],"d8":[{pt:"Mostra a extensão geográfica atual em coordenadas geográficas",en:"Shows the current extend in geographic coordinates",es:"Muestra la extensión geográfica actual en coordenadas geográficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d8t":[{pt:"extensão atual",en:"Actual extent",es:"Extensió actual",it:"extensão atual"}],"d9":[{pt:"Abre/fecha o mapa de referência",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d9t":[{pt:"mapa de referência",en:"Reference map",es:"Mapa de referencia",it:"mapa de referência"}],"d10":[{pt:"Digite o novo valor de escala e clique no botão aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el botón aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrangência atual do mapa. Faça um zoom no mapa antes de abrir essa opção. Regiôes muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current extend of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very slow search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opción. Regiones muy extensas pueden ocasionar una búsqueda muy lentas",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dellapertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d11t":[{pt:"buscar na Wikipédia",en:"search in Wikipedia",es:"buscar na Wikipedia",it:"buscar na Wikipédia"}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usuário no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3D",en:"Generates file for 3D",es:"Genera archivo para 3D",it:"Genera file per 3D"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de satélite da região vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region on the map",es:"Abre Google Maps, mostrando una imagen de satélite de la región en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d15t":[{pt:"Google Maps",en:"Google Maps",es:"Google Maps",it:"Google Maps"}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Buscar documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d16t":[{pt:"Scielo",en:"Scielo",es:"Scielo",it:"Scielo"}],"d17":[{pt:"Projeto Confluence. Pontos de intersecção de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersección de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d17t":[{pt:"confluências",en:"Confluences",es:"Confluencias",it:"confluências"}],"d18":[{pt:"Abre lente de ampliação",en:"Opens magnifying lens",es:"Abrir lupa",it:"Apri lente di ingrandimento"}],"d18t":[{pt:"lente",en:"lens",es:"lente",it:"lente"}],"d19":[{pt:"Coloca as guias em uma janela móvel",en:"Open the tabs in a window mobile",es:"Coloca las guías en una ventana móvil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configuraçôes iniciais.",en:"Reload the map with the initial configurations.",es:"Recarga el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d20t":[{pt:"reinicia",en:"restart",es:"reinicia",it:"reinicia"}],"d21":[{pt:"Mede a distância entre dois ou mais pontos clicados no mapa (menor distância). O cálculo de distância é aproximado e sua precisão depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (shortest distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o más puntos marcados en el mapa (menor distancia). El cálculo de distancia es aproximado y su precisión depende de la escala del mapa.",it:"Misura la distanza tra due o più punti cliccati sulla mappa (minore distanza). Il calcolo della distanza è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21t":[{pt:"distância",en:"distance",es:"distancia",it:"distância"}],"d21a":[{pt:"Mede a área de um polígono desenhado na tela. O cálculo de área é aproximado e sua precisão depende da escala do mapa.",en:"It measures the area of a polgono drawn on the screen. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mide el área de un polígono dibujado sobre la pantalla. El cálculo del área es aproximado y su precisión depende de la escala del mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21at":[{pt:-"área",en:"area",es:"área",it:"área"}],"d22":[{pt:"Insere pontos no mapa em coordenadas geográficas. Ospontos incluídos podem ser transformados em linhas ou polígonos. Os pontos são armazenados em um tema temporário, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. The points included can be converted into lines or polygons. The points are stored in a temporary layer, and we can download it like shapefile.",es:"Inserte puntos en el mapa en coordenadas geográficas. Los puntos incluidos pueden transformarse en líneas o polígonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse la descarga en formato de archivo shape.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilità di effettuare il download del file Shapefile."}],"d22t":[{pt:"inserir pontos",en:"insert points",es:"insertar puntos",it:"inserir pontos"}],"d23":[{pt:"Insere um gráfico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores numéricos na tabela de atributos.",en:"Insert a graphic of the existing attributes on the selected layer in the clicked point. The layer must have columns with numerical values in the table of attributes.",es:"Inserte un gráfico en el punto marcado según los atributos existentes en el tema seleccionado. El tema debe tener campos con valores numéricos en la tabla de atributos.",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para seleção de elementos de um tema. Os elementos selecionados podem ser utilizados em outras operaçôes, como buffer e seleção por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other operations like buffer or selection by theme.",es:"Abre las herramientas para selección de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras operaciones como áreas de influencia o selección por tema",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d24t":[{pt:"Selecionar",en:"Select",es:"Seleccionar",it:"Selecionar"}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa opção para adicionar informaçôes ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opción para agregar información al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d25t":[{pt:"Inserir texto",en:"Insert text",es:"Insertar texto",it:"Inserir texto"}],"d26":[{pt:"Escolha o visual para os botões e outras características visuais do mapa",en:"Choose the visual for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras características visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait... generating files",es:"Espere... generando los archivos",it:"Attendere..."}],"d29":[{pt:"Estações METAR",en:"METAR-Br Stations",es:"Estaciones METAR-Br",it:"Estações metar"}],"d30":[{pt:"Linha do tempo",en:"Timeline",es:"Línea del tiempo",it:"Linha do tempo"}],"d31":[{pt:"Não existe nenhuma camada com etiquetas ativas",en:"There is no layer with active labels",es:"No existe ninguna capa con etiquetas activas",it:"Não existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navegação com o mouse",en:"Mouse navigation",es:"Navegación con el ratón",it:"Navegação com o mouse"}],"ge2":[{pt:"Barra de status",en:"Status bar",es:"Barra de estado",it:"Barra de status"}],"ge3":[{pt:"Mapa de referência",en:"Reference map",es:"Mapa de referencia",it:"Mapa de referência"}],"ge4":[{pt:"Escala e legenda",en:"Scale and legend",es:"Escala y leyenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosphere",es:"Atmósfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Coordinates grid",es:"Grilla de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Sunshine",es:"Luz del sol",it:"Luz do sol"}],"ge8":[{pt:"Limites políticos",en:"Political boundaries",es:"Límites políticos",it:"Limites políticos"}],"ge9":[{pt:"Construções em 3D",en:"Buildings in 3D",es:"Construciones en 3D",it:"Construções em 3D"}],"ge10":[{pt:"Estradas",en:"Roads",es:"Carreteras",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terrain",es:"Terreno",it:"Terreno"}],"x1":[{pt:"Página principal",en:"Home",es:"Inicio",it:"Página principal"}],"x2":[{pt:"Lista de menus",en:"Menu list",es:"Lista de menús",it:"Lista de menus"}],"x3":[{pt:"Miniaturas",en:"Thumbnails",es:"Miniaturas",it:"Miniaturas"}],"x4":[{pt:"Pesquisa na INDE",en:"Search in SDI of INDE-Br",es:"Buscar en IDE del INDE-Br",it:"Pesquisa na INDE"}],"x5":[{pt:"Editar subgrupos",en:"Edit subgroups",es:"Editar subgrupos",it:"Editar subgrupos"}],"x6":[{pt:"Editar temas",en:"Edit Theme",es:"Editar temas",it:"Editar temas"}],"x7":[{pt:"opção visível apenas para editores",en:"option visible only for editors",es:"opción visible solo para editores",it:"opção visível apenas para editores"}],"x8":[{pt:"Sistema de administração",en:"Admin. System",es:"Sistema de administración",it:"Sistema de administração"}],"x9":[{pt:"Editar árvore",en:"Edit tree",es:"Editar árbol",it:"Editar árvore"}],"x10":[{pt:"Editar menus",en:"Edit menus",es:"Editar menus",it:"Editar menus"}],"x11":[{pt:"Mostra a legenda em uma janela",en:"Show the legend in a window",es:"Muestra una leyenda en una ventana",it:"Mostra a legenda em uma janela"}],"x13":[{pt:"&Acute;rvore de camadas não encontrada",en:"Tree layers not found",es:"Arboles de capas no se encuentra",it:"&Acute;rvore de camadas não encontrada"}],"x14":[{pt:"sim",en:"si",es:"yes",it:"sim"}],"x15":[{pt:"não",en:"no",es:"no",it:"nao"}],"x16":[{pt:"Valor não definido",en:"Value not set",es:"Valor no establecido",it:"Valor não definido"}],"x17":[{pt:"Essa opção afeta apenas a impressão do mapa",en:"This option only affects the printing of the map",es:"Esta opción s&ocaute;lo afecta a la impresi&ocaute;n del mapa",it:"Essa opção afeta apenas a impressão do mapa"}],"x18":[{pt:"Nome não definido",en:"El nombre no se ha definido",es:"Name was not defined",it:"Name was not defined"}],"x19":[{pt:"Comentários de",en:"Reviews",es:"Comentarios",it:""}],"x20":[{pt:"Clique no mapa para desenhar o polígono",en:"Click the map to draw the polygon",es:"Haga clic en el mapa para dibujar el polígono",it:"Click the map to draw the polygon"}],"x21":[{pt:"Essa operação não funciona nessa interface",en:"This operation does not work on this interface",es:"Esta operación no funciona en esta interfaz",it:""}],"x22":[{pt:"Opção não disponível",en:"Option not available",es:"Opción no disponible",it:"Opci�n no disponible"}],"x23":[{pt:"Direção",en:"",es:"Dirección",it:"Direction"}],"x25":[{pt:"Método para calcular distâncias",en:"Method to calculate distances",es:"Método para calcular distancias",it:"Method to calculate distances"}],"x26":[{pt:"Voce quer mesmo encerrar a sessao?",en:"Do you really want to logout?",es:"¿Realmente desea salir?",it:""}],"x27":[{pt:"Usuário",en:"User",es:"Usuario",it:""}],"x28":[{pt:"Senha",en:"Password",es:"Contraseña",it:""}],"x29":[{pt:"Enviar",en:"Send",es:"Enviar",it:""}],"x30":[{pt:"Ativo",en:"Active",es:"Activo",it:""}],"x31":[{pt:"Erro",en:"Error",es:"Erro",it:""}],"x32":[{pt:"Enviar senha",en:"Send password",es:"Enviar la contraseña",it:""}],"x33":[{pt:"",en:"",es:"",it:""}]}; | |
352 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.idioma={MOSTRASELETOR:true,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id){if(i3GEO.idioma.DICIONARIO[id]){var t=i3GEO.idioma.DICIONARIO[id][0];return t[i3GEO.idioma.ATUAL]}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k=0;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel,temp,iu=i3GEO.util;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<550){w="width:12px;"}else{w=""}for(i=0;i<n;i++){temp=i3GEO.idioma.SELETORES[i];ins+='<img style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+iu.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+temp+'\')" ';if(temp==="en"){ins+='alt="Ingles" id="uk" />'}if(temp==="pt"){ins+='alt="Portugues" id="brasil" />'}if(temp==="es"){ins+='alt="Espanhol" id="espanhol" />'}if(temp==="it"){ins+='alt="Italiano" id="italiano" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}}};$trad=function(id){return(i3GEO.idioma.traduzir(id))};(function(){try{var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c);g_linguagem=c}else{if(typeof(g_linguagem)!=="undefined"){i3GEO.idioma.define(g_linguagem)}else{g_linguagem="pt";i3GEO.idioma.define("pt")}}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}}catch(e){alert("Problemas com idiomas "+e)}})(); | |
353 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}cpJSON=new cpaint();cpJSON.set_response_type("JSON");cpJSON.set_transfer_mode("POST");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.locaplic não esta definida")}if(i3GEO.configura.sid===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.sid não esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereSHPgrafico",$trad("o1"));cpJSON.call(p,"insereSHPgrafico",retorno,par)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};cpJSON.call(p,"insereSHP",retorno,par)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao,par)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao,par)},excluitema:function(funcao,temas){var layer,retorno,p,n,i,par;i3GEO.php.verifica();retorno=function(retorno){i3GEO.janela.fechaAguarde("excluitema");n=temas.length;for(i=0;i<n;i++){if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(temas[i]);if(layer.length>0){i3geoOL.removeLayer(layer[0])}}if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(temas[i]);if(indice!==false){i3GeoMap.overlayMapTypes.removeAt(indice)}}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(temas[i]);i3GeoMap.getFeatures().removeChild(indice)}}funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("excluitema",$trad("o1"));p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php";par="funcao=excluitema&temas="+temas+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"excluitema",retorno,par)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID,retorno=function(retorno){i3GEO.janela.fechaAguarde("reordenatemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reordenatemas",$trad("o1"));cpJSON.call(p,"reordenatemas",retorno,par)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}cpJSON.call(i3GEO.configura.locaplic+"/classesphp/mapa_controle.php","criaLegendaHTML",funcao,"funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe,retorno=function(retorno){i3GEO.janela.fechaAguarde("inverteStatusClasse");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("inverteStatusClasse",$trad("o1"));cpJSON.call(p,"inverteStatusClasse",retorno,par)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"ligaDesligaTemas",retorno,par)},pegalistademenus:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistademenus",funcao,par)},pegalistadegrupos:function(funcao,id_menu,listasgrupos){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadegrupos",funcao,par)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadeSubgrupos",funcao,par)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao,par)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao,par)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao,par)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao,par)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao,par)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},listadrives:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao,par)},listaarquivos:function(funcao,caminho){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao,par)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao,par)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao,par)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatamanho");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatamanho",$trad("o1"));cpJSON.call(p,"pegaSistemas",retorno,par)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ativalogo&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("ativalogo");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("ativalogo",$trad("o1"));cpJSON.call(p,"ativalogo",retorno,par)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereAnnotation");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereAnnotation",$trad("o1"));cpJSON.call(p,"inserefeature",retorno,par)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"identificaunico",funcao,par)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=recuperamapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("recuperamapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("recuperamapa",$trad("o1"));cpJSON.call(p,"recuperamapa",retorno,par)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao,par)},referenciadinamica:function(funcao,zoom,tipo){i3GEO.php.verifica();if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferenciaDinamica",funcao,par)},referencia:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referencia&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferencia",funcao,par)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao,par)},aproxima:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aproxima",funcao,par)},afasta:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"afasta",funcao,par)},zoomponto:function(funcao,x,y,tamanho,simbolo,cor){i3GEO.php.verifica();if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}var retorno=function(retorno){i3GEO.janela.fechaAguarde("zoomponto");if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(x,y)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.pan2ponto(x,y)}funcao.call(funcao,retorno)},p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor;i3GEO.janela.abreAguarde("zoomponto",$trad("o1"));cpJSON.call(p,"zoomponto",retorno,par)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao,par)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){var retorno;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;atualiza=true;geo=false}if(geo===undefined){geo=false}if(atualiza===undefined){atualiza=true}if(ext===undefined){alert("extensao nao definida");return}retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":if(atualiza===true){i3GEO.Interface.googlemaps.zoom2extent(ext)}break;case"googleearth":if(atualiza===true){i3GEO.Interface.googleearth.zoom2extent(ext)}break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(ext);break}try{funcao.call(funcao,retorno)}catch(e){}};var p=locaplic+"/classesphp/mapa_controle.php";var par="funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo;cpJSON.call(p,"mudaext",retorno,par)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudaescala");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudaescala",$trad("o1"));cpJSON.call(p,"mudaescala",retorno,par)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"crialente",funcao,par)},geradestaque:function(funcao,tema,ext){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext,retorno=function(retorno){i3GEO.janela.fechaAguarde("geradestaque");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("geradestaque",$trad("o1"));cpJSON.call(p,"geradestaque",retorno,par)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoPT",funcao,par)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=selecaobox&ext="+box+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao,par)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoext",funcao,par)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoatrib2",funcao,par)},selecaotema:function(funcao,temao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaotema",funcao,par)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("sobetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("sobetema",$trad("o1"));cpJSON.call(p,"sobetema",retorno,par)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("descetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("descetema",$trad("o1"));cpJSON.call(p,"descetema",retorno,par)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("fontetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("fontetema",$trad("o1"));cpJSON.call(p,"fontetema",retorno,par)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomtema",$trad("o1"));cpJSON.call(p,"zoomtema",retorno,par)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomsel",$trad("o1"));cpJSON.call(p,"zoomsel",retorno,par)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("limpasel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("limpasel",$trad("o1"));cpJSON.call(p,"limpasel",retorno,par)},invertestatuslegenda:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("invertestatuslegenda");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("invertestatuslegenda",$trad("o1"));cpJSON.call(p,"invertestatuslegenda",retorno,par)},aplicaCorClasseTema:function(funcao,idtema,idclasse,rgb){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("aplicaCorClasseTema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("aplicaCorClasseTema",$trad("o1"));cpJSON.call(p,"aplicaCorClasseTema",retorno,par)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatransp");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatransp",$trad("o1"));cpJSON.call(p,"mudatransp",retorno,par)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudanome");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudanome",$trad("o1"));cpJSON.call(p,"mudanome",retorno,par)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid){if(arguments.length===11){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao,par)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaSHP");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaSHP",$trad("o1"));cpJSON.call(p,"adicionaTemaSHP",retorno,par)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaIMG");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaIMG",$trad("o1"));cpJSON.call(p,"adicionaTemaIMG",retorno,par)},identifica:function(funcao,x,y,resolucao,locaplic,sid){var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica&opcao=tip&xy="+x+","+y+"&resolucao=5&g_sid="+sid;cpJSON.call(p,"identifica",funcao,par)},identifica2:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas="";resolucao=5}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao="+resolucao+"&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){par+="&tema="+tema}cpJSON.call(p,"identifica",funcao,par)},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("reiniciaMapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reiniciaMapa",$trad("o1"));cpJSON.call(p,"reiniciaMapa",retorno,par)},procurartemas:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemas2:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas2&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemasestrela:function(funcao,nivel,fatorestrela,locaplic){if(arguments.length===3){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemasestrela&map_file=&nivel="+nivel+"&fatorestrela="+fatorestrela+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemasestrela");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemasestrela",$trad("o1"));cpJSON.call(p,"foo",retorno,par)}catch(e){}},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=adtema&temas="+temas+"&g_sid="+sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("adtema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adtema",$trad("o1"));cpJSON.call(p,"adtema",retorno,par)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao,par)},googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googlemaps",$trad("o1"));cpJSON.call(p,"googlemaps",retorno,par)},googleearth:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googleearth&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googleearth");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googleearth",$trad("o1"));cpJSON.call(p,"googleearth",retorno,par)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("openlayers",$trad("o1"));cpJSON.call(p,"openlayers",retorno,par)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.recalcPar();par+="&mapexten="+i3GEO.parametros.mapexten}cpJSON.call(p,"corpo",funcao,par)},converte2googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2googlemaps",$trad("o1"));cpJSON.call(p,"converte2googlemaps",retorno,par)},converte2openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2openlayers",$trad("o1"));cpJSON.call(p,"converte2openlayers",retorno,par)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaMapa&"+parametros,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"criaMapa",funcao,par)},inicia:function(funcao,embedLegenda,w,h){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"iniciaMapa",funcao,par)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao,par)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php",par="funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao,par)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer;cpJSON.call(p,"listaLayersWMS",funcao,par)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php",par="map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao,par)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaItensTema",funcao,par)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaRegistros",funcao,par)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=extregistros®istro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao,par)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao,par)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg&map_file=";cpJSON.call(p,"listaEpsg",funcao,par)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema,retorno=function(retorno){i3GEO.janela.fechaAguarde("criatemaSel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("criatemaSel",$trad("o1"));cpJSON.call(p,"chavegoogle",retorno,par)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao,par)},alteraData:function(funcao,tema,data){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data;cpJSON.call(p,"alteradata",funcao,par)},dadosPerfilRelevo:function(funcao,opcao,pontos,amostragem,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem+"&item="+item)},funcoesGeometriasWkt:function(funcao,listaWkt,operacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=funcoesGeometriasWkt&operacao="+operacao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&geometrias="+listaWkt)}}; | |
354 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.configura={grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"},{nome:$trad("u15a"),id:"ferramentas"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu1",text:$trad("u1"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u4a"),url:"javascript:i3GEO.ajuda.abreDoc('/documentacao/manual-i3geo-4_7-pt.pdf')"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"javascript:i3GEO.ajuda.abreDoc('/ajuda_usuario.php')"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("d27")+'</b></span>',url:"#"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Serviços WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperbólica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}],"ferramentas":[{id:"omenudataFerramentas0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("g4a")+'</b></span>',url:"#"},{id:"omenudataFerramentas4a",text:$trad("g1a"),url:"javascript:i3GEO.arvoreDeTemas.flutuante()"},{id:"omenudataFerramentas1a",text:$trad("t20"),url:"javascript:i3GEO.mapa.dialogo.opacidade()"},{id:"omenudataFerramentas2a",text:$trad("p21"),url:"javascript:i3GEO.mapa.dialogo.animacao()"},{id:"omenudataFerramentas3a",text:$trad("d24t"),url:"javascript:i3GEO.mapa.dialogo.selecao();"},{id:"omenudataFerramentas0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a7")+'</b></span>',url:"#"},{id:"omenudataFerramentas1b",text:$trad("t31"),url:"javascript:i3GEO.tema.dialogo.tabela()"},{id:"omenudataFerramentas2b",text:$trad("t23"),url:"javascript:i3GEO.tema.dialogo.procuraratrib()"},{id:"omenudataFerramentas3b",text:$trad("t25"),url:"javascript:i3GEO.tema.dialogo.toponimia()"},{id:"omenudataFerramentas4b",text:$trad("t27"),url:"javascript:i3GEO.tema.dialogo.etiquetas()"},{id:"omenudataFerramentas5b",text:$trad("t29"),url:"javascript:i3GEO.tema.dialogo.filtro()"},{id:"omenudataFerramentas6b",text:$trad("t33"),url:"javascript:i3GEO.tema.dialogo.editaLegenda()"},{id:"omenudataFerramentas7b",text:$trad("t42"),url:"javascript:i3GEO.tema.dialogo.cortina()"},{id:"omenudataFerramentas8b",text:$trad("t37a"),url:"javascript:i3GEO.tema.dialogo.graficotema()"},{id:"omenudataFerramentas9b",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataFerramentas10b",text:$trad("t49"),url:"javascript:i3GEO.tema.dialogo.tme()"},{id:"omenudataFerramentas0c",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a15")+'</b></span>',url:"#"},{id:"omenudataFerramentas1c",text:$trad("a16"),url:"javascript:i3GEO.arvoreDeTemas.dialogo.conectaservico()"},{id:"omenudataFerramentas0d",text:'<span style=color:gray;text-decoration:underline; ><b>Upload</b></span>',url:"#"},{id:"omenudataFerramentas3d",text:"Vetor (shp,dbf,csv,gpx,kml)",url:"javascript:i3GEO.arvoreDeTemas.dialogo.uploadarquivo()"}]}},tipoimagem:"nenhum",ajustaDocType:true,tipotip:"balao",alturatip:"200px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:70,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:1800,iniciaJanelaMensagens:false,mostraRosaDosVentos:"nao",liberaGuias:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:"",constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),titulo:$trad("d2t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"localizar",tipo:"",dica:$trad("o2"),titulo:$trad("o2"),funcaoonclick:function(){if(!$i("janelaBuscaRapida")){var janela=i3GEO.janela.cria("258px","20px","","","","Busca rápida","janelaBuscaRapida",false,"hd","","");$i("janelaBuscaRapida_corpo").style.backgroundColor="white";i3GEO.gadgets.mostraBuscaRapida(janela[2].id)}}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),titulo:$trad("d3t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.mensagemSimples("Pressione a tecla CTRL junto com o botão esquerdo do mouse e arraste para definir a área de zoom","?");g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}var temp;temp="zoom";i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);g_operacao='navega';g_tipoacao='zoomli';i3GEO.barraDeBotoes.ativaIcone("zoomli");marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLzoom);return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}if(i3GEO.eventos.MOUSEDOWN.toString().search("i3GEO.navega.zoomBox.inicia()")<0){i3GEO.eventos.MOUSEDOWN.push("i3GEO.navega.zoomBox.inicia()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}i3GEO.barraDeBotoes.BOTAOPADRAO="zoomli"}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),titulo:$trad("d4t"),funcaoonclick:function(){var temp;g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="pan";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="pan_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}return}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),titulo:$trad("d5t"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),titulo:$trad("d6t"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),titulo:$trad("d7t"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");g_tipoacao='identifica';g_operacao='identifica';cliqueIdentifica=function(){if(g_operacao==="identifica"||i3GEO.barraDeBotoes.BOTAOPADRAO==="identifica"){g_operacao="identifica";eval(i3GEO.configura.funcaoIdentifica)}var temp=function(){},i;i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp);i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica");i=$i("i3GEOmarcaIdentifica");if(i){i.style.display="block"}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")<0){i3GEO.eventos.MOUSECLIQUE.push("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSECLIQUE.remove("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),titulo:$trad("d7at"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){alert($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");g_tipoacao='identifica';g_operacao='identifica';verificaTip=function(){if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}if($i("marcaIdentifica")){return}if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoTip)}else{i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")>0){i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSECLIQUE.push("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSEPARADO.push("verificaTip()")}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),titulo:$trad("d8t"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),titulo:$trad("d9t"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),titulo:$trad("d11t"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),titulo:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",titulo:"fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),titulo:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),titulo:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),titulo:$trad("d15t"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),titulo:$trad("d16t"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),titulo:$trad("d17t"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),titulo:$trad("d18t"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),titulo:$trad("d20t"),funcaoonclick:function(){var temp=function(){var url=(window.location.href.split("?"));window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),titulo:$trad("d21t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),titulo:$trad("d21at"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"barraedicao",tipo:"",dica:$trad("u29"),titulo:$trad("u29"),funcaoonclick:function(){i3GEO.barraDeBotoes.editor.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),titulo:$trad("d22t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),titulo:$trad("d24t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),titulo:$trad("d25t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",titulo:"roteamento",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","Rota");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="Não foi possível criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);alert("Clique o ponto de origem da rota")}}]}}; | |
355 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.parametros.mapexten;cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{alert("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}}; | |
356 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={richdraw:"",estilos:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w){try{i3GEO.desenho.richdraw.renderer.create('circ','',i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){padrao=i3GEO.desenho.estilos[padrao];i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}}; | |
357 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.Interface={TABLET:false,ALTTABLET:"openlayers_t.htm",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:20,BARRADEZOOMLEFT:10,ATUAL:"openlayers",IDCORPO:"corpoMapa",ATIVAMENUCONTEXTO:false,IDMAPA:"",STATUS:{atualizando:[],trocando:false},atual2gm:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(google){i3GEO.Interface.atual2gm.initemp()}}catch(e){i3GEO.util.scriptTag("http://www.google.com/jsapi?callback=i3GEO.Interface.atual2gm.loadMaps","","",false)}},loadMaps:function(){google.load("maps","3",{callback:"i3GEO.Interface.atual2gm.initemp",other_params:"sensor=false"})},initemp:function(){var temp=function(){$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.googlemaps.inicia();i3GEO.janela.fechaAguarde("googleMapsAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("openlayers",i3GEO.configura.locaplic+"/imagens/dobraopenlayers.png")};i3GEO.php.converte2googlemaps(temp)}},atual2ol:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(OpenLayers){i3GEO.Interface.atual2ol.initemp()}}catch(e){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/openlayers/OpenLayers211.js.php","i3GEO.Interface.atual2ol.initemp()","",false)}},initemp:function(){var temp=function(){OpenLayers.ImgPath="../pacotes/openlayers/img/";$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.openlayers.inicia();i3GEO.janela.fechaAguarde("OpenLayersAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("googlemaps",i3GEO.configura.locaplic+"/imagens/dobragooglemaps.png");i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten)};i3GEO.php.converte2openlayers(temp)}},redesenha:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()},aplicaOpacidade:function(opacidade){i3GEO.Interface[i3GEO.Interface.ATUAL].aplicaOpacidade(opacidade)},atualizaMapa:function(){switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()}},atualizaTema:function(retorno,tema){i3GEO.Interface[i3GEO.Interface.ATUAL].atualizaTema(retorno,tema)},adicionaKml:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}i3GEO.navega.autoRedesenho.ativa();i3GEO.util.defineValor("i3geo_escalanum","value",i3GEO.parametros.mapscale);if((i3GEO.parametros.geoip==="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.Interface[i3GEO.Interface.ATUAL].inicia();if($i(i3GEO.login.divnomelogin)&&i3GEO.util.pegaCookie("i3geousuarionome")){$i(i3GEO.login.divnomelogin).innerHTML=i3GEO.util.pegaCookie("i3geousuarionome")}},alteraParametroLayers:function(parametro,valor){i3GEO.Interface[i3GEO.Interface.ATUAL].alteraParametroLayers(parametro,valor)},ativaBotoes:function(){if(i3GEO.Interface.STATUS.trocando===false){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{i3GEO.Interface[i3GEO.Interface.ATUAL].ativaBotoes()}}},openlayers:{FUNDOTEMA:"yellow",TILES:false,BUFFER:0,GADGETS:{PanZoomBar:true,PanZoom:false,LayerSwitcher:true,ScaleLine:true,OverviewMap:false},MINEXTENT:[-0.0005,-0.0005,0.0005,0.0005],MAXEXTENT:[-180,-90,180,90],LAYERSADICIONAIS:[],redesenha:function(){var openlayers=i3GEO.Interface.openlayers;openlayers.criaLayers();openlayers.ordenaLayers();openlayers.recalcPar();i3GEO.janela.fechaAguarde();openlayers.sobeLayersGraficos()},cria:function(w,h){var f,ins,mi=i3GEO.Interface.openlayers.MINEXTENT,ma=i3GEO.Interface.openlayers.MAXEXTENT,i=$i(i3GEO.Interface.IDCORPO),bb=i3GEO.barraDeBotoes;OpenLayers.DOTS_PER_INCH=i3GEO.util.calculaDPI();OpenLayers._getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/openlayers/"};if(i){f=$i("openlayers");if(!f){ins='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w+"px";f.style.height=h+"px"}i3GEO.Interface.IDMAPA="openlayers";if(i3GEO.Interface.TABLET===true){i3geoOL=new OpenLayers.Map({div:"openlayers",theme:null,controls:[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]})}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;i3geoOL=new OpenLayers.Map('openlayers',{controls:[],fractionalZoom:true,minResolution:"auto",minExtent:new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3]),maxResolution:"auto",maxExtent:new OpenLayers.Bounds(ma[0],ma[1],ma[2],ma[3]),allOverlays:false})}},inicia:function(){var montaMapa=function(){var pz,temp,layers,i,texto,estilo,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});if(openlayers.GADGETS.PanZoom===true){pz=new OpenLayers.Control.PanZoom();i3geoOL.addControl(pz);pz.div.style.zIndex=5000}openlayers.criaLayers();temp=$i("listaLayersBase");if(temp){estilo="cursor:pointer;vertical-align:top;padding-top:5px;";if(navm){estilo="border:0px solid white;cursor:pointer;vertical-align:middle;padding-top:0px;"}temp={"propriedades":[]};layers=i3geoOL.getLayersBy("isBaseLayer",true);layersn=layers.length;for(i=0;i<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].id+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}i3GEO.Interface.ativaBotoes();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}};if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);"}i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}},aplicaOpacidade:function(opacidade){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer&&layer.isBaseLayer===false){layer.setOpacity(opacidade)}}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+=" <span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,j="",html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,camada,urllayer,opcoes,i,n,temp=$i("i3GEOprogressoDiv"),fundoIsBase=true;if(temp){i3GEO.Interface.STATUS.atualizando=[];temp.style.display="none"}try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.Vector("Nenhum",{displayInLayerSwitcher:true,visibility:false,isBaseLayer:true,singleTile:true});i3geoOL.addLayer(layer);if($i(i3geoOL.id+"_events")){$i(i3geoOL.id+"_events").style.backgroundColor="rgb("+i3GEO.parametros.cordefundo+")"}}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:false,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){layer="";camada=i3GEO.arvoreDeCamadas.CAMADAS[i];opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES);if(i3geoOL.getLayersByName(camada.name).length===0&&camada.name.toLowerCase()!="copyright"){urllayer=url+"&layer="+camada.name+"&r="+Math.random();try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes);if(camada.wmssrs!=""&&layer.url){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||camada.type===0||camada.type===4||camada.type===8){opcoes.singleTile=true}else{temp=camada.type===3?opcoes.singleTile=false:opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES)}layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}if(layer&&layer!=""){temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}if(i3GEO.parametros.copyright!=""&&!$i("i3GEOcopyright")){temp=document.createElement("div");temp.id="i3GEOcopyright";temp.style.display="block";temp.style.top="0px";temp.style.left="0px";temp.style.zIndex=5000;temp.style.position="absolute";temp.innerHTML="<p class=paragrafo >"+i3GEO.parametros.copyright+"</p>";$i(i3GEO.Interface.IDMAPA).appendChild(temp)}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"&&layers[i].name!="Nenhum"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},inverteModoTile:function(){if(i3GEO.Interface.openlayers.TILES===true){i3GEO.Interface.openlayers.TILES=false}else{i3GEO.Interface.openlayers.TILES=true}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer){i3geoOL.removeLayer(layer,false)}}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){if(layers[i].url){url=layers[i].url;reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");eval("layers[i].mergeNewParams({"+parametro+":valor})");layers[i].redraw()}}},loadStartLayer:function(event){var p=$i("i3GEOprogressoDiv");if($i("ArvoreTituloTema"+event.object.name)){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA);if(p){p.style.display="block";i3GEO.arvoreDeCamadas.progressBar.set('maxValue',i3GEO.Interface.STATUS.atualizando.length);i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')-1)}}},loadStopLayer:function(event){var p=$i("i3GEOprogressoDiv");i3GEO.Interface.STATUS.atualizando.remove(event.object.name);if($i("ArvoreTituloTema"+event.object.name)){YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","");if(p){p.style.display="block";if(i3GEO.Interface.STATUS.atualizando.length>0){i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')+1)}else{i3GEO.arvoreDeCamadas.progressBar.set('value',0);p.style.display="none"}}}},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];if(layer){i3geoOL.setLayerIndex(layer,maiorindice+i)}}},sobeDesceLayer:function(tema,tipo){var layer=i3geoOL.getLayersByName(tema)[0],indice;if(layer){indice=i3geoOL.getLayerIndex(layer);if(tipo==="sobe"){i3geoOL.setLayerIndex(layer,indice+1)}else{i3geoOL.setLayerIndex(layer,indice-1)}}},ligaDesliga:function(obj){var layers=i3geoOL.getLayersByName(obj.value),desligar="",ligar="",b;if(layers.length>0){{layers[0].setVisibility(obj.checked)}if(obj.checked){ligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value)}b=new Image();b.src=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemasbeacon&desligar="+desligar+"&ligar="+ligar+"&adicionar=nao&g_sid="+i3GEO.configura.sid;b.onerror=function(){i3GEO.mapa.legendaHTML.atualiza()}}},ativaFundo:function(id){i3geoOL.setBaseLayer(i3geoOL.getLayer(id));i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].url){layers[i].mergeNewParams({r:Math.random()});layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&","");layers[i].url=layers[i].url+"&&";if(layers[i].visibility===true){layers[i].redraw()}}}},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){if(layer.url){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&","");layer.url=layer.url+"&&";layer.redraw()}}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){var modoAtual="";i3GEO.eventos.ativa($i("openlayers"));i3geoOL.events.register("movestart",i3geoOL,function(e){var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});i3geoOL.events.register("moveend",i3geoOL,function(e){var xy;modoAtual="";i3GEO.Interface.openlayers.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});i3geoOL.events.register("mousemove",i3geoOL,function(e){var p,lonlat,d,pos;if(modoAtual==="move"){return}p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}})},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();i3GEO.gadgets.atualizaEscalaNumerica(parseInt(escalaAtual,10))},zoom2ext:function(ext){var m,b;m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b)},pan2ponto:function(x,y){i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{MAPOPTIONS:{scaleControl:true},OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},removeTodosLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.removeTodosLayers();i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");if(w){f.style.width=w+"px";f.style.height=h+"px"}}i3GeoMap="";i3GEO.Interface.IDMAPA="googlemapsdiv";if(i3GEO.Interface.TABLET===false){i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=true;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=true;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=true}},ativaZoomBox:function(){i3GeoMap.enableKeyDragZoom({key:'ctrl'})},inicia:function(){var pol,ret,montaMapa;pol=i3GEO.parametros.mapexten;ret=pol.split(" ");montaMapa=function(retorno){var sw,ne,dobra=$i("i3GEOdobraPagina");try{i3GeoMap=new google.maps.Map($i(i3GEO.Interface.IDMAPA),i3GEO.Interface.googlemaps.MAPOPTIONS)}catch(e){alert(e);return}if(dobra){$i(i3GEO.Interface.IDMAPA).appendChild(dobra)}if(!$i("keydragzoom_script")){js=i3GEO.configura.locaplic+"/pacotes/google/keydragzoom.js.php";i3GEO.util.scriptTag(js,"i3GEO.Interface.googlemaps.ativaZoomBox()","keydragzoom_script")}i3GeoMap.setMapTypeId(i3GEO.Interface.googlemaps.TIPOMAPA);sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne));i3GeoMapOverlay=new google.maps.OverlayView();i3GeoMapOverlay.draw=function(){};i3GEO.Interface.googlemaps.criaLayers();i3GeoMapOverlay.setMap(i3GeoMap);i3GEO.Interface.googlemaps.registraEventos();if(i3GEO.Interface.STATUS.trocando===false){i3GEO.gadgets.mostraInserirKml()}i3GEO.Interface.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));if(i3GEO.Interface.STATUS.trocando===false){i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor()}i3GEO.gadgets.mostraMenuSuspenso();g_operacao="";g_tipoacao="";if(i3GEO.Interface.STATUS.trocando===true){$i(i3GEO.arvoreDeCamadas.IDHTML).innerHTML=""}if(i3GEO.Interface.STATUS.trocando===false){i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)}if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(this)"}i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googlemaps.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googlemaps.adicionaKml(true,i3GEO.parametros.kmlurl)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}};i3GEO.php.googlemaps(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0)}}}},criaImageMap:function(nomeLayer){var i3GEOTileO="",s;s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var pos,modoAtual="";google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao="";var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});google.maps.event.addListener(i3GeoMap,"dragend",function(){var xy;modoAtual="";i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar()});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){var xy;i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela;if(modoAtual==="move"){return}ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i,divmapa=$i("googlemapsdiv"),divimg,n;divimg=divmapa.getElementsByTagName("img");n=divimg.length;if(divimg&&n>0){for(i=0;i<n;i++){if(divimg[i].src.search("&layer="+nomeLayer+"&")>0){return divimg[i].parentNode.parentNode.parentNode}}}return false},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="",n,i,lista=[],listatemp;if(obj.checked&&!indice){ligar=obj.value;listatemp=i3GEO.arvoreDeCamadas.listaLigadosDesligados()[0];n=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<n;i++){if(i3GEO.util.in_array(i3GEO.arvoreDeCamadas.CAMADAS[i],listatemp)){lista.push(i3GEO.arvoreDeCamadas.CAMADAS[i])}}n=lista.length;indice=0;for(i=0;i<n;i++){if(lista[i]==obj.value){indice=n-1-i}}i3GEO.Interface.googlemaps.insereLayer(obj.value,indice);i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},aplicaOpacidade:function(opacidade){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,div;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(camada&&camada.name){div=i3GEO.Interface.googlemaps.retornaDivLayer(camada.name);if(div){YAHOO.util.Dom.setStyle(div,"opacity",opacidade)}}}},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var pol=mapexten,ret=pol.split(" "),sw=new google.maps.LatLng(ret[1],ret[0]),ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+=" <span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, this.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, this.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, this.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, this.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)"}i=$i(i3GEO.Interface.IDCORPO);if(i){i3GeoMap3d=document.createElement("div");i3GeoMap3d.style.width=w+"px";i3GeoMap3d.style.height=h+"px";i.style.height=h;i3GeoMap3d.id="i3GeoMap3d";i3GeoMap3d.style.zIndex=0;i.appendChild(i3GeoMap3d)}google.load("earth","1")},inicia:function(){google.earth.createInstance("i3GeoMap3d",i3GEO.Interface.googleearth.iniciaGE,i3GEO.Interface.googleearth.falha)},iniciaGE:function(object){var montaMapa=function(retorno){i3GeoMap=object;i3GeoMap.getWindow().setVisibility(true);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.Interface.googleearth.criaLayers();var options=i3GeoMap.getOptions(),layerRoot=i3GeoMap.getLayerRoot();options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled);options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility);options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility);options.setScaleLegendVisibility(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility);options.setAtmosphereVisibility(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility);options.setGridVisibility(i3GEO.Interface.googleearth.GADGETS.setGridVisibility);layerRoot.enableLayerById(i3GeoMap.LAYER_BORDERS,i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS);layerRoot.enableLayerById(i3GeoMap.LAYER_BUILDINGS,i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS);layerRoot.enableLayerById(i3GeoMap.LAYER_ROADS,i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS);layerRoot.enableLayerById(i3GeoMap.LAYER_TERRAIN,i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN);i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun);i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW);i3GEO.Interface.googleearth.POSICAOTELA=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO));i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googleearth.adicionaListaKml()}i3GEO.Interface.googleearth.registraEventos();if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googleearth.adicionaKml(true,i3GEO.parametros.kmlurl,i3GEO.parametros.kmlurl,false)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}};i3GEO.php.googleearth(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice,layer;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice===false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=0,i=0;if(n>0){for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice}else{return false}},aplicaOpacidade:function(opacidade){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),i;for(i=0;i<n;i++){i3GeoMap.getFeatures().getChildNodes().item(i).setOpacity(opacidade)}},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar()});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","","Ferramentas","i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div> ';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+=" <span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}}; | |
358 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.mapa={AUTORESIZE:false,GEOXML:[],insereDobraPagina:function(tipo,imagem){var novoel=$i("i3GEOdobraPagina");if(!novoel){novoel=document.createElement("img")}novoel.src=imagem;novoel.id="i3GEOdobraPagina";if(tipo==="googlemaps"){novoel.onclick=function(){i3GEO.Interface.atual2gm.inicia()}}if(tipo==="openlayers"){novoel.onclick=function(){i3GEO.Interface.atual2ol.inicia()}}novoel.style.cursor="pointer";novoel.style.position="absolute";novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.zIndex="50000";novoel.style.left=i3GEO.parametros.w-35+"px";YAHOO.util.Event.addListener(novoel,"click",YAHOO.util.Event.stopPropagation);$i(i3GEO.Interface.IDMAPA).appendChild(novoel)},reposicionaDobraPagina:function(){var novoel=$i("i3GEOdobraPagina");if(!novoel){return}novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.left=i3GEO.parametros.w-35+"px"},ativaAutoResize:function(){window.onresize=function(){var Dw,Dh,r=false;Dw=YAHOO.util.Dom.getViewportWidth();Dh=YAHOO.util.Dom.getViewportHeight();if(Math.abs(Dw-i3GEO.tamanhodoc[0])>50){r=true}if(Math.abs(Dh-i3GEO.tamanhodoc[1])>50){r=true}if(r===false){return}i3GEO.tamanhodoc=[Dw,Dh];setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.reposiciona()}else{i3GEO.guias.ajustaAltura()}i3GEO.mapa.reposicionaDobraPagina()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(codigo){if(codigo===""){return}if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")}},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert($trad("x21"));return}i3GEO.php.ativalogo(i3GEO.atualiza);var cr=$i("i3GEOcopyright");if(cr){if(cr.style.display==="block"){cr.style.display="none"}else{cr.style.display="block"}}},verifica:function(retorno){try{if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:true,ID:"",cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg,temp=function(retorno){var ins,elementos,i,temp,re;re=new RegExp("<img src='' />","g");if(i3GEO.mapa.legendaHTML.ID!==""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!=="erro")&&(retorno.data!==undefined)){ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -45px; top: -22px;">Mostra a legenda em uma janela</p></div>'}temp=retorno.data.legenda;temp=temp.replace(re,"");ins+="<div id='corpoLegi' >"+temp+"</div>";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;i<elementos.length;i+=1){elementos[i].style.display="none"}}};if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}idleg=$i("wlegenda");if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},libera:function(){var temp=function(retorno){var novoel,temp,n,i,janela;if(!$i("moveLegi")){novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";temp='<div class="hd" >Legenda</div>';temp+='<div id="wlegenda" style="display:block;padding:5px 2px 5px 0px;text-align:left;background-color:white;height:300px;width:300px;overflow:auto" ></div>';novoel.innerHTML=temp;document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("moveLegi",{width:"302px",fixedcenter:true,constraintoviewport:false,underlay:"shadow",close:true,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();novoel.onmouseover=function(){if($i("moveLegi").style.display==="block"){YAHOO.util.Dom.setStyle("moveLegi","opacity",1)}};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle("moveLegi","opacity",0.20)}}else{janela=YAHOO.i3GEO.janela.manager.find("moveLegi")}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i<n;i+=1){temp[i].style.display="none"}janela.show()};i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{animacao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.animacao()","animacao","animacao")},opacidade:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()","opacidademapa","opacidademapa")},telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' > </a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var pos,temp,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span style='text-decoration:underline;text-align:left;font-size:9pt'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "&&ds[0]&&ds[0]!=" "){try{nds=ds.length;for(s=0;s<nds;s+=1){for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}ins+="<nl>";mostra=true}else{ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+valor+"</span><br>";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; | |
359 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.tema={TEMPORIZADORESID:{},exclui:function(tema){g_operacao="excluitema";try{var p=document.getElementById("idx"+tema).parentNode.parentNode.parentNode;do{p.removeChild(p.childNodes[0])}while(p.childNodes.length>0);p.parentNode.removeChild(p)}catch(e){}i3GEO.php.excluitema(i3GEO.atualiza,[tema]);i3GEO.mapa.ativaTema("");i3GEO.temaAtivo=""},fonte:function(tema){i3GEO.mapa.ativaTema(tema);window.open(i3GEO.configura.locaplic+"/admin/abrefontemapfile.php?tema="+tema)},sobe:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.sobetema(function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}},tema)},desce:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.descetema(function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}},tema)},zoom:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomtema(i3GEO.atualiza,tema)},zoomsel:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomsel(i3GEO.atualiza,tema)},limpasel:function(tema){i3GEO.mapa.ativaTema(tema);g_operacao="limpasel";i3GEO.php.limpasel(function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,tema)},tema)},mudatransp:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var valor="";if($i("tr"+idtema)){valor=$i("tr"+idtema).value}if(valor!==""){i3GEO.php.mudatransp(function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,idtema)},idtema,valor)}else{alert($trad("x16"))}},invertestatuslegenda:function(idtema){alert($trad("x17"));i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";i3GEO.php.invertestatuslegenda(function(retorno){i3GEO.atualiza(retorno);i3GEO.arvoreDeCamadas.atualiza()},idtema)},alteracorclasse:function(idtema,idclasse,rgb){i3GEO.mapa.ativaTema(idtema);i3GEO.php.aplicaCorClasseTema(temp=function(){i3GEO.atualiza();i3GEO.Interface.atualizaTema("",idtema);i3GEO.arvoreDeCamadas.atualizaLegenda(idtema)},idtema,idclasse,rgb)},mudanome:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="mudanome";var valor="";if($i("nn"+idtema)){valor=$i("nn"+idtema).value}if(valor!==""){i3GEO.php.mudanome(i3GEO.atualiza,idtema,valor)}else{alert($trad("x18"))}},mostralegendajanela:function(idtema,nome,tipoOperacao){if(tipoOperacao==="ativatimer"){mostralegendajanelaTimer=setTimeout("i3GEO.tema.mostralegendajanela('"+idtema+"','"+nome+"','abrejanela')",4000)}if(tipoOperacao==="abrejanela"){try{clearTimeout(mostralegendajanelaTimer)}catch(e){}if(!$i("janelaLegenda"+idtema)){var janela=i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false);janela[2].style.textAlign="left";janela[2].style.background="white";janela[2].innerHTML=$trad("o1")}i3GEO.php.criaLegendaHTML(function(retorno){$i("janelaLegenda"+idtema+"_corpo").innerHTML=retorno.data.legenda},idtema,"legenda3.htm")}if(tipoOperacao==="desativatimer"){clearTimeout(mostralegendajanelaTimer)}},temporizador:function(idtema,tempo){if(!tempo){tempo=$i("temporizador"+idtema).value}if(tempo!=""&&parseInt(tempo,10)>0){eval('i3GEO.tema.TEMPORIZADORESID.'+idtema+' = {tempo: '+tempo+',idtemporizador: setInterval(function('+idtema+'){if(!$i("arrastar_'+idtema+'")){delete(i3GEO.tema.TEMPORIZADORESID.'+idtema+');return;}i3GEO.Interface.atualizaTema("",idtema);},parseInt('+tempo+',10)*1000)};')}else{try{window.clearInterval(i3GEO.tema.TEMPORIZADORESID[idtema].idtemporizador);delete(i3GEO.tema.TEMPORIZADORESID[idtema])}catch(e){}}},dialogo:{tme:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tme()","tme","tme")},mostraWms:function(tema){i3GEO.janela.mensagemSimples(i3GEO.configura.locaplic+"/ogc.php?tema="+tema,"WMS url")},comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"","","<img src='"+i3GEO.configura.locaplic+"/imagens/player_volta.png' style=cursor:pointer onclick='javascript:history.go(-1)'><span style=position:relative;top:-2px; > "+$trad("x19")+" "+tema+" </span><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js","i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}else{i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo)}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' > </a>")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}}; | |
360 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.analise={dialogo:{graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},linhaDoTempo:function(){i3GEO.janela.cria("450px","300px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' > </a>");atualizaLinhaDoTempo=function(){var doc="";try{if(navn){if($i("wdocai")){doc=$i("wdocai").contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){i3GEO.parametros.r==="nao"?alert($trad("x22")):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="1px"}g_tipoacao="mede"}else{if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.richdraw.fecha()}var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='<div class="hd" style="font-size:11px"> Distância aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" > </a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td> </td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td> Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td> <input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:"330px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeDistancia.fechaJanela)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","");janela=YAHOO.i3GEO.janela.manager.find("mostradistancia")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1]);if(navm&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var janela;i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostradistancia");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},clique:function(){var n,d,decimal,dd;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> "+$trad("x23")+" (DMS)= "+r;texto+="<br>"+$trad("x24")+": "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};var x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;g_areapixel<0?alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >Área aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" > </a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostraarea",{width:"220px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeArea.fechaJanela)}else{janela=YAHOO.i3GEO.janela.manager.find("mostraarea")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1])},fechaJanela:function(){var janela;i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostraarea");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},clique:function(){var n,m;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{if(navn){pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1)}}catch(men){}m=i3GEO.calculo.area(pontosdistobj,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}}; | |
361 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.maparef={fatorZoomDinamico:-3,SELETORTIPO:true,PERMITEFECHAR:true,PERMITEDESLOCAR:true,TRANSICAOSUAVE:false,OPACIDADE:65,TOP:4,RIGHT:20,inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef,janela;if($i("i3geo_winRef")){janela=YAHOO.i3GEO.janela.manager.find("i3geo_winRef");janela.show();janela.bringToTop();return}if(navm){i3GEO.maparef.TRANSICAOSUAVE=false}if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='<div class="hd" style="text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">';ins+='<span id=maparefmaismenosZoom style=display:none > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> ";if(this.SELETORTIPO){ins+="<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>";ins+="<option value='fixo' select >fixo</option>";ins+="<option value='mapa' >mapa</option>";ins+="<option value='dinamico' >dinâmico</option>";ins+="</select>"}ins+="</div>"}ins+='<div class="bd" style="border:1px solid black;text-align:left;padding:3px;height: 150px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;display:none" onload="javascript:this.style.display = \'block\'" id="imagemReferencia" src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;if(i3GEO.maparef.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100);novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100)}}document.body.appendChild(novoel)}if($i("i3geo_winRef").style.display!=="block"){$i("i3geo_winRef").style.display="block";this.PERMITEDESLOCAR?temp="shadow":temp="none";janela=new YAHOO.widget.Panel("i3geo_winRef",{height:"177px",width:"156px",fixedcenter:false,constraintoviewport:true,underlay:temp,close:i3GEO.maparef.PERMITEFECHAR,visible:true,draggable:i3GEO.maparef.PERMITEDESLOCAR,modal:false,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);if(i3GEO.maparef.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.render();janela.show();try{janela.header.style.height="20px"}catch(e){};r=$i("i3geo_winRef_c");if(r){r.style.clip="rect(0px, 160px, 185px, 0px)";r.style.position="absolute"}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));$i("mapaReferencia").style.height="150px";$i("i3geo_winRef").style.border="1px solid gray";moveX=pos[0]+i3GEO.parametros.w+153-i3GEO.maparef.RIGHT-300;moveY=pos[1]+i3GEO.maparef.TOP;if(i3GEO.Interface.ATUAL==="googlemaps"){moveY+=30}janela.moveTo(moveX,moveY);escondeRef=function(){YAHOO.util.Event.removeListener(janela.close,"click");$i("imagemReferencia").src="";janela.destroy();i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none")};YAHOO.util.Event.addListener(janela.close,"click",escondeRef);i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block");if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",temp)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width="156px"}},atualiza:function(forca){if(arguments.length===0){forca=false}var tiporef,temp,re;temp=$i("refDinamico")?tiporef=$i("refDinamico").value:tiporef="fixo";if($i("mapaReferencia")){temp=$i("maparefmaismenosZoom");if(tiporef==="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}if(tiporef==="fixo"){if(i3GEO.parametros.utilizacgi.toLowerCase()!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference')}}if(tiporef==="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}}else{i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.maparef.atualiza()")}},processaImagem:function(retorno){var m,box,temp,tiporef="fixo";if((retorno.data!=="erro")&&(retorno.data!==undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;temp=$i("imagemReferencia");if(temp){m=new Image();m.src=refimagem;temp.src=m.src}temp=$i("refDinamico");if(temp){tiporef=temp.value}if(tiporef!=="fixo"){box=$i("boxref");if(box){box.style.display="none"}return}i3GEO.maparef.atualizaBox()}},atualizaBox:function(){var box=i3GEO.maparef.criaBox(),w;i3GEO.calculo.ext2rect("boxref",i3GEO.parametros.extentref,i3GEO.parametros.mapexten,i3GEO.parametros.celularef,$i("mapaReferencia"));w=parseInt(box.style.width,10);if(w>120){box.style.display="none";return}box.style.display="block";box.style.top=parseInt(box.style.top,10)+4+"px";box.style.left=parseInt(box.style.left,10)+4+"px";if(w<3){box.style.width="3px";box.style.height="3px"}},criaBox:function(){var box=$i("boxref");if(!box){novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.cursor="move";novoel.style.backgroundColor="RGB(120,220,220)";novoel.style.borderWidth="3px";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=0.4}$i("mapaReferencia").appendChild(novoel);boxrefdd=new YAHOO.util.DD("boxref");novoel.onmouseup=function(){var rect,telaminx,telamaxx,telaminy,m,x,ext;rect=$i("boxref");telaminx=parseInt(rect.style.left,10);telamaxy=parseInt(rect.style.top,10);telamaxx=telaminx+parseInt(rect.style.width,10);telaminy=telamaxy+parseInt(rect.style.height,10);m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)};return novoel}else{return box}},click:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(objposicaocursor.ddx,objposicaocursor.ddy);return}try{i3GEO.php.pan(i3GEO.atualiza,i3GEO.parametros.mapscale,"ref",objposicaocursor.refx,objposicaocursor.refy)}catch(e){i3GEO.janela.fechaAguarde("i3GEO.atualiza")}}}; | |
362 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.ajuda={ATIVAJANELA:true,DIVAJUDA:"i3geo_ajuda",DIVLETREIRO:"i3geo_letreiro",MENSAGEMPADRAO:$trad("p1"),TRANSICAOSUAVE:true,OPACIDADE:20,abreDoc:function(url){if(!url){url="/documentacao/index.html"}window.open(i3GEO.configura.locaplic+url)},abreJanela:function(){try{var nx,ny,corpo,texto,janela,temp,largura=262,YU=YAHOO.util,pos=[20,i3GEO.parametros.h/2];if(this.ATIVAJANELA===false){return}temp=$i("contemFerramentas");if(temp){largura=parseInt(temp.style.width,10)-5}if(!$i("janelaMenTexto")){corpo=$i(i3GEO.Interface.IDCORPO);if(corpo){pos=YU.Dom.getXY(corpo)}else{corpo=$i(i3GEO.Interface.IDMAPA);if(corpo){pos=YU.Dom.getXY(corpo)}}nx=pos[0]-largura-3;ny=i3GEO.parametros.h-78;texto='<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>';if(nx<0){nx=10;ny=ny-50}janela=i3GEO.janela.cria(largura-3,"auto","",nx,ny," ","i3geo_janelaMensagens",false,"hd","","",true);janela[2].innerHTML=texto;YU.Event.addListener(janela[0].close,"click",i3GEO.ajuda.fechaJanela);this.ativaCookie()}}catch(e){}},ativaCookie:function(){var i=i3GEO.util.insereCookie;i("g_janelaMen","sim");i("botoesAjuda","sim")},ativaLetreiro:function(mensagem){var l;if($i(i3GEO.ajuda.DIVLETREIRO)){if(arguments.length===0){mensagem=i3GEO.parametros.mensagens}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.ajuda.ativaLetreiro()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.ajuda.ativaLetreiro()")}try{clearTimeout(i3GEO.ajuda.tempoLetreiro)}catch(e){i3GEO.ajuda.tempoLetreiro=""}l=$i(i3GEO.ajuda.DIVLETREIRO);if(l.style.display==="none"){return}l.style.cursor="pointer";if(mensagem===""){l.value="";return}if(l.size===1){l.size=i3GEO.parametros.w/8}BMessage=mensagem+" ---Clique para parar--- ";l.onclick=function(){l.style.display="none"};if(BMessage!==" ---Clique para parar--- "){BQuantas=0;BSize=l.size;BPos=BSize;BSpeed=1;BSpaces="";i3GEO.ajuda.mostraLetreiro()}i3GEO.ajuda.mostraLetreiro(mensagem)}},desativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","nao")},fechaJanela:function(){i3GEO.ajuda.desativaCookie();i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body)},mostraJanela:function(texto){var j=$i(this.DIVAJUDA),k=$i("janelaMenTexto"),jm=$i("i3geo_janelaMensagens"),Dom=YAHOO.util.Dom,h=parseInt(Dom.getStyle(jm,"height"),10);if(j){j.innerHTML=texto===""?"-":texto}else{if(h){Dom.setY("i3geo_janelaMensagens",Dom.getY(jm)+h)}if(k){k.innerHTML=texto}if(this.TRANSICAOSUAVE){texto!==""?Dom.setStyle(jm,"opacity","1"):Dom.setStyle(jm,"opacity",(this.OPACIDADE/100))}h=parseInt(Dom.getStyle(jm,"height"),10);if(h){Dom.setY(jm,Dom.getY(jm)-h)}}},mostraLetreiro:function(){for(var count=0;count<BPos;count+=1){BSpaces+=" "}if(BPos<1){$i(i3GEO.ajuda.DIVLETREIRO).value=BMessage.substring(Math.abs(BPos),BMessage.length);if(BPos+BMessage.length<1){BPos=BSize;BQuantas=BQuantas+1}}else{$i(i3GEO.ajuda.DIVLETREIRO).value=BSpaces+BMessage}BPos-=BSpeed;if(BQuantas<2){i3GEO.ajuda.tempoLetreiro=setTimeout(function(){i3GEO.ajuda.mostraLetreiro()},140)}},redesSociais:function(){i3GEO.janela.cria("400px","400px",i3GEO.configura.locaplic+"/ferramentas/redessociais/index.php","","",$trad("u5c"),YAHOO.util.Dom.generateId(null,"redes"))}}; | |
363 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}YAHOO.namespace("i3GEO.janela");YAHOO.i3GEO.janela.manager=new YAHOO.widget.OverlayManager();YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();YAHOO.i3GEO.janela.managerAguarde=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 2px 5px 2px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,OPACIDADEAGUARDE:50,TIPS:[],ULTIMOZINDEX:0,prepara:function(){var iu=i3GEO.util;iu.escondePin();iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza){if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}var i,wlargurA,ins,novoel,wdocaiframe,temp,fix,underlay,ifr,janela;if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(!classe||classe==""){classe="hd"}if(!id||id===""){id="wdoca"}if(!modal||modal===""){modal=false}ifr=false;if(i3GEO.Interface&&i3GEO.Interface.ATUAL==="googleearth"){i3GEO.janela.TRANSICAOSUAVE=false;ifr=true}fix=false;if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}temp=navm?0:2;wlargurA=parseInt(wlargura,10)+temp+"px";ins='<div id="'+id+'_cabecalho" class="'+classe+'" style="background-color:white;">';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' style='z-index:2;position:absolute;left:3px;top:2px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"}ins+="<span style='font-size:10px;'>"+texto+"</span>";if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12+"px";temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)+"px"}$i(id+'_corpo').style.width=parseInt(wlargura,10)+"px"}if(waltura==="auto"){janela=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:"none",fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{janela=new YAHOO.widget.ResizePanel(id,{hideMode:'offsets',iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}if(nx!==""&&nx!=="center"){janela.moveTo(nx,ny+50)}YAHOO.i3GEO.janela.manager.register(janela);if(this.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.cfg.setProperty("zIndex",[10000]);janela.render();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}if(ifr===true){janela.iframe.style.zIndex=0}temp=$i(id+"_corpo");if(temp){if(navm){temp.style.paddingRight="0px"}temp.style.width=parseInt(temp.style.width,10)-2+"px"}if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(janela.close,"click",i3GEO.janela.fecha,janela,{id:id},true);return([janela,$i(id+"_cabecalho"),$i(id+"_corpo")])},minimiza:function(id){var temp=$i(id+"_corpo"),n,i,m=YAHOO.i3GEO.janela.manager.find(id);if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe}}else{temp.style.display="block";if(m){m.showIframe}}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}},fecha:function(event,args){var i,id;i3GEO.util.escondePin();i3GEO.util.escondeBox();if(i3GEO.janela.ANTESFECHA){for(i=0;i<i3GEO.janela.ANTESFECHA.length;i++){eval(i3GEO.janela.ANTESFECHA[i])}}if(i3GEO.janela.id){id=i3GEO.janela.id}else{id=event.id}if(id==undefined){id=args.id}i3GEO.janela.destroi(id)},destroi:function(id){var janela=YAHOO.i3GEO.janela.manager.find(id);i3GEO.util.removeScriptTag(id+"_script");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w+"px";i.style.height=h+"px"}},abreAguarde:function(id,texto){var pos,temp,janela;if(!id||id==undefined){return}janela=YAHOO.i3GEO.janela.managerAguarde.find(id);pos=[0,0];if($i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(i3GEO.janela.AGUARDEMODAL==true){texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>"}if(!janela){janela=new YAHOO.widget.Panel(id,{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:i3GEO.janela.AGUARDEMODAL,monitorresize:false});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){janela.setBody(texto);janela.body.style.padding="5px"}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){janela.setHeader("<span><img id=aguardeGifAberto src='"+i3GEO.configura.locaplic+"/imagens/aguarde.gif' /></span> <span style=font-size:8px >"+YAHOO.i3GEO.janela.managerAguarde.overlays.length+"</span>")}if(i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();try{janela.header.style.height="20px"}catch(e){}temp=$i(id+"_c");if(temp){temp.style.backgroundColor=""}YAHOO.util.Dom.setStyle(temp,"opacity",i3GEO.janela.OPACIDADEAGUARDE/100)},fechaAguarde:function(id){if(id!=undefined){var janela=YAHOO.i3GEO.janela.managerAguarde.find(id);if(janela){YAHOO.i3GEO.janela.managerAguarde.remove(janela);janela.destroy()}}},ativaAlerta:function(){YAHOO.namespace("i3GEO.janela.dialogInfo");YAHOO.i3GEO.janela.dialogInfo=new YAHOO.widget.SimpleDialog("simpledialog1",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:"fecha",handler:function(){this.hide()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.i3GEO.janela.manager.register(YAHOO.i3GEO.janela.dialogInfo);YAHOO.i3GEO.janela.dialogInfo.setHeader("Alerta");YAHOO.i3GEO.janela.dialogInfo.render(document.body);window.alert=function(texto){YAHOO.i3GEO.janela.dialogInfo.cfg.setProperty("text",texto);YAHOO.i3GEO.janela.dialogInfo.show()}},mensagemSimples:function(texto,cabecalho){var janela;if($i("mensagemSimples1")){janela=YAHOO.i3GEO.janela.manager.find("mensagemSimples1")}else{janela=new YAHOO.widget.SimpleDialog("mensagemSimples1",{width:"300px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""});YAHOO.i3GEO.janela.manager.register(janela);janela.setHeader(cabecalho);janela.render(document.body)}janela.setHeader(cabecalho);janela.cfg.setProperty("text",texto);janela.show()},tip:function(cabecalho){var Nid,i,novoel,res;if(arguments.length===0){cabecalho="fixar"}Nid=YAHOO.util.Dom.generateId();i=$i("i3geo_rosa");if(i){i.style.display="none"}if($i(i3GEO.Interface.IDCORPO)){$i("img").title=""}novoel=document.createElement("div");novoel.id=Nid;novoel.style.position="absolute";novoel.style.zIndex=5000;novoel.style.textAlign="left";novoel.style.background="white";if(navm){novoel.style.filter="alpha(opacity=90)"}else{novoel.style.opacity=".9"}document.body.appendChild(novoel);i3GEO.janela.TIPS.push($i(Nid));res="<div id='"+Nid+"cabecatip' style='text-align:left;background-color:rgb(240,240,240)'>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:$i(\""+Nid+"cabecatip\").innerHTML =\"\";' >"+cabecalho+"</span></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9+"px";ist.left=objposicaocursor.telax-5+"px";ist.display="block";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.excluiTips('todos')")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.excluiTips('todos')")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.janela.excluiTips('naofixos')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.janela.excluiTips('naofixos')")}return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,slider="",bg,thumb;janela=i3GEO.janela.cria(230,200,"","","","Opacidade","opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;bg="slider-bg";thumb="slider-thumb";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},comboCabecalhoTemas:function(idDiv,idCombo,ferramenta,tipo){var temp=$i(idDiv);if(temp){temp.innerHTML="";i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var container=$i(idDiv),c;container.innerHTML=retorno.dados;container.style.left="0px";container.styletextAlign="left";c=$i(idCombo);c.style.width="150px";c.style.border="solid #B4B4B4 1px";c.style.top="6px";c.style.left="2px";c.style.position="relative";c.style.fontSize="10px";c.style.color="#686868";if(i3GEO.temaAtivo!==""){c.value=i3GEO.temaAtivo}if(i3GEOF[ferramenta].tema){c.value=i3GEOF[ferramenta].tema}if(c.value===""){i3GEOF[ferramenta].tema="";$i("i3GEOF."+ferramenta+"_corpo").innerHTML=""}c.onchange=function(){var valor=$i(idCombo).value;if(valor!==""){i3GEO.mapa.ativaTema(valor);i3GEOF[ferramenta].tema=valor;$i("i3GEOF."+ferramenta+"_corpo").innerHTML="";eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');")}}},temp.id,"",false,tipo)}temp="i3GEO.janela.comboCabecalhoTemas('"+idDiv+"','"+idCombo+"','"+ferramenta+"','"+tipo+"')";if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(temp)<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push(temp)}}};try{YAHOO.widget.ResizePanel=function(el,userConfig){if(arguments.length>0){YAHOO.widget.ResizePanel.superclass.constructor.call(this,el,userConfig)}};YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE="yui-resizepanel";YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE="resizehandle";YAHOO.extend(YAHOO.widget.ResizePanel,YAHOO.widget.Panel,{init:function(el,userConfig){YAHOO.widget.ResizePanel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.ResizePanel);var Dom=YAHOO.util.Dom,oInnerElement=this.innerElement,oResizeHandle=document.createElement("DIV"),sResizeHandleId=this.id+"_resizehandle";oResizeHandle.id=sResizeHandleId;oResizeHandle.className=YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE;Dom.addClass(oInnerElement,YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE);this.resizeHandle=oResizeHandle;function initResizeFunctionality(){var me=this,oHeader=this.header,oBody=this.body,oFooter=this.footer,nStartWidth,nStartHeight,aStartPos=0,nBodyBorderTopWidth,nBodyBorderBottomWidth,nBodyTopPadding,nBodyBottomPadding,nBodyOffset=0;oInnerElement.appendChild(oResizeHandle);this.ddResize=new YAHOO.util.DragDrop(sResizeHandleId,this.id);this.ddResize.setHandleElId(sResizeHandleId);this.ddResize.onMouseDown=function(e){nStartWidth=oInnerElement.offsetWidth;nStartHeight=oInnerElement.offsetHeight;if(YAHOO.env.ua.ie&&document.compatMode==="BackCompat"){nBodyOffset=0}else{nBodyBorderTopWidth=parseInt(Dom.getStyle(oBody,"borderTopWidth"),10);nBodyBorderBottomWidth=parseInt(Dom.getStyle(oBody,"borderBottomWidth"),10);nBodyTopPadding=parseInt(Dom.getStyle(oBody,"paddingTop"),10);nBodyBottomPadding=parseInt(Dom.getStyle(oBody,"paddingBottom"),10);nBodyOffset=nBodyBorderTopWidth+nBodyBorderBottomWidth+nBodyTopPadding+nBodyBottomPadding}me.cfg.setProperty("width",nStartWidth+"px");aStartPos=[Event.getPageX(e),Event.getPageY(e)]};this.ddResize.onDrag=function(e){var aNewPos=[Event.getPageX(e),Event.getPageY(e)],nOffsetX=aNewPos[0]-aStartPos[0],nOffsetY=aNewPos[1]-aStartPos[1],nNewWidth=Math.max(nStartWidth+nOffsetX,10),nNewHeight=Math.max(nStartHeight+nOffsetY,10),nBodyHeight=(nNewHeight-(oFooter.offsetHeight+oHeader.offsetHeight+nBodyOffset));me.cfg.setProperty("width",nNewWidth+"px");oBody.style.width=nNewWidth-4+"px";if(nBodyHeight<0){nBodyHeight=0}oBody.style.height=nBodyHeight+"px";if($i("wdocai")){$i("wdocai").style.height=nBodyHeight+"px";$i("wdocai").style.width=oBody.style.width+"px"}};this.ddResize.onMouseUp=this.ddResize.onDrag.call()}function onBeforeShow(){initResizeFunctionality.call(this);this.unsubscribe("beforeShow",onBeforeShow)}function onBeforeRender(){if(!this.footer){this.setFooter("")}if(this.cfg.getProperty("visible")){initResizeFunctionality.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}this.unsubscribe("beforeRender",onBeforeRender)}this.subscribe("beforeRender",onBeforeRender);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.initEvent.fire(YAHOO.widget.ResizePanel)},toString:function(){return"ResizePanel "+this.id}})}catch(e){} | |
364 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/gisicons/show-layers.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/gisicons/show-catalog.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/gisicons/show-legend.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",click:function(){var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp;ins="<br><div id='banners' style='overflow:auto;text-align:left'>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div><a href='"+link+"'><img src='"+temp.IMAGEM+"'></a></div><br>";ins+="<div><p style=text-align:center >"+nome+"</p></div><br>";ig1++}while(ig1<ig1lt)}$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML=ins+"</div>"};$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde...";i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas)}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){guia.style.height=altura+"px"}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]}},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px";if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";temp.left=config.larguraPuxador+"px";temp.width="0px";temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px";temp=$i("i3GEOguiaMovelIcones").style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";temp.top="38px";temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.20);if($i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL);if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.abreFecha()}},mostraIcones:function(){if($i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="";if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ins+="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;;' /></button>"}}$i("i3GEOguiaMovelIcones").innerHTML=ins;i3GEO.guias.guiaMovel.desativaIcones();if($i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id)){$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.backgroundColor="#cedff2";$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.boxShadow="none"}},desativaIcones:function(){var ims=$i("i3GEOguiaMovelIcones").getElementsByTagName("button"),n=ims.length,i;for(i=0;i<n;i++){ims[i].style.backgroundColor="white";ims[i].style.boxShadow=""}},ativa:function(chave){if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.escondeGuias();i3GEO.guias.mostra(chave);i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.desativaIcones();if($i(i3GEO.guias.CONFIGURA[chave].id)){$i(i3GEO.guias.CONFIGURA[chave].id).parentNode.style.backgroundColor="#cedff2";$i(i3GEO.guias.CONFIGURA[chave].id).parentNode.style.boxShadow="none"}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;$i("i3GEOguiaMovelIcones").style.display="none";$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1;if(molde.style.display==="block"){$i("i3GEOguiaMovelIcones").style.display="none";$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim.animate();anim1.animate();anim1.onComplete.subscribe(function(){molde.style.display="none"})}else{molde.style.display="block";attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){$i("i3GEOguiaMovelIcones").style.display="block";$i("i3GEOguiaMovelConteudo").style.display="block";i3GEO.guias.guiaMovel.mostraIcones();YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});anim.animate();anim1.animate()}}}}; | |
365 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:true,finaliza:"",EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:true,ANIMAMAPA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true},CAMADAS:"",CAMADASINICIAIS:"",ARVORE:null,IDHTML:"listaTemas",SID:null,LOCAPLIC:null,ATIVATEMA:"",cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=(i3GEO.parametros.w/2)-75+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){eval(i3GEO.arvoreDeCamadas.finaliza)}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,newVal,root,tempNode,titulo,d,c,ltema,temaNode,i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("a7")+"</b></td><td>";titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode);estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:noGrupo,expanded:d},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var ins="",imb=i3GEO.util.$im("branco.gif"),estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(this.ARRASTARLIXEIRA===true){ins+="<img "+estilo("i3geo_lixeira")+" onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='"+$trad("t2")+"' />"}if(this.FILTRAR===true){ins+="<img "+estilo("i3geo_filtro")+" onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' />"}if(this.ABRELEGENDA===true){ins+="<img "+estilo("soltaleg2")+" onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' />"}if(this.ALTERAOPACIDADE===true){ins+="<img "+estilo("opacidadeMapa")+" onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='"+$trad("t20")+"' />"}if(this.ANIMAMAPA===true&&(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps")){ins+="<img "+estilo("animaMapa")+" onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='"+$trad("p21")+"' />"}if(this.LIGARDESLIGARTODOS===true){ins+=" <img "+estilo("olhoAberto")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' />";ins+=" <img "+estilo("olhoFechado")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' />"}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick.call()}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var opcoesNode,idtema,ltema,farol,mfarol,tnome="",imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+=" <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+=" <img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+=" <img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+=" <img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.fonte===true){tnome+=" <img class='fonte' src='"+imb+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(funcoes.zoomtema===true)){tnome+=" <img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node);if(funcoes.compartilhar===true&<ema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:false,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&<ema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;if(funcoes.opacidade===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+" <a class='tic' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+" <a class='tic' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","8","")+" <a class='tic' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' href='#' />"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","10","")+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if((ltema.type<4||ltema.type===8)&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&<ema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&<ema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&<ema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.login.verificaCookieLogin()&&i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}if(funcoes.tme===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t49"),$trad("t49"),'i3GEO.tema.dialogo.tme(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar){desativar=original.data.desativar;nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.configura.templateLegenda!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.configura.templateLegenda)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name)};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:top;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' >";estilo=navm?"cursor:pointer;vertical-align:15%;":"cursor:pointer;";html+="<input class=inputsb style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:20%;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img style='"+estilo+"' src='"+tema.iconetema+"' />"}if(tema.contextoescala.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+=" <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:20%;color:black;";if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA){html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};try{clearTimeout(tempoBotaoAplicar)}catch(erro){}tempoBotaoAplicar="";if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(idtema,camadas){var i;if(!camadas){camadas=i3GEO.arvoreDeCamadas.CAMADAS}i=camadas.length;while(i>0){i-=1;if(camadas[i].name===idtema){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}if(operador==="menor"){if(temp<valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; | |
366 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.navega={TEMPONAVEGAR:600,FATORZOOM:2,timerNavega:null,centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.aproxima(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.afasta(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.zoomponto(i3GEO.atualiza,"+x+","+y+","+tamanho+",'"+simbolo+"','"+cor+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{alert("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.mudaext(i3GEO.atualiza,'"+tipoimagem+"','"+ext+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},aplicaEscala:function(locaplic,sid,escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true)}},panFixo:function(locaplic,sid,direcao,w,h,escala){var x=0,y=0,f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(w===""){w=i3GEO.parametros.w}if(h===""){h=i3GEO.parametros.h}if(escala===""){escala=i3GEO.parametros.mapscale}switch(direcao){case"norte":y=h/6;x=w/2;break;case"sul":y=h-(h/6);x=w/2;break;case"leste":x=w-(w/6);y=h/2;break;case"oeste":x=w/6;y=h/2;break;case"nordeste":y=h/6;x=w-(w/6);break;case"sudeste":y=h-(h/6);x=w-(w/6);break;case"noroeste":y=h/6;x=w/6;break;case"sudoeste":y=h-(h/6);x=w/6;break}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.pan(x,y);return}f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.pan(i3GEO.atualiza,"+escala+",'',"+x+","+y+");";try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},panFixoNorte:function(){i3GEO.navega.panFixo('','','norte','','','')},panFixoSul:function(){i3GEO.navega.panFixo('','','sul','','','')},panFixoOeste:function(){i3GEO.navega.panFixo('','','oeste','','','')},panFixoLeste:function(){i3GEO.navega.panFixo('','','leste','','','')},mostraRosaDosVentos:function(){var novoel,setas,i;try{if(i3GEO.configura.mostraRosaDosVentos==="nao"){return}if(g_tipoacao==="area"){return}}catch(e){}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10||objposicaocursor.imgy>(i3GEO.parametros.h-10)){return}if(!$i("i3geo_rosa")){novoel=document.createElement("div");novoel.id="i3geo_rosa";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navn){novoel.style.opacity=".7"}else{novoel.style.filter="alpha(opacity=70)"}document.body.appendChild(novoel)}setas="<table id='rosaV' >";setas+="<tr onclick=\"javascript:i3GEO.configura.mostraRosaDosVentos='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>";setas+="<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','noroeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','norte','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','nordeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','oeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><table><tr>";setas+="<td><img class='rosamais' title='aproxima' onclick=\"i3GEO.navega.zoomin('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="<td><img class='rosamenos' title='afasta' onclick=\"i3GEO.navega.zoomout('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="</tr></table></td>";setas+="<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','leste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudoeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27+"px";i.style.left=objposicaocursor.telax-27+"px";i.style.display="block";if($i("img")){YAHOO.util.Event.addListener($i("img"),"mousemove",function(){var i=$i("i3geo_rosa");i.style.display="none";YAHOO.util.Event.removeListener(escondeRosa)})}i3GEO.ajuda.mostraJanela('Clique nas pontas da rosa para navegar no mapa. Clique em x para parar de mostrar essa opção.')},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}var i=$i("i3geoboxZoom").style;i.width=0+"px";i.height=0+"px";i.visibility="visible";i.display="block";i.left=objposicaocursor.telax+"px";i.top=objposicaocursor.telay+"px";boxxini=objposicaocursor.telax;boxyini=objposicaocursor.telay;tamanhox=0;tamanhoy=0;if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.zoomBox.desloca()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.zoomBox.desloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}},criaBox:function(){if(i3GEO.navega.timerNavega!==null){return}if(!$i("i3geoboxZoom")){var novoel;novoel=document.createElement("div");novoel.style.width="0px";novoel.style.height="0px";novoel.id="i3geoboxZoom";novoel.style.display="none";novoel.style.fontSize="0px";if(navn){novoel.style.opacity=0.25}novoel.style.backgroundColor="gray";novoel.style.position="absolute";novoel.style.border="2px solid #ff0000";if(navm){novoel.style.filter="alpha(opacity=25)"}novoel.onmousemove=function(){var b,wb,hb;b=$i("i3geoboxZoom").style;wb=parseInt(b.width,10);hb=parseInt(b.height,10);if(navm){if(wb>2){b.width=wb-2+"px"}if(hb>2){b.height=hb-2+"px"}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.navega.zoomBox.termina()};document.body.appendChild(novoel)}},desloca:function(){var bxs,ppx,py;if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}bxs=$i("i3geoboxZoom").style;if(bxs.display!=="block"){return}ppx=objposicaocursor.telax;py=objposicaocursor.telay;if(navm){if((ppx>boxxini)&&((ppx-boxxini-2)>0)){bxs.width=ppx-boxxini-2+"px"}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2+"px"}if(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2+"px"}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2+"px"}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){var valor,v,x1,y1,x2,y2,f,limpa=function(){};if(g_tipoacao!=='zoomli'){i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");return}try{if(i3GEO.navega.timerNavega!==null){return}valor=i3GEO.calculo.rect2ext("i3geoboxZoom",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxZoom");if(bxs){bxs.style.display="none";bxs.style.visibility="hidden";bxs.style.width=0+"px";bxs.style.height=0+"px"}};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.zoomBox.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(v);return}f="i3GEO.navega.timerNavega = null;i3GEO.navega.zoomExt('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','"+i3GEO.configura.tipoimagem+"','"+v+"')";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){limpa.call();return}}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.lente.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.lente.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.lente.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.lente.movimenta()")}},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){alert("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.lente.movimenta()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.lente.atualiza()")},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0 75 75 0)';novoeli=document.createElement("div");novoeli.id="div_di";novoel.appendChild(novoeli);$i("div_di").innerHTML="<p style='position:absolute;top:0px;left:0px'>+-</p>"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(160,0,"","center","center","Feche para parar destaque ","ativadesativaDestaque");YAHOO.util.Event.addListener(janela[0].close,"click",i3GEO.navega.destacaTema.desativa);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.destacaTema.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.destacaTema.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.destacaTema.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()")}},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.destacaTema.atualiza()");i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()");i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+" "+(objposicaocursor.imgx-10)+" "+(objposicaocursor.imgy-10)+" "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+')'}}},barraDeZoom:{cria:function(){var temp="",estilo;if(navn){temp+='<div style="text-align:center;position:relative;left:9px" >'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='<div id="vertMaisZoom" style="'+estilo+'"></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';if(navm){temp+='<div id=vertMenosZoom style="left:-1px;" ></div>'}else{temp+='<div id=vertMenosZoom ></div>'}if(navn){temp+='</div>'}return temp},ativa:function(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w+"px";iclone.style.height=i3GEO.parametros.h+"px";iclone.style.top=corpo.style.top+"px";iclone.style.left=corpo.style.left+"px";$i("img").style.display="none";iclone.style.display="block"}}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousemove=function(){try{var iclone,corpo,nt,nl,velhoh,velhow,nh=0,nw=0,t,l,fatorEscala;iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}nt=0;nl=0;i3geo_ns=parseInt(i3GEO.parametros.mapscale,10);if((g_fatordezoom>0)&&(g_fatordezoom<7)){g_fatordezoom=g_fatordezoom+1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh/g_fatordezoom;nw=velhow/g_fatordezoom;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t+((velhoh-nh)*0.5);nl=l+((velhow-nw)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if((g_fatordezoom<0)&&(g_fatordezoom>-7)){g_fatordezoom=g_fatordezoom-1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh*g_fatordezoom*-1;nw=velhow*g_fatordezoom*-1;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t-((nh-velhoh)*0.5);nl=l-((nw-velhow)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if(iclone){iclone.style.width=nw+"px";iclone.style.height=nh+"px";if(iclone.style.pixelTop){iclone.style.pixelTop=nt}else{iclone.style.top=nt+"px"}if(iclone.style.pixelLeft){iclone.style.pixelLeft=nl}else{iclone.style.left=nl+"px"}}if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3geo_ns}}catch(e){}}}}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}i3GEO.util.criaBox();g_operacao="navega";var idgoogle="googlemaps"+Math.random();i3GEO.janela.cria((i3GEO.parametros.w/2)+25+"px",(i3GEO.parametros.h/2)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>",idgoogle);atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}}; | |
367 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],NAVEGAMAPA:[],MOUSEPARADO:["i3GEO.navega.mostraRosaDosVentos()"],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:[],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(this.TIMERPARADO)}catch(e){this.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(this.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEDOWN)},mouseupMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEUP)},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(this.MOUSECLIQUE)},executaEventos:function(eventos){var f=0;try{if(eventos.length>0){f=eventos.length-1;if(f>=0){do{if(eventos[f]!==""){eval(eventos[f])}}while(f--)}}}catch(e){eventos[f]=""}},posicaoMouseMapa:function(e){var teladd,teladms,container="",targ="",pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;if(!e){e=window.event}try{if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){}if(container!=="divGeometriasTemp"&&container!=="mapaReferencia"){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googlemaps","googleearth","openlayers"])){return}}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id===""&&$i(i3GEO.Interface.IDMAPA)){targ=$i(i3GEO.Interface.IDMAPA)}try{if(g_panM!=='undefined'&&g_panM==="sim"){pos=i3GEO.util.pegaPosicaoObjeto(targ.parentNode)}else{pos=i3GEO.util.pegaPosicaoObjeto(targ)}if(g_panM==="sim"){pos[0]=pos[0]-i3GEO.parametros.w;pos[1]=pos[1]-i3GEO.parametros.h}}catch(m){pos=i3GEO.util.pegaPosicaoObjeto(targ)}mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.pixelsize;ex=i3GEO.parametros.mapexten;try{if(targ.id==="imagemReferencia"){c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;r=$i("i3geo_rosa");if(r){r.style.display="none"}}}catch(e){i3GEO.parametros.celularef=0}teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex,targ.id);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout(function(){i3GEO.eventos.mouseParado()},i3GEO.configura.tempoMouseParado)}catch(e){}try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=true;try{objmapaparado="parar"}catch(e){}};docMapa.onmousedown=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousedownMapa()}};docMapa.onclick=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousecliqueMapa()}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa()}}},botaoDireita:function(exy){try{var k=(navm)?event.button:exy.button;if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){var x,y,doc=document;if(arguments.length===0){ixg="ixg";ixm="ixm";ixs="ixs";iyg="iyg";iym="iym";iys="iys";if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}if(g_tipoacao!=="capturaponto"){return}else{try{if(doc){x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById(ixg)){doc.getElementById(ixg).value=x[0]}if(doc.getElementById(ixm)){doc.getElementById(ixm).value=x[1]}if(doc.getElementById(ixs)){doc.getElementById(ixs).value=x[2]}if(doc.getElementById(iyg)){doc.getElementById(iyg).value=y[0]}if(doc.getElementById(iym)){doc.getElementById(iym).value=y[1]}if(doc.getElementById(iys)){doc.getElementById(iys).value=y[2]}}}catch(m){}}}}; | |
368 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:true,uploadlocal:true,uploadarquivo:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,conectargeojson:true,nuvemTags:true,nuvemTagsFlash:false,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true,carousel:true,inde:true,uploadgpx:true,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true,flutuante:true},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:false,IDSMENUS:[],RETORNAGUIA:"",IDHTML:"arvoreAdicionaTema",LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,flutuante:function(){var janela,temp,cabecalho,minimiza,idold,corpo,altura;cabecalho=function(){};if($i("i3GEOFcatalogo_corpo")){return}minimiza=function(){i3GEO.janela.minimiza("i3GEOFcatalogo")};altura=i3GEO.parametros.w-150;if(altura>500){altura=500}janela=i3GEO.janela.cria("360px",altura+"px","","","",$trad("g1a"),"i3GEOFcatalogo",false,"hd",cabecalho,minimiza);temp=function(){delete(i3GEO.arvoreDeTemas.ARVORE)};YAHOO.util.Event.addListener(janela[0].close,"click",temp,janela[0].panel,{id:janela[0].id},true);corpo=$i("i3GEOFcatalogo_corpo");corpo.style.backgroundColor="white";corpo.innerHTML=$trad("o1");corpo.style.overflow="auto";if($i(i3GEO.arvoreDeTemas.IDHTML)){$i(i3GEO.arvoreDeTemas.IDHTML).innerHTML=""}idold=i3GEO.arvoreDeTemas.IDHTML;delete(i3GEO.arvoreDeTemas.ARVORE);i3GEO.arvoreDeTemas.IDHTML="i3GEOFcatalogo_corpo";i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"");i3GEO.arvoreDeTemas.IDHTML=idold},listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos não definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0,expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,temp;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.arvoreDeTemas.checked=false;i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\")";html+="onclick='javascript:"+adiciona+"' "+" type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >"+layer+" - "+titulo+"</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){var c,m,i,k,jj,j;if(i3GEO.arvoreDeTemas.IDSMENUS.length===0){i3GEO.arvoreDeTemas.MENUS=retorno.data}else{i3GEO.arvoreDeTemas.MENUS=[];c=retorno.data.length;m=i3GEO.arvoreDeTemas.IDSMENUS.length;for(i=0,j=c;i<j;i+=1){for(k=0,jj=m;k<jj;k+=1){if(retorno.data[i].idmenu===i3GEO.arvoreDeTemas.IDSMENUS[k]){i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i])}}}}if(funcao!==""){eval(funcao+"(retorno)")}};i3GEO.php.pegalistademenus(retorno)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data[0];if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var montanos=function(retorno){try{var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight:false},node)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red'>Nada encontrado<br><br></span>",isLeaf:true,expanded:false,enableHighlight:false},node)}}}node.loadComplete()}catch(e){}};i3GEO.php.procurartemasestrela(montanos,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1)},cria:function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes,tipoBotao){if(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.IDHTML)},montaArvore:function(){var tempNode,tempNode1,retorno,root,insp,outrasOpcoes,dados,c,i,j,conteudo,editor;(function(){function changeIconMode(){buildTree()}function buildTree(){i3GEO.arvoreDeTemas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<br><br><table><tr>"+"<td><span style='font-size:12px'> "+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' > </a></span></td>"+"<td><input onclick='javascript:this.select();' class='digitar' type='text' id='i3geo_buscatema' size='15' value='' /></td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table> ";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+" <br>",isLeaf:true,enableHighlight:false,expanded:false,hasIcon:false},root)}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin' target=blank >Sistema de administração</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/arvore.html' target=blank >Editar árvore</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='opção visível apenas para editores' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >Editar menus</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php?tipoxml=kml' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/visual/default/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.flutuante===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='#' onclick='i3GEO.arvoreDeTemas.flutuante()' >Abrir em janela flutuante</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<b> OGC-WMS</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>"+editor,idwms:"raiz",expanded:false,enableHighlight:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<b> "+$trad("t46")+"</b> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' > </a>",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+$im("e"+ig+".png")+"' />",enableHighlight:false,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<b> <span title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<b> <span title='nao publicado' ><s>"+dados[i].nomemenu+"</s></span>"+editor}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu,enableHighlight:false,expanded:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,1);if(dados[i].status==="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"<b>Sistemas</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' > </a>",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<s>"+sis[ig].NOME+"</s>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','Sistemas')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt);if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}}},adicionaNoNavegacaoDir:function(){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){var temp=function(){var drives,iglt,ig,drive,tempNode;drives=i3GEO.arvoreDeTemas.DRIVES;if(drives==undefined||drives==""||drives.length===0){i3GEO.arvoreDeTemas.ARVORE.draw();return}iglt=drives.length;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' > </a>",enableHighlight:false,expanded:false},i3GEO.arvoreDeTemas.ARVORE.getRoot());ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho,enableHighlight:false,expanded:false},tempNode);drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig+=1}while(ig<iglt);i3GEO.arvoreDeTemas.ARVORE.draw()};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,temp)}},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra&&raiz[i].nome!=""){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&grupos[i].nome!=undefined){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' ><s>"+grupos[i].nome+"</s></span>"}}d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos,1);tempNode.isLeaf=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&subgrupos[i].nome!=undefined){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' ><s>"+subgrupos[i].nome+"</s></span>"}}d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaSubGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' ><s>"+temas[i].nome+"</s></span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,conteudo,dirs,tempNode,arquivos;dirs=retorno.data.diretorios;for(ig=0;ig<dirs.length;ig+=1){tempNode=new YAHOO.widget.HTMLNode({html:dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='i3GEO.util.adicionaSHP(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:conteudo,caminho:node.data.caminho+"/"+conteudo},node)}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html,estilo="",clique;if(navm){estilo="padding-top:1px;"}html="<td style='"+estilo+"'><span>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img title='"+tema.tid+"' src='"+$im("down1.gif")+"'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{if(i3GEO.arvoreDeTemas.ATIVATEMAIMEDIATO===false){clique="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeTemas.adicionaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicar\",this)'"}else{clique="onclick='i3GEO.arvoreDeTemas.adicionaTemas([\""+tema.tid+"\"])'"}}html+=clique;if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="</td><td title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='cursor:pointer;font-size:11px;text-align:left;color:"+cor+";padding-left:0px;' "+clique+">";html+=tema.nome;html+="</td></span>";return(html)},propTemas:function(node){var html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >"+$trad("x19")+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface=openlayers_t.htm&temasa="+node.data.idtema+"&layers="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface=openlayers_t.htm&temasa="+node.data.idtema+"&layers="+node.data.idtema;new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>":"<img src='"+i3GEO.util.$im("e0.png")+"'/>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0,imb=i3GEO.util.$im("branco.gif"),OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS,estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(OPCOESADICIONAIS.refresh===true){ins+="<td><img "+estilo("refresh")+" onclick='i3GEO.arvoreDeTemas.atualiza()' title='Refresh'/></td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectaservico()' title='"+$trad("a15")+"'/></td>";t+=20;ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' title='"+$trad("a14")+"'/></td>";t+=20}else{if(OPCOESADICIONAIS.uploadgpx===true){ins+="<td><img "+estilo("uploadgpx")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' title='upload GPX'/></td>";t+=20}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<td><img "+estilo("uploaddbf")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' title='"+$trad("a2b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.uploadlocal===true){ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.upload()' title='"+$trad("a2")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carregaKml===true){ins+="<td><img "+estilo("carregarKml")+" onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' title='Kml'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwms===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' title='"+$trad("a4")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<td><img "+estilo("conectarwmst")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' title='"+$trad("a4b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<td><img "+estilo("conectargeorss")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' title='"+$trad("a5")+"'/></td>";t+=20}}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img "+estilo("download")+" onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' title='"+$trad("a3")+"'/></td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img "+estilo("importarwmc")+" onclick='i3GEO.arvoreDeTemas.dialogo.importarwmc()' title='"+$trad("a3a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img "+estilo("carouselTemas")+" onclick='i3GEO.arvoreDeTemas.dialogo.carouselTemas()' title='Miniaturas'/></td>";t+=20}if(OPCOESADICIONAIS.inde===true){ins+="<td><img "+estilo("buscaInde")+" onclick='i3GEO.arvoreDeTemas.dialogo.buscaInde()' title='Pesquisa na INDE'/></td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk="";if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,html:d,expanded:false},nodePalavra)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,expanded:false,html:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var temp;try{clearTimeout(tempoBotaoAplicar)}catch(e){}tempoBotaoAplicar="";i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length===1&&i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){temp=window.confirm("O tema existe no mapa. Adiciona novamente?");if(!temp){return}}if(tsl.length>0){temp=function(retorno){i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!==i3GEO.guias.ATUAL){i3GEO.guias.escondeGuias();i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.php.adtema(temp,tsl.toString())}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig+=1){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFuploadarquivo")};titulo="Upload de arquivo</a>";janela=i3GEO.janela.cria("250px","150px","","","",titulo,"i3GEOFuploadarquivo",false,"hd",cabecalho,minimiza);$i("i3GEOFuploadarquivo_corpo").style.backgroundColor="white";$i("i3GEOFuploadarquivo_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de arquivo</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.uploadlocal===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.upload()' /></td>"+" <td>Shape file</td>"+" </tr>"}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' /></td>"+" <td>DBF ou CSV</td>"+" </tr>"}if(OPCOESADICIONAIS.uploadgpx===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' /></td>"+" <td>GPX</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadkml()' /></td>"+" <td>KML ou KMZ</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},conectaservico:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFconectaservico")};titulo="Conexão com serviços</a>";janela=i3GEO.janela.cria("260px","150px","","","",titulo,"i3GEOFconectaservico",false,"hd",cabecalho,minimiza);$i("i3GEOFconectaservico_corpo").style.backgroundColor="white";$i("i3GEOFconectaservico_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de conex&aatilde;o</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.carregaKml===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' /></td>"+" <td>KML</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwms===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' /></td>"+" <td>WMS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' /></td>"+" <td>WMS-T</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' /></td>"+" <td>GeoRSS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeojson===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeojson()' /></td>"+" <td>GeoJson</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},carregaKml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carregakml/index.js","i3GEOF.carregakml.criaJanelaFlutuante()","i3GEOF.carregakml_script")},carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},buscaInde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/index.js","i3GEOF.buscainde.criaJanelaFlutuante()","i3GEOF.buscainde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.js","i3GEOF.nuvemtags.criaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","","Nuvem Flash")},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","Diretórios")},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/index.js","i3GEOF.importarwmc.criaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' > </a>")},conectarwmst:function(){var l,a;if(i3GEO.parametros.w){l=i3GEO.parametros.w+150}else{l=400}if(i3GEO.parametros.h){a=i3GEO.parametros.h+200}else{a=350}i3GEO.janela.cria(l/2+"px",a/2+"px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' > </a>")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeojson:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectargeojson/index.js","i3GEOF.conectargeojson.criaJanelaFlutuante()","i3GEOF.conectargeojson_script")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=29' > </a>")},upload:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js","i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")},uploaddbf:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js","i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")},uploadgpx:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadgpx/index.js","i3GEOF.uploadgpx.criaJanelaFlutuante()","i3GEOF.uploadgpx_script")},uploadkml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadkml/index.js","i3GEOF.uploadkml.criaJanelaFlutuante()","i3GEOF.uploadkml_script")}},abrejanelaIframe:function(w,h,s){var janelaeditor=i3GEO.janela.cria(w,h,s,parseInt(Math.random()*100,10),10,s,"janela"+i3GEO.util.randomRGB(),false);YAHOO.util.Event.addListener(janelaeditor[0].close,"click",i3GEO.arvoreDeTemas.atualiza,janelaeditor[0].panel,{id:janelaeditor[0].id},true)}}; | |
369 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={ATIVA:true,TIPO:"yui",OFFSET:-205,MAXBOTOES:11,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{localizar:true,zoomli:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,selecao:true,google:true,barraedicao:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.Interface.ATUAL==="openlayers"){try{i3GEO.Interface.openlayers.OLzoom.deactivate()}catch(e){}}var estilo,temp,ist,cor,ko;this.BOTAOCLICADO=icone;ko=this.LISTABOTOES.length-1;if(this.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(this.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(this.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(this.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(this.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(this.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(this.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){if(i3GEO.barraDeBotoes.ATIVA===false){return}var temp,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43+"px";temp.style.left=posX+18+"px"}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{temp=l[b].iddiv;if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){if(i3GEO.barraDeBotoes.ATIVA===false){return}i3GEO.barraDeBotoes.AJUDA=false;euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(),temp="dockBg-r.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP);if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="dockBg-r2.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-l.png"}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.ATIVAJANELA=true;i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}};if(!$i("euDockMensagem")){temp=document.createElement("div");temp.style.top="38px";temp.style.color="gray";temp.style.textAlign="center";temp.style.fontSize="10px";temp.innerHTML="";temp.id="euDockMensagem";euEnv.euDockArray.euDock_0.div.appendChild(temp)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,e,wj,recuo,novoel,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.i3GEO.janela.botoes=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})}else{YAHOO.i3GEO.janela.botoes=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})}}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","hd2")}},ativaMenuContexto:function(idbarra){if(i3GEO.barraDeBotoes.ATIVA===false){return}var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:" <span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+idbarra;$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){i3GEO.barraDeBotoes.BARRAS[i].show()}}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var i,n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i]&&BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){i3GEO.barraDeBotoes.editor.carregaJs("janelaEditorVetorial")},carregaJs:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js","i3GEO.barraDeBotoes.editor.ativaPainel('"+idjanela+"')","openlayers.js",true)}else{if(!i3GEO.editorOL.layergrafico){i3GEO.editorOL.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="Editor vetorial";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}"}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.editorOL.layergrafico=new OpenLayers.Layer.Vector("Edição",{styleMap:styleMap1,displayInLayerSwitcher:false,visibility:true});i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]);i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}; | |
370 | 370 | function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i<length;i++){var uuidchar=parseInt((Math.random()*256)).toString(16);if(uuidchar.length==1)uuidchar="0"+uuidchar;uuidpart+=uuidchar}return uuidpart}).join('-')}function AbstractRenderer(){};AbstractRenderer.prototype.init=function(elem){};AbstractRenderer.prototype.bounds=function(shape){return{x:0,y:0,width:0,height:0}};AbstractRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){};AbstractRenderer.prototype.remove=function(shape){};AbstractRenderer.prototype.move=function(shape,left,top){};AbstractRenderer.prototype.track=function(shape){};AbstractRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){};AbstractRenderer.prototype.editCommand=function(shape,cmd,value){};AbstractRenderer.prototype.queryCommand=function(shape,cmd){};AbstractRenderer.prototype.showTracker=function(shape){};AbstractRenderer.prototype.getMarkup=function(){return null}; |
371 | 371 | function SVGRenderer(){this.base=AbstractRenderer;this.svgRoot=null}SVGRenderer.prototype=new AbstractRenderer;SVGRenderer.prototype.init=function(elem){this.container=elem;this.container.style.MozUserSelect='none';var svgNamespace='http://www.w3.org/2000/svg';this.svgRoot=this.container.ownerDocument.createElementNS(svgNamespace,"svg");this.container.appendChild(this.svgRoot)};SVGRenderer.prototype.bounds=function(shape){var rect=new Object();var box=shape.getBBox();rect['x']=box.x;rect['y']=box.y;rect['width']=box.width;rect['height']=box.height;return rect};SVGRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var svgNamespace='http://www.w3.org/2000/svg';var svg;if(shape=='rect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='ellipse'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',(left+width/2)+'px');svg.setAttributeNS(null,'cy',(top+height/2)+'px');svg.setAttributeNS(null,'rx',(width/2)+'px');svg.setAttributeNS(null,'ry',(height/2)+'px')}else if(shape=='circ'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',left+'px');svg.setAttributeNS(null,'cy',top+'px');svg.setAttributeNS(null,'rx',width+'px');svg.setAttributeNS(null,'ry',width+'px')}else if(shape=='roundrect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'rx','20px');svg.setAttributeNS(null,'ry','20px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='line'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'line');svg.setAttributeNS(null,'x1',left+'px');svg.setAttributeNS(null,'y1',top+'px');svg.setAttributeNS(null,'x2',width+'px');svg.setAttributeNS(null,'y2',height+'px')}else if(shape=='text'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'text');var n=this.container.ownerDocument.createTextNode(texto);svg.appendChild(n);svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'font-size','12px')}svg.style.position='absolute';if(fillColor.length==0)fillColor='none';svg.setAttributeNS(null,'fill',fillColor);if(lineColor.length==0)lineColor='none';svg.setAttributeNS(null,'stroke',lineColor);svg.setAttributeNS(null,'stroke-width',lineWidth);this.svgRoot.appendChild(svg);return svg};SVGRenderer.prototype.remove=function(shape){shape.parentNode.removeChild(shape)};SVGRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){var deltaX=shape.getBBox().width;var deltaY=shape.getBBox().height;shape.setAttributeNS(null,'x1',left);shape.setAttributeNS(null,'y1',top);shape.setAttributeNS(null,'x2',left+deltaX);shape.setAttributeNS(null,'y2',top+deltaY)}else if(shape.tagName=='ellipse'){shape.setAttributeNS(null,'cx',left+(shape.getBBox().width/2));shape.setAttributeNS(null,'cy',top+(shape.getBBox().height/2))}else{shape.setAttributeNS(null,'x',left);shape.setAttributeNS(null,'y',top)}};SVGRenderer.prototype.track=function(shape){};SVGRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){var deltaX=toX-fromX;var deltaY=toY-fromY;if(shape.tagName=='line'){shape.setAttributeNS(null,'x2',toX);shape.setAttributeNS(null,'y2',toY)}else if(shape.tagName=='ellipse'){if(deltaX<0){shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(-deltaX/2)+'px')}else{shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(deltaX/2)+'px')}if(deltaY<0){shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(-deltaY/2)+'px')}else{shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(deltaY/2)+'px')}}else{if(deltaX<0){shape.setAttributeNS(null,'x',toX+'px');shape.setAttributeNS(null,'width',-deltaX+'px')}else{shape.setAttributeNS(null,'width',deltaX+'px')}if(deltaY<0){shape.setAttributeNS(null,'y',toY+'px');shape.setAttributeNS(null,'height',-deltaY+'px')}else{shape.setAttributeNS(null,'height',deltaY+'px')}}};SVGRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!='')shape.setAttributeNS(null,'fill',value);else shape.setAttributeNS(null,'fill','none')}else if(cmd=='linecolor'){if(value!='')shape.setAttributeNS(null,'stroke',value);else shape.setAttributeNS(null,'stroke','none')}else if(cmd=='linewidth'){shape.setAttributeNS(null,'stroke-width',parseInt(value)+'px')}}};SVGRenderer.prototype.queryCommand=function(shape,cmd){var result='';if(shape!=null){if(cmd=='fillcolor'){result=shape.getAttributeNS(null,'fill');if(result=='none')result=''}else if(cmd=='linecolor'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result=''}else if(cmd=='linewidth'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result='';else result=shape.getAttributeNS(null,'stroke-width')}}return result};SVGRenderer.prototype.showTracker=function(shape){var box=shape.getBBox();var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}var svgNamespace='http://www.w3.org/2000/svg';tracker=document.createElementNS(svgNamespace,'rect');tracker.setAttributeNS(null,'id','tracker');tracker.setAttributeNS(null,'x',box.x-10);tracker.setAttributeNS(null,'y',box.y-10);tracker.setAttributeNS(null,'width',box.width+20);tracker.setAttributeNS(null,'height',box.height+20);tracker.setAttributeNS(null,'fill','none');tracker.setAttributeNS(null,'stroke','blue');tracker.setAttributeNS(null,'stroke-width','1');this.svgRoot.appendChild(tracker)};SVGRenderer.prototype.getMarkup=function(){return this.container.innerHTML}; |
372 | 372 | function VMLRenderer(){this.base=AbstractRenderer}VMLRenderer.prototype=new AbstractRenderer;VMLRenderer.prototype.init=function(elem){this.container=elem;this.container.style.overflow='hidden';elem.ownerDocument.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=elem.ownerDocument.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML);")};VMLRenderer.prototype.bounds=function(shape){var rect=new Object();rect['x']=shape.offsetLeft;rect['y']=shape.offsetTop;rect['width']=shape.offsetWidth;rect['height']=shape.offsetHeight;return rect};VMLRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var vml;if(shape=='rect'){vml=this.container.ownerDocument.createElement('v:rect')}else if(shape=='roundrect'){vml=this.container.ownerDocument.createElement('v:roundrect')}else if(shape=='ellipse'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='circ'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='line'){vml=this.container.ownerDocument.createElement('v:line')}else if(shape=='text'){vml=this.container.ownerDocument.createElement('v:textbox');vml.innerHTML=texto}if(shape!='line'){vml.style.position='absolute';vml.style.left=left+"px";vml.style.top=top+"px";vml.style.width=width+"px";vml.style.height=height+"px";if(fillColor!=''){vml.setAttribute('filled','true');vml.setAttribute('fillcolor',fillColor)}else{vml.setAttribute('filled','false')}}else{vml.style.position='absolute';vml.setAttribute('from',left+'px,'+top+'px');vml.setAttribute('to',width+'px,'+height+'px')}if(lineColor!=''){vml.setAttribute('stroked','true');vml.setAttribute('strokecolor',lineColor);vml.setAttribute('strokeweight',lineWidth)}else{vml.setAttribute('stroked','false')}this.container.appendChild(vml);return vml};VMLRenderer.prototype.remove=function(shape){shape.removeNode(true)};VMLRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){shape.style.marginLeft=left+"px";shape.style.marginTop=top+"px"}else{shape.style.left=left+"px";shape.style.top=top+"px"}};VMLRenderer.prototype.track=function(shape){};VMLRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){shape.setAttribute('to',toX+'px,'+toY+'px')};VMLRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!=''){shape.filled='true';shape.fillcolor=value}else{shape.filled='false';shape.fillcolor=''}}else if(cmd=='linecolor'){if(value!=''){shape.stroked='true';shape.strokecolor=value}else{shape.stroked='false';shape.strokecolor=''}}else if(cmd=='linewidth'){shape.strokeweight=parseInt(value)+'px'}}};VMLRenderer.prototype.queryCommand=function(shape,cmd){if(shape!=null){if(cmd=='fillcolor'){if(shape.filled=='false')return'';else return shape.fillcolor}else if(cmd=='linecolor'){if(shape.stroked=='false')return'';else return shape.strokecolor}else if(cmd=='linewidth'){if(shape.stroked=='false'){return''}else{return(parseFloat(shape.strokeweight)*(screen.logicalXDPI/72))+'px'}}}};VMLRenderer.prototype.showTracker=function(shape){var box=this.bounds(shape);var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}tracker=this.container.ownerDocument.createElement('v:rect');tracker.id='tracker';tracker.style.position='absolute';tracker.style.left=box.x-10+"px";tracker.style.top=box.y-10+"px";tracker.style.width=box.width+20+"px";tracker.style.height=box.height+20+"px";tracker.setAttribute('filled','false');tracker.setAttribute('stroked','true');tracker.setAttribute('strokecolor','blue');tracker.setAttribute('strokeweight','1px');this.container.appendChild(tracker)};VMLRenderer.prototype.getMarkup=function(){return this.container.innerHTML}; |
373 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.coordenadas={formato:"bloco",padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"Déc. de grau",ativo:true,defepsg:""},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"}},MODOTEXTO:"",mostraCoordenadasUTM:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasUTM.idhtml}else{this.PARAMETROS.mostraCoordenadasUTM.idhtml=id}if(!$i(id)||this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}atualizaCoordenadasUTM=function(){if(this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}if(i3GEO.Interface.STATUS.atualizando.length>0){return}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10){return}if($i("wdoca")){return}if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}var tempUtm=function(retorno){var funcao,temp,texto;funcao="$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';"+"if(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml == i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml)"+"{$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml).style.display='block';i3GEO.coordenadas.mostraCoordenadasGEO();}";idSetTimeoutMostraUTM=setTimeout(funcao,3400);temp=$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml);if(retorno.data){temp.style.display="block";texto="<div onclick='javascript:clearTimeout(idSetTimeoutMostraUTM);i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml = \"\";i3GEO.coordenadas.mostraCoordenadasGEO();' style='width:300px;font-size:10px;' >UTM: x="+retorno.data.x+" y="+retorno.data.y+" zn="+retorno.data.zona+" "+retorno.data.datum+" <img class='x' src='"+i3GEO.util.$im("branco.gif")+"' /></div>";temp.innerHTML=texto}};i3GEO.php.geo2utm(tempUtm,objposicaocursor.ddx,objposicaocursor.ddy)};if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")<0){i3GEO.eventos.MOUSEPARADO.push("atualizaCoordenadasUTM()")}}catch(e){alert("mostraCoordenadasUtm: "+e.description)}},mostraCoordenadasGEO:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasGEO.idhtml}else{this.PARAMETROS.mostraCoordenadasGEO.idhtml=id}if($i(id)){if(!$i("coordgeotabela")){$i(id).innerHTML=i3GEO.coordenadas.criaMascaraDMS("coordgeotabela");atualizaLocalizarGeo=function(){var temp=$i("coordgeotabela");if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"coordgeotabela")}};if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo()")}}}}}catch(e){alert("mostraCoordenadasGeo: "+e.description)}},geo2zonaUtm:function(long){long=(long*1)+180;long=long/6;return parseInt(long,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins='<table id='+prefixo+' style=display:block;text-align:center;width:295px ><tr style="border-bottom:2px solid white" >'+"<td>"+caixa+" </td>"+'<td style=width:10px;text-align:right > X:</td>'+'<td>'+$inputText('','',prefixo+'xg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'xm','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'xs','segundo','4','00.00')+'</td>'+'<td>Y:'+$inputText('','',prefixo+'yg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'ym','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'ys','segundo','4','00.00')+'</td>',temp='var '+prefixo+'xxx = i3GEO.calculo.dms2dd($i(\''+prefixo+'xg\').value,$i(\''+prefixo+'xm\').value,$i(\''+prefixo+'xs\').value);'+'var '+prefixo+'yyy = i3GEO.calculo.dms2dd($i(\''+prefixo+'yg\').value,$i(\''+prefixo+'ym\').value,$i(\''+prefixo+'ys\').value);'+'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);';ins+='<td><img class=tic title=zoom onclick="'+temp+'" src="'+i3GEO.util.$im("branco.gif")+'" /></td>'+"</tr></table>";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");$i(prefixo+"xg").value=x[0];$i(prefixo+"xm").value=x[1];$i(prefixo+"xs").value=x[2];$i(prefixo+"yg").value=y[0];$i(prefixo+"ym").value=y[1];$i(prefixo+"ys").value=y[2];i3GEO.coordenadas.MODOTEXTO+="DMS - Latitude: "+y[0]+" "+y[1]+" "+y[2]+" Longitude: "+x[0]+" "+x[1]+" "+x[2]+"<br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<table id="+prefixo+" style=display:block;text-align:center;;width:415px ><tr style='border-bottom:2px solid white' >"+"<td>"+caixa+" <td>"+"<td style=width:100px;text-align:right >"+titulo+" X: </td>"+"<td>"+$inputText("","",prefixo+"X","X","12","00")+" </td>"+"<td>Y:"+$inputText("","",prefixo+"Y","Y","12","00")+" </td>"+"<td>Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+" </td>"+"</tr></table>";return ins},atualizaProj4:function(onde,configProj,x,y){var zona,temp,p,destino="",iu=i3GEO.util;try{if(!$i(onde+configProj+"ZN")){return}}catch(e){return}temp=i3GEO.coordenadas.config[configProj];try{if($i(onde+configProj).style.display==="none"){return}}catch(men){}if(temp.tipo==="metrica"){destino=temp.defepsg}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipo==="utm"){zona=i3GEO.coordenadas.geo2zonaUtm(x);$i(onde+configProj+"ZN").value=zona;if(objposicaocursor.ddy*1>0){destino=temp.zona[zona+"N"]}else{destino=temp.zona[zona+"S"]}if(typeof(destino)==='undefined'){iu.defineValor(onde+configProj+"X","value","?");iu.defineValor(onde+configProj+"Y","value","?");return}}if(temp.defepsg===""&&temp.tipo==="metrica"){p={x:x,y:y}}else{p=i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y)}iu.defineValor(onde+configProj+"X","value",p.x);iu.defineValor(onde+configProj+"Y","value",p.y);i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" - X: "+p.x+" Y: "+p.y+"<br>"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};Proj4js.getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/proj4js/lib/"};var source=new Proj4js.Proj("ORIGEM"),dest=new Proj4js.Proj("DESTINO"),p=new Proj4js.Point(x,y);Proj4js.transform(source,dest,p);return p},ativaBloco:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0;for(i=0;i<n;i++){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(tipos[i]===this.padrao){$i(prefixo+tipos[i]).style.display="block"}else{$i(prefixo+tipos[i]).style.display="none"}}}},mudaTipo:function(obj,onde){if(obj.value==="janela"){this.formato="janela";this.mostraCoordenadas();return}this.padrao=obj.value;obj.selectedIndex=0;i3GEO.coordenadas.ativaBloco(onde)},mostraCoordenadas:function(ativaMovimento,onde,x,y){try{var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela;i3GEO.coordenadas.MODOTEXTO="";if(arguments.length===0){ativaMovimento=true;onde=""}if(onde===""){onde=i3GEO.coordenadas.config[tipos[0]].idhtml}caixa="<select onchange='javascript:i3GEO.coordenadas.mudaTipo(this,\""+onde+"\");' style='border: 1px solid #B4B4B4;color: #B4B4B4;margin-left:3px;font-size:10px;height:16px;width:40px;' ><option>---</option><option value='janela' >janela</option>";for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){caixa+="<option value='"+tipos[i]+"'>"+temp.titulo+"</option>"}}caixa+="</select>";if(i3GEO.coordenadas.formato!=="bloco"){caixa=""}for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){ins+=i3GEO.coordenadas.criaMascaraDMS(onde+tipos[i],temp.titulo,caixa);if(i3GEO.coordenadas.formato==="separado"){try{$i(temp.idhtml).innerHTML=ins}catch(e){}ins=""}}else{ins+=i3GEO.coordenadas.criaMascaraMetrica(onde+tipos[i],temp.titulo,caixa)}}}if(this.formato==="janela"){janela=i3GEO.janela.cria("450px","120px","","","","Coordenadas aproximadas","i3GEOJanelaCoordenadas",false,"hd","","");YAHOO.util.Event.addListener(janela[0].close,"click",function(){i3GEO.coordenadas.formato="bloco",i3GEO.coordenadas.mostraCoordenadas()});temp=$i("i3GEOJanelaCoordenadas_corpo");temp.style.backgroundColor="white";temp.style.textAlign="left";temp=$i("i3GEOJanelaCoordenadas");temp.onmouseover="";temp.onmouseout="";if($i(onde)){$i(onde).innerHTML=""}onde="i3GEOJanelaCoordenadas_corpo";ins+="<br><a href='#' style='cursor:pointer;color:blue' onclick='new YAHOO.util.KeyListener(document.body,{alt:true,keys:67},{fn: function(type, args, obj){alert(i3GEO.coordenadas.MODOTEXTO);}}).enable();' >"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas</a>"}if(onde!==""&&$i(onde)){$i(onde).innerHTML=ins}atualizaLocalizarGeo=function(id,x,y){if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}};for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0])}}else{if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){i3GEO.coordenadas.atualizaProj4(onde,tipos[i],x,y)}}}}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.limpaModoTexto()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.limpaModoTexto()")}}}if(i3GEO.coordenadas.formato==="bloco"){i3GEO.coordenadas.ativaBloco(onde)}}catch(men){}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""}}; | |
374 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida",servicosexternos:true,temasmapa:false},"mostraVisual":{idhtml:""},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{permiteLogin:true,idhtml:"menus",deslocaEsquerda:0,parametrosYUI:{iframe:false,autosubmenudisplay:false,showdelay:200,hidedelay:500,lazyload:false}},"mostraMenuLista":{idhtml:"menuLista"},"mostraVersao":{idhtml:"versaoi3geo"},"mostraEmail":{idhtml:"emailInstituicao"}},mostraEmail:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.emailInstituicao)},mostraVersao:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.mensageminicia)},mostraCoordenadasUTM:function(id){try{i3GEO.coordenadas.mostraCoordenadasUTM.idhtml=i3GEO.gadgets.mostraCoordenadasUTM.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasUTM(id)},mostraCoordenadasGEO:function(id){try{i3GEO.coordenadas.mostraCoordenadasGEO.idhtml=i3GEO.gadgets.mostraCoordenadasGEO.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasGEO(id)},mostraInserirKml:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml}if($i(id)){if(!$i("i3geo_urlkml")){i=$inputText(id,"290","i3geo_urlkml","kml url","40","");ins="<table><tr><td>Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp,onde;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}onde=$i(id);if(onde){if(onde.style.display=="none"){onde.style.display="block"}if(!$i("i3geo_escalanum")){i="<form id='i3GEOescalanumForm' >"+$inputText(id,"100","i3geo_escalanum",$trad("d10"),"10",parseInt(i3GEO.parametros.mapscale,10))+"</form>";ins="<table><tr><td>"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";onde.innerHTML=ins;$i("i3GEOescalanumForm").onsubmit=function(){i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,document.getElementById("i3geo_escalanum").value);return false}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.atualizaEscalaNumerica()")}}},atualizaEscalaNumerica:function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.gadgets.atualizaEscalaNumerica()");return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}},mostraEscalaGrafica:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}var e,temp,ins;if($i(id)){atualizaEscalaGrafica=function(){e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}temp=function(retorno){eval(retorno.data);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){ins="<img class='menuarrow' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" title='opções' onclick='i3GEO.mapa.dialogo.opcoesEscala()' style='cursor:pointer'/><img id=imagemEscalaGrafica src='' />";$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){var i,ins,temp,fbusca;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}i3GEO.gadgets.mostraBuscaRapida.id=id;if($i(id)){i3geo_buscaRapida=function(){alert("i3geo_buscaRapida foi depreciada")};i="<form id=i3GEObotaoFormBuscaRapida"+id+" >"+$inputText(id,"256","valorBuscaRapida"+id,"Município, cidade, UC, endereço...","20",$trad("o2"))+"</form>";ins="<table><tr><td><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=8&idajuda=71' > </a></td><td>"+i+"</td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("p13")+"' class='ticPropriedades2' id=i3GEObotaoPropriedadesBuscaRapida"+id+" /></td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' id=i3GEObotaoBuscaRapida"+id+" /></td></tr></table>";temp=$i(id);if(temp){fbusca=function(){if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos===false&&i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa===false){alert("Escolha um tipo de busca nas propriedades");return}if($i("valorBuscaRapida"+id).value===""){alert("Digite uma palavra para busca!");return}i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida");return false};temp.innerHTML=ins;$i("i3GEObotaoBuscaRapida"+id).onclick=fbusca;$i("i3GEObotaoFormBuscaRapida"+id).onsubmit=fbusca;$i("i3GEObotaoPropriedadesBuscaRapida"+id).onclick=function(){var ins,interno="",externo="";i3GEO.janela.cria("300px","150px","","","","Propriedades","i3GEOpropriedadesBuscaRapida"+id);if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos){externo="checked"}if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa){interno="checked"}ins="<p class=paragrafo >Onde será feita a busca:</p>"+"<table class=lista3 >"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos = this.checked' type=checkbox "+externo+" ></td><td>Serviços de busca externos (Google e MMA)</td></tr>"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa = this.checked' type=checkbox "+interno+" ></td><td>Temas existentes no mapa</td></tr>"+"</table><br>"+"<p class=paragrafo >Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber operações de busca.</p>";$i("i3GEOpropriedadesBuscaRapida"+id+"_corpo").innerHTML=ins}}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins="<table style='text-align:center;position:relative;left:";if(navm){ins+="0px;'>"}else{ins+="6px;'>"}ins+="<tr><td><img id='i3geo_zoomanterior' class='zoomAnterior' title='anterior' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="<td> </td>";ins+="<td><img id='i3geo_zoomproximo' class='zoomProximo' title='proximo' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="</tr></table>";$i(id).innerHTML=ins}},visual:{inicia:function(id){alert("A i3GEO.gadgets.visual foi depreciado")},troca:function(visual){alert("A i3GEO.gadgets.visual foi depreciado")}},mostraMenuSuspenso:function(id){var objid,n,i,estilo,t,onMenuBarBeforeRender,temp,i3GEOoMenuBarLocal,ms=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso,confm=i3GEO.configura.oMenuData,ins="",alinhamento="";if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(!objid){return}if(objid&&objid.innerHTML===""){try{if(ms.permiteLogin===true||i3GEO.parametros.editor==="sim"){i3GEO.configura.oMenuData.menu.push({nome:"Admin",id:"i3GeoAdmin"});i3GEO.configura.oMenuData.submenus.i3GeoAdmin=[];if(ms.permiteLogin===true){i3GEO.configura.oMenuData.submenus.i3GeoAdmin.push({id:"omenudataAdminu1",text:"Login",url:"javascript:i3GEO.login.dialogo.abreLogin()"},{id:"omenudataAdminu2",text:"Logout",url:"javascript:i3GEO.login.dialogo.abreLogout()"})}if(i3GEO.login.verificaCookieLogin()){i3GEO.configura.oMenuData.submenus.i3GeoAdmin.push({id:"omenudataAdmin1",text:$trad("x1"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/admin/index.html')"},{id:"omenudataAdmin2",text:$trad("g1a"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/admin/html/arvore.html')"},{id:"omenudataAdmin3",text:$trad("x10"),url:"javascript:i3GEO.arvoreDeTemas.abrejanelaIframe('900','700','"+i3GEO.configura.locaplic+"/admin/html/menus.html\')"})}}}catch(e){}i3GEOoMenuBar=YAHOO.widget.MenuManager;if(objid){objid.className="yuimenubar";temp=$i("contemMenu");if(temp){temp.className="yui-navset"}if(ms.deslocaEsquerda){alinhamento="left:"+ms.deslocaEsquerda*-1+"px;"}if(!objid.style.height||parseInt(objid.style.height,10)===0){objid.style.height="21px"}else{if(!temp.style.height||parseInt(temp.style.height)===0){temp.style.height="21px"}}ins+='<div class="bd" style="top:0px;'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'+'<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';n=confm.menu.length;estilo="padding-bottom:3px;top:0px;border: 0px solid white;";for(i=0;i<n;i+=1){t="";if(confm.menu[i].target){t="target="+confm.menu[i].target}if(confm.submenus[confm.menu[i].id].length>0){ins+='<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+confm.menu[i].id+'" > '+confm.menu[i].nome+'</a></li>'}}ins+='</ul>';ins+='</div>';objid.innerHTML=ins;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI.iframe=true}i3GEOoMenuBarLocal=new YAHOO.widget.MenuBar(id,i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI);onMenuBarBeforeRender=function(p_sType,p_sArgs){var nomeMenu="",nomeSub,subs=i3GEO.configura.oMenuData.submenus,conta=0;for(nomeMenu in subs){if($i("menu"+nomeMenu)){nomeSub=subs[nomeMenu];if(nomeSub!==""){i3GEOoMenuBarLocal.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:nomeSub})}conta+=1}}};i3GEOoMenuBar.addMenu(i3GEOoMenuBarLocal);i3GEOoMenuBarLocal.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBarLocal.render()}}temp=["omenudataInterface1","omenudataInterface2","omenudataInterface3","omenudataInterface4","omenudataInterface5"];n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("checked",false)}}try{temp="";switch(i3GEO.Interface.ATUAL){case"openlayers":temp="omenudataInterface2";break;case"googlemaps":temp="omenudataInterface4";break;case"googleearth":temp="omenudataInterface5";break}if(temp!=""&&$i(temp)){i3GEOoMenuBar.getMenuItem(temp).cfg.setProperty("checked",true)}}catch(e){}temp=["omenudataFerramentas7b","omenudataArquivos3","omenudataJanelas1","omenudataJanelas3","omenudataFerramentas2a"];n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("disabled",false)}}try{temp=[];switch(i3GEO.Interface.ATUAL){case"openlayers":temp=["omenudataArquivos3","omenudataJanelas1"];break;case"googlemaps":temp=["omenudataArquivos3","omenudataJanelas1","omenudataJanelas3"];break;case"googleearth":temp=["omenudataFerramentas7b","omenudataArquivos3","omenudataJanelas3","omenudataFerramentas2a"];break};n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("disabled",true)}}}catch(e){}temp=objid.style;temp.backgroundPosition="0px -1px";temp.border="0px solid white";if(ms.finaliza&&ms.finaliza!=""){eval(ms.finaliza)}},mostraMenuLista:function(id){var objid,n,i,sub,nomeMenu="",ms=i3GEO.gadgets.PARAMETROS.mostraMenuLista,confm=i3GEO.configura.oMenuData,ins="",subs=i3GEO.configura.oMenuData.submenus;if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(objid){n=confm.menu.length;for(i=0;i<n;i+=1){ins+='<div class="listaMenuTitulo" id=menulista_'+confm.menu[i].id+'>'+confm.menu[i].nome+'</div>'}objid.innerHTML=ins;for(nomeMenu in subs){if($i("menulista_"+nomeMenu)){sub=subs[nomeMenu];n=sub.length;ins="";for(i=0;i<n;i++){ins+="<p class='listaMenuItem' ><a href='"+sub[i].url+"' target='_blank'>"+sub[i].text+"</a>"}$i("menulista_"+nomeMenu).innerHTML+=ins}}}}}; | |
375 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.social={curtirFacebook:function(url,tipo){if(tipo==="comtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&width=160&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:160px; height:21px;' allowTransparency='true'></iframe>"}if(tipo==="semtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>"}},publicarTwitter:function(url,tipo){var re=new RegExp("=","g");url=url.replace(re,'%3d');if(tipo==="comtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&via=i3geo&url='+url+'" style="width:100px; height:21px;"></iframe>'}if(tipo==="semtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=none&via=i3geo&url='+url+'" style="width:65px; height:21px;"></iframe>'}},compartilhar:function(id,urlcf,urlpt,tipo,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}if(!tipo){tipo="comtotal"}var onde=$i(id),tabela="";if(tipo==="comtotal"){tabela+="<table style='width:250px' ><tr>"}if(tipo==="semtotal"){tabela+="<table style='width:115px' ><tr>"}if(onde||id===""){if(urlpt!==""){tabela+="<td>"+i3GEO.social.publicarTwitter(urlpt,tipo)+"</td>"}if(urlcf!==""){tabela+="<td>"+i3GEO.social.curtirFacebook(urlcf,tipo)+"</td>"}tabela+="</tr></table>";if(id!==""){onde.innerHTML=tabela}return tabela}else{return false}},bookmark:function(link,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}var ins="<img style='cursor:pointer' src='"+locaplic+"/imagens/delicious.gif' onclick='javascript:window.open(\"http://del.icio.us/post?url="+link+"\")' title='Delicious'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/digg.gif' onclick='javascript:window.open(\"http://digg.com/submit/post?url="+link+"\")' title='Digg'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+link+"\")' title='Facebook'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/stumbleupon.gif' onclick='javascript:window.open(\"http://www.stumbleupon.com/submit?url="+link+"\")' title='StumbleUpon'/>";return ins}}; | |
376 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}if(typeof(i3GEOF)==='undefined'){i3GEOF=[]}i3GEO.login={divnomelogin:"i3GEONomeLogin",recarrega:true,funcaoLoginOk:null,funcaoLoginErro:null,dialogo:{abreLogin:function(locaplic){var js;if(!locaplic){locaplic=i3GEO.configura.locaplic}if(typeof(i3GEOF.loginusuario)==='undefined'){js=locaplic+"/ferramentas/loginusuario/index.js";i3GEO.util.scriptTag(js,"i3GEOF.loginusuario.criaJanelaFlutuante()","i3GEOF.loginusuario_script")}else{i3GEOF.loginusuario.criaJanelaFlutuante()}},abreLogout:function(){var r=confirm($trad("x26"));if(r==true){i3GEO.login.anulaCookie();i3GEO.janela.destroi("i3GEOF.loginusuario");if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML=""}if(i3GEO.login.recarrega==true){document.location.reload()}}}},anulaCookie:function(){i3GEO.util.insereCookie("i3geocodigologin","",1);i3GEO.util.insereCookie("i3geousuariologin","",1);i3GEO.util.insereCookie("i3geousuarionome","",1);i3GEO.util.insereCookie("i3GeoLogin","",1)},verificaCookieLogin:function(){var a=i3GEO.util.pegaCookie("i3geocodigologin"),b=i3GEO.util.pegaCookie("i3geocodigologin"),c=i3GEO.util.pegaCookie("i3geousuarionome");if(a&&b&&c&&a!=""&&b!=""&&c!=""){return true}else{return false}},verificaOperacao:function(operacao,locaplic,funcaoOk,tipo,funcaoErro){var p="",cp,temp,resultado=true;if(!i3GEO.login.verificaCookieLogin()){if(!funcaoErro){alert("Login!")}else{funcaoErro.call()}return false}if(!locaplic){locaplic=i3GEO.configura.locaplic}temp=function(retorno){if(retorno.data=="sim"){resultado=true}else{resultado=false}if(resultado===true){if(funcaoOk&&funcaoOk!=""){funcaoOk.call()}}else{if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML=""}if(funcaoErro&&funcaoErro!=""&&resultado===false){funcaoErro.call()}}return resultado};if(tipo==="sessao"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaosessao"}if(tipo==="banco"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaobanco"}cp=new cpaint();cp.set_response_type("JSON");cp.set_transfer_mode("POST");cp.call(p,"login",temp,"&operacao="+operacao)}}; | |
373 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.coordenadas={formato:"bloco",padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"Déc. de grau",ativo:true,defepsg:""},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"}},MODOTEXTO:"",mostraCoordenadasUTM:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasUTM.idhtml}else{this.PARAMETROS.mostraCoordenadasUTM.idhtml=id}if(!$i(id)||this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}atualizaCoordenadasUTM=function(){if(this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}if(i3GEO.Interface.STATUS.atualizando.length>0){return}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10){return}if($i("wdoca")){return}if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}var tempUtm=function(retorno){var funcao,temp,texto;funcao="$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';"+"if(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml == i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml)"+"{$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml).style.display='block';i3GEO.coordenadas.mostraCoordenadasGEO();}";idSetTimeoutMostraUTM=setTimeout(funcao,3400);temp=$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml);if(retorno.data){temp.style.display="block";texto="<div onclick='javascript:clearTimeout(idSetTimeoutMostraUTM);i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml = \"\";i3GEO.coordenadas.mostraCoordenadasGEO();' style='width:300px;font-size:10px;' >UTM: x="+retorno.data.x+" y="+retorno.data.y+" zn="+retorno.data.zona+" "+retorno.data.datum+" <img class='x' src='"+i3GEO.util.$im("branco.gif")+"' /></div>";temp.innerHTML=texto}};i3GEO.php.geo2utm(tempUtm,objposicaocursor.ddx,objposicaocursor.ddy)};if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")<0){i3GEO.eventos.MOUSEPARADO.push("atualizaCoordenadasUTM()")}}catch(e){alert("mostraCoordenadasUtm: "+e.description)}},mostraCoordenadasGEO:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasGEO.idhtml}else{this.PARAMETROS.mostraCoordenadasGEO.idhtml=id}if($i(id)){if(!$i("coordgeotabela")){$i(id).innerHTML=i3GEO.coordenadas.criaMascaraDMS("coordgeotabela");atualizaLocalizarGeo=function(){var temp=$i("coordgeotabela");if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"coordgeotabela")}};if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo()")}}}}}catch(e){alert("mostraCoordenadasGeo: "+e.description)}},geo2zonaUtm:function(long){long=(long*1)+180;long=long/6;return parseInt(long,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins='<table id='+prefixo+' style=display:block;text-align:center;width:295px ><tr style="border-bottom:2px solid white" >'+"<td>"+caixa+" </td>"+'<td style=width:10px;text-align:right > X:</td>'+'<td>'+$inputText('','',prefixo+'xg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'xm','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'xs','segundo','4','00.00')+'</td>'+'<td>Y:'+$inputText('','',prefixo+'yg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'ym','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'ys','segundo','4','00.00')+'</td>',temp='var '+prefixo+'xxx = i3GEO.calculo.dms2dd($i(\''+prefixo+'xg\').value,$i(\''+prefixo+'xm\').value,$i(\''+prefixo+'xs\').value);'+'var '+prefixo+'yyy = i3GEO.calculo.dms2dd($i(\''+prefixo+'yg\').value,$i(\''+prefixo+'ym\').value,$i(\''+prefixo+'ys\').value);'+'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);';ins+='<td><img class=tic title=zoom onclick="'+temp+'" src="'+i3GEO.util.$im("branco.gif")+'" /></td>'+"</tr></table>";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");$i(prefixo+"xg").value=x[0];$i(prefixo+"xm").value=x[1];$i(prefixo+"xs").value=x[2];$i(prefixo+"yg").value=y[0];$i(prefixo+"ym").value=y[1];$i(prefixo+"ys").value=y[2];i3GEO.coordenadas.MODOTEXTO+="DMS - Latitude: "+y[0]+" "+y[1]+" "+y[2]+" Longitude: "+x[0]+" "+x[1]+" "+x[2]+"<br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<table id="+prefixo+" style=display:block;text-align:center;;width:415px ><tr style='border-bottom:2px solid white' >"+"<td>"+caixa+" <td>"+"<td style=width:100px;text-align:right >"+titulo+" X: </td>"+"<td>"+$inputText("","",prefixo+"X","X","12","00")+" </td>"+"<td>Y:"+$inputText("","",prefixo+"Y","Y","12","00")+" </td>"+"<td>Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+" </td>"+"</tr></table>";return ins},atualizaProj4:function(onde,configProj,x,y){var zona,temp,p,destino="",iu=i3GEO.util;try{if(!$i(onde+configProj+"ZN")){return}}catch(e){return}temp=i3GEO.coordenadas.config[configProj];try{if($i(onde+configProj).style.display==="none"){return}}catch(men){}if(temp.tipo==="metrica"){destino=temp.defepsg}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipo==="utm"){zona=i3GEO.coordenadas.geo2zonaUtm(x);$i(onde+configProj+"ZN").value=zona;if(objposicaocursor.ddy*1>0){destino=temp.zona[zona+"N"]}else{destino=temp.zona[zona+"S"]}if(typeof(destino)==='undefined'){iu.defineValor(onde+configProj+"X","value","?");iu.defineValor(onde+configProj+"Y","value","?");return}}if(temp.defepsg===""&&temp.tipo==="metrica"){p={x:x,y:y}}else{p=i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y)}iu.defineValor(onde+configProj+"X","value",p.x);iu.defineValor(onde+configProj+"Y","value",p.y);i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" - X: "+p.x+" Y: "+p.y+"<br>"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};Proj4js.getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/proj4js/lib/"};var source=new Proj4js.Proj("ORIGEM"),dest=new Proj4js.Proj("DESTINO"),p=new Proj4js.Point(x,y);Proj4js.transform(source,dest,p);return p},ativaBloco:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0;for(i=0;i<n;i++){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(tipos[i]===this.padrao){$i(prefixo+tipos[i]).style.display="block"}else{$i(prefixo+tipos[i]).style.display="none"}}}},mudaTipo:function(obj,onde){if(obj.value==="janela"){this.formato="janela";this.mostraCoordenadas();return}this.padrao=obj.value;obj.selectedIndex=0;i3GEO.coordenadas.ativaBloco(onde)},mostraCoordenadas:function(ativaMovimento,onde,x,y){try{var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela;i3GEO.coordenadas.MODOTEXTO="";if(arguments.length===0){ativaMovimento=true;onde=""}if(onde===""){onde=i3GEO.coordenadas.config[tipos[0]].idhtml}caixa="<select onchange='javascript:i3GEO.coordenadas.mudaTipo(this,\""+onde+"\");' style='border: 1px solid #B4B4B4;color: #B4B4B4;margin-left:3px;font-size:10px;height:16px;width:40px;' ><option>---</option><option value='janela' >janela</option>";for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){caixa+="<option value='"+tipos[i]+"'>"+temp.titulo+"</option>"}}caixa+="</select>";if(i3GEO.coordenadas.formato!=="bloco"){caixa=""}for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){ins+=i3GEO.coordenadas.criaMascaraDMS(onde+tipos[i],temp.titulo,caixa);if(i3GEO.coordenadas.formato==="separado"){try{$i(temp.idhtml).innerHTML=ins}catch(e){}ins=""}}else{ins+=i3GEO.coordenadas.criaMascaraMetrica(onde+tipos[i],temp.titulo,caixa)}}}if(this.formato==="janela"){janela=i3GEO.janela.cria("450px","120px","","","","Coordenadas aproximadas","i3GEOJanelaCoordenadas",false,"hd","","");YAHOO.util.Event.addListener(janela[0].close,"click",function(){i3GEO.coordenadas.formato="bloco",i3GEO.coordenadas.mostraCoordenadas()});temp=$i("i3GEOJanelaCoordenadas_corpo");temp.style.backgroundColor="white";temp.style.textAlign="left";temp=$i("i3GEOJanelaCoordenadas");temp.onmouseover="";temp.onmouseout="";if($i(onde)){$i(onde).innerHTML=""}onde="i3GEOJanelaCoordenadas_corpo";ins+="<br><a href='#' style='cursor:pointer;color:blue' onclick='new YAHOO.util.KeyListener(document.body,{alt:true,keys:67},{fn: function(type, args, obj){alert(i3GEO.coordenadas.MODOTEXTO);}}).enable();' >"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas</a>"}if(onde!==""&&$i(onde)){$i(onde).innerHTML=ins}atualizaLocalizarGeo=function(id,x,y){if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}};for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0])}}else{if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){i3GEO.coordenadas.atualizaProj4(onde,tipos[i],x,y)}}}}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.limpaModoTexto()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.limpaModoTexto()")}}}if(i3GEO.coordenadas.formato==="bloco"){i3GEO.coordenadas.ativaBloco(onde)}}catch(men){}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""}}; | |
374 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida",servicosexternos:true,temasmapa:false},"mostraVisual":{idhtml:""},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{permiteLogin:true,idhtml:"menus",deslocaEsquerda:0,parametrosYUI:{iframe:false,autosubmenudisplay:false,showdelay:200,hidedelay:500,lazyload:false}},"mostraMenuLista":{idhtml:"menuLista"},"mostraVersao":{idhtml:"versaoi3geo"},"mostraEmail":{idhtml:"emailInstituicao"}},mostraEmail:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.emailInstituicao)},mostraVersao:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.mensageminicia)},mostraCoordenadasUTM:function(id){try{i3GEO.coordenadas.mostraCoordenadasUTM.idhtml=i3GEO.gadgets.mostraCoordenadasUTM.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasUTM(id)},mostraCoordenadasGEO:function(id){try{i3GEO.coordenadas.mostraCoordenadasGEO.idhtml=i3GEO.gadgets.mostraCoordenadasGEO.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasGEO(id)},mostraInserirKml:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml}if($i(id)){if(!$i("i3geo_urlkml")){i=$inputText(id,"290","i3geo_urlkml","kml url","40","");ins="<table><tr><td>Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp,onde;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}onde=$i(id);if(onde){if(onde.style.display=="none"){onde.style.display="block"}if(!$i("i3geo_escalanum")){i="<form id='i3GEOescalanumForm' >"+$inputText(id,"100","i3geo_escalanum",$trad("d10"),"10",parseInt(i3GEO.parametros.mapscale,10))+"</form>";ins="<table><tr><td>"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";onde.innerHTML=ins;$i("i3GEOescalanumForm").onsubmit=function(){i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,document.getElementById("i3geo_escalanum").value);return false}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.atualizaEscalaNumerica()")}}},atualizaEscalaNumerica:function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.gadgets.atualizaEscalaNumerica()");return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}},mostraEscalaGrafica:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}var e,temp,ins;if($i(id)){atualizaEscalaGrafica=function(){e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}temp=function(retorno){eval(retorno.data);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){ins="<img class='menuarrow' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" title='opções' onclick='i3GEO.mapa.dialogo.opcoesEscala()' style='cursor:pointer'/><img id=imagemEscalaGrafica src='' />";$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){var i,ins,temp,fbusca;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}i3GEO.gadgets.mostraBuscaRapida.id=id;if($i(id)){i3geo_buscaRapida=function(){alert("i3geo_buscaRapida foi depreciada")};i="<form id=i3GEObotaoFormBuscaRapida"+id+" >"+$inputText(id,"256","valorBuscaRapida"+id,"Município, cidade, UC, endereço...","20",$trad("o2"))+"</form>";ins="<table><tr><td><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=8&idajuda=71' > </a></td><td>"+i+"</td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("p13")+"' class='ticPropriedades2' id=i3GEObotaoPropriedadesBuscaRapida"+id+" /></td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' id=i3GEObotaoBuscaRapida"+id+" /></td></tr></table>";temp=$i(id);if(temp){fbusca=function(){if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos===false&&i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa===false){alert("Escolha um tipo de busca nas propriedades");return}if($i("valorBuscaRapida"+id).value===""){alert("Digite uma palavra para busca!");return}i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida");return false};temp.innerHTML=ins;$i("i3GEObotaoBuscaRapida"+id).onclick=fbusca;$i("i3GEObotaoFormBuscaRapida"+id).onsubmit=fbusca;$i("i3GEObotaoPropriedadesBuscaRapida"+id).onclick=function(){var ins,interno="",externo="";i3GEO.janela.cria("300px","150px","","","","Propriedades","i3GEOpropriedadesBuscaRapida"+id);if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos){externo="checked"}if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa){interno="checked"}ins="<p class=paragrafo >Onde será feita a busca:</p>"+"<table class=lista3 >"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos = this.checked' type=checkbox "+externo+" ></td><td>Serviços de busca externos (Google e MMA)</td></tr>"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa = this.checked' type=checkbox "+interno+" ></td><td>Temas existentes no mapa</td></tr>"+"</table><br>"+"<p class=paragrafo >Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber operações de busca.</p>";$i("i3GEOpropriedadesBuscaRapida"+id+"_corpo").innerHTML=ins}}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins="<table style='text-align:center;position:relative;left:";if(navm){ins+="0px;'>"}else{ins+="6px;'>"}ins+="<tr><td><img id='i3geo_zoomanterior' class='zoomAnterior' title='anterior' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="<td> </td>";ins+="<td><img id='i3geo_zoomproximo' class='zoomProximo' title='proximo' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="</tr></table>";$i(id).innerHTML=ins}},visual:{inicia:function(id){alert("A i3GEO.gadgets.visual foi depreciado")},troca:function(visual){alert("A i3GEO.gadgets.visual foi depreciado")}},mostraMenuSuspenso:function(id){var objid,n,i,estilo,t,onMenuBarBeforeRender,temp,i3GEOoMenuBarLocal,ms=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso,confm=i3GEO.configura.oMenuData,ins="",alinhamento="";if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(!objid){return}if(objid&&objid.innerHTML===""){try{if(ms.permiteLogin===true||i3GEO.parametros.editor==="sim"){i3GEO.configura.oMenuData.menu.push({nome:"Admin",id:"i3GeoAdmin"});i3GEO.configura.oMenuData.submenus.i3GeoAdmin=[];if(ms.permiteLogin===true){i3GEO.configura.oMenuData.submenus.i3GeoAdmin.push({id:"omenudataAdminu1",text:"Login",url:"javascript:i3GEO.login.dialogo.abreLogin()"},{id:"omenudataAdminu2",text:"Logout",url:"javascript:i3GEO.login.dialogo.abreLogout()"});i3GEO.login.recarrega=true}if(i3GEO.login.verificaCookieLogin()){i3GEO.configura.oMenuData.submenus.i3GeoAdmin.push({id:"omenudataAdmin1",text:$trad("x1"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/admin/index.html')"},{id:"omenudataAdmin2",text:$trad("g1a"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/admin/html/arvore.html')"},{id:"omenudataAdmin3",text:$trad("x10"),url:"javascript:i3GEO.arvoreDeTemas.abrejanelaIframe('900','700','"+i3GEO.configura.locaplic+"/admin/html/menus.html\')"})}}}catch(e){}i3GEOoMenuBar=YAHOO.widget.MenuManager;if(objid){objid.className="yuimenubar";temp=$i("contemMenu");if(temp){temp.className="yui-navset"}if(ms.deslocaEsquerda){alinhamento="left:"+ms.deslocaEsquerda*-1+"px;"}if(!objid.style.height||parseInt(objid.style.height,10)===0){objid.style.height="21px"}else{if(!temp.style.height||parseInt(temp.style.height)===0){temp.style.height="21px"}}ins+='<div class="bd" style="top:0px;'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'+'<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';n=confm.menu.length;estilo="padding-bottom:3px;top:0px;border: 0px solid white;";for(i=0;i<n;i+=1){t="";if(confm.menu[i].target){t="target="+confm.menu[i].target}if(confm.submenus[confm.menu[i].id].length>0){ins+='<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+confm.menu[i].id+'" > '+confm.menu[i].nome+'</a></li>'}}ins+='</ul>';ins+='</div>';objid.innerHTML=ins;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI.iframe=true}i3GEOoMenuBarLocal=new YAHOO.widget.MenuBar(id,i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI);onMenuBarBeforeRender=function(p_sType,p_sArgs){var nomeMenu="",nomeSub,subs=i3GEO.configura.oMenuData.submenus,conta=0;for(nomeMenu in subs){if($i("menu"+nomeMenu)){nomeSub=subs[nomeMenu];if(nomeSub!==""){i3GEOoMenuBarLocal.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:nomeSub})}conta+=1}}};i3GEOoMenuBar.addMenu(i3GEOoMenuBarLocal);i3GEOoMenuBarLocal.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBarLocal.render()}}temp=["omenudataInterface1","omenudataInterface2","omenudataInterface3","omenudataInterface4","omenudataInterface5"];n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("checked",false)}}try{temp="";switch(i3GEO.Interface.ATUAL){case"openlayers":temp="omenudataInterface2";break;case"googlemaps":temp="omenudataInterface4";break;case"googleearth":temp="omenudataInterface5";break}if(temp!=""&&$i(temp)){i3GEOoMenuBar.getMenuItem(temp).cfg.setProperty("checked",true)}}catch(e){}temp=["omenudataFerramentas7b","omenudataArquivos3","omenudataJanelas1","omenudataJanelas3","omenudataFerramentas2a"];n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("disabled",false)}}try{temp=[];switch(i3GEO.Interface.ATUAL){case"openlayers":temp=["omenudataArquivos3","omenudataJanelas1"];break;case"googlemaps":temp=["omenudataArquivos3","omenudataJanelas1","omenudataJanelas3"];break;case"googleearth":temp=["omenudataFerramentas7b","omenudataArquivos3","omenudataJanelas3","omenudataFerramentas2a"];break};n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("disabled",true)}}}catch(e){}temp=objid.style;temp.backgroundPosition="0px -1px";temp.border="0px solid white";if(ms.finaliza&&ms.finaliza!=""){eval(ms.finaliza)}},mostraMenuLista:function(id){var objid,n,i,sub,nomeMenu="",ms=i3GEO.gadgets.PARAMETROS.mostraMenuLista,confm=i3GEO.configura.oMenuData,ins="",subs=i3GEO.configura.oMenuData.submenus;if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(objid){n=confm.menu.length;for(i=0;i<n;i+=1){ins+='<div class="listaMenuTitulo" id=menulista_'+confm.menu[i].id+'>'+confm.menu[i].nome+'</div>'}objid.innerHTML=ins;for(nomeMenu in subs){if($i("menulista_"+nomeMenu)){sub=subs[nomeMenu];n=sub.length;ins="";for(i=0;i<n;i++){ins+="<p class='listaMenuItem' ><a href='"+sub[i].url+"' target='_blank'>"+sub[i].text+"</a>"}$i("menulista_"+nomeMenu).innerHTML+=ins}}}}}; | |
375 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.social={curtirFacebook:function(url,tipo){if(tipo==="comtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&width=160&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:160px; height:21px;' allowTransparency='true'></iframe>"}if(tipo==="semtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>"}},publicarTwitter:function(url,tipo){var re=new RegExp("=","g");url=url.replace(re,'%3d');if(tipo==="comtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&via=i3geo&url='+url+'" style="width:100px; height:21px;"></iframe>'}if(tipo==="semtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=none&via=i3geo&url='+url+'" style="width:65px; height:21px;"></iframe>'}},compartilhar:function(id,urlcf,urlpt,tipo,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}if(!tipo){tipo="comtotal"}var onde=$i(id),tabela="";if(tipo==="comtotal"){tabela+="<table style='width:250px' ><tr>"}if(tipo==="semtotal"){tabela+="<table style='width:115px' ><tr>"}if(onde||id===""){if(urlpt!==""){tabela+="<td>"+i3GEO.social.publicarTwitter(urlpt,tipo)+"</td>"}if(urlcf!==""){tabela+="<td>"+i3GEO.social.curtirFacebook(urlcf,tipo)+"</td>"}tabela+="</tr></table>";if(id!==""){onde.innerHTML=tabela}return tabela}else{return false}},bookmark:function(link,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}var ins="<img style='cursor:pointer' src='"+locaplic+"/imagens/delicious.gif' onclick='javascript:window.open(\"http://del.icio.us/post?url="+link+"\")' title='Delicious'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/digg.gif' onclick='javascript:window.open(\"http://digg.com/submit/post?url="+link+"\")' title='Digg'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+link+"\")' title='Facebook'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/stumbleupon.gif' onclick='javascript:window.open(\"http://www.stumbleupon.com/submit?url="+link+"\")' title='StumbleUpon'/>";return ins}}; | |
376 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.login={divnomelogin:"i3GEONomeLogin",recarrega:false,funcaoLoginOk:null,funcaoLoginErro:null,dialogo:{abreLogin:function(locaplic){var js;if(!locaplic){locaplic=i3GEO.configura.locaplic}if(typeof(i3GEOF.loginusuario)==='undefined'){js=locaplic+"/ferramentas/loginusuario/index.js";i3GEO.util.scriptTag(js,"i3GEOF.loginusuario.criaJanelaFlutuante()","i3GEOF.loginusuario_script")}else{i3GEOF.loginusuario.criaJanelaFlutuante()}},abreLogout:function(){var r=confirm($trad("x26"));if(r==true){i3GEO.login.anulaCookie();i3GEO.janela.destroi("i3GEOF.loginusuario");if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML=""}if(i3GEO.login.recarrega==true){document.location.reload()}}}},anulaCookie:function(){i3GEO.util.insereCookie("i3geocodigologin","",1);i3GEO.util.insereCookie("i3geousuariologin","",1);i3GEO.util.insereCookie("i3geousuarionome","",1);i3GEO.util.insereCookie("i3GeoLogin","",1)},verificaCookieLogin:function(){var a=i3GEO.util.pegaCookie("i3geocodigologin"),b=i3GEO.util.pegaCookie("i3geocodigologin"),c=i3GEO.util.pegaCookie("i3geousuarionome");if(a&&b&&c&&a!=""&&b!=""&&c!=""){return true}else{return false}},verificaOperacao:function(operacao,locaplic,funcaoOk,tipo,funcaoErro){var p="",cp,temp,resultado=true;if(!i3GEO.login.verificaCookieLogin()){if(!funcaoErro){alert("Login!")}else{funcaoErro.call()}return false}if(!locaplic){locaplic=i3GEO.configura.locaplic}temp=function(retorno){if(retorno.data=="sim"){resultado=true}else{resultado=false}if(resultado===true){if(funcaoOk&&funcaoOk!=""){funcaoOk.call()}}else{if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML=""}if(funcaoErro&&funcaoErro!=""&&resultado===false){funcaoErro.call()}}return resultado};if(tipo==="sessao"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaosessao"}if(tipo==="banco"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaobanco"}cp=new cpaint();cp.set_response_type("JSON");cp.set_transfer_mode("POST");cp.call(p,"login",temp,"&operacao="+operacao)}}; | |
377 | 377 | /* |
378 | 378 | * euDock - javascript Emulation of Dock style MAC OS X bar |
379 | 379 | * | ... | ... |
classesjs/i3geo_tudo_compacto47.js.php
... | ... | @@ -346,34 +346,34 @@ version: 2.9.0 |
346 | 346 | (function(){var c=YAHOO.util.Dom,i=YAHOO.lang,B="yui-pb",D=B+"-mask",A=B+"-bar",z=B+"-anim",q=B+"-tl",l=B+"-tr",k=B+"-bl",g=B+"-br",h="width",w="height",m="minValue",y="maxValue",j="value",a="anim",x="direction",e="ltr",t="rtl",G="ttb",s="btt",f="barEl",d="maskEl",v="ariaTextTemplate",n="animAcceleration",p="background-position",o="px",C="start",F="progress",u="complete";var r=function(b){r.superclass.constructor.call(this,document.createElement("div"),b);this._init(b)};YAHOO.widget.ProgressBar=r;r.MARKUP=['<div class="',A,'"></div><div class="',D,'"><div class="',q,'"></div><div class="',l,'"></div><div class="',k,'"></div><div class="',g,'"></div></div>'].join("");i.extend(r,YAHOO.util.Element,{_init:function(b){},initAttributes:function(I){r.superclass.initAttributes.call(this,I);this.set("innerHTML",r.MARKUP);this.addClass(B);var H,b=["id",h,w,"class","style"];while((H=b.pop())){if(H in I){this.set(H,I[H])}}this.setAttributeConfig(f,{readOnly:true,value:this.getElementsByClassName(A)[0]});this.setAttributeConfig(d,{readOnly:true,value:this.getElementsByClassName(D)[0]});this.setAttributeConfig(x,{value:e,validator:function(J){if(this._rendered){return false}switch(J){case e:case t:case G:case s:return true;default:return false}}});this.setAttributeConfig(y,{value:100,validator:i.isNumber,method:function(J){this.get("element").setAttribute("aria-valuemax",J);if(this.get(j)>J){this.set(j,J)}}});this.setAttributeConfig(m,{value:0,validator:i.isNumber,method:function(J){this.get("element").setAttribute("aria-valuemin",J);if(this.get(j)<J){this.set(j,J)}}});this.setAttributeConfig(h,{getter:function(){return this.getStyle(h)},method:this._widthChange});this.setAttributeConfig(w,{getter:function(){return this.getStyle(w)},method:this._heightChange});this.setAttributeConfig(v,{value:"{value}"});this.setAttributeConfig(j,{value:0,validator:function(J){return i.isNumber(J)&&J>=this.get(m)&&J<=this.get(y)},method:this._valueChange});this.setAttributeConfig(a,{validator:function(J){return!!YAHOO.util.Anim},setter:this._animSetter});this.setAttributeConfig(n,{value:null,validator:function(J){return i.isNumber(J)||i.isNull(J)},method:function(J){this._fixAnim(this.get(a),J)}})},render:function(H,I){if(this._rendered){return}this._rendered=true;var J=this.get(x);this.addClass(B);this.addClass(B+"-"+J);var b=this.get("element");b.tabIndex=0;b.setAttribute("role","progressbar");b.setAttribute("aria-valuemin",this.get(m));b.setAttribute("aria-valuemax",this.get(y));this.appendTo(H,I);this.redraw(false);this._previousValue=this.get(j);this._fixEdges();this.on("minValueChange",this.redraw);this.on("maxValueChange",this.redraw);return this},redraw:function(b){this._recalculateConstants();this._valueChange(this.get(j),b)},destroy:function(){this.set(a,false);this.unsubscribeAll();var b=this.get("element");if(b.parentNode){b.parentNode.removeChild(b)}},_previousValue:0,_barSpace:100,_barFactor:1,_rendered:false,_heightChange:function(b){if(i.isNumber(b)){b+=o}this.setStyle(w,b);this._fixEdges();this.redraw(false)},_widthChange:function(b){if(i.isNumber(b)){b+=o}this.setStyle(h,b);this._fixEdges();this.redraw(false)},_fixEdges:function(){if(!this._rendered||YAHOO.env.ua.ie||YAHOO.env.ua.gecko){return}var J=this.get(d),L=c.getElementsByClassName(q,undefined,J)[0],I=c.getElementsByClassName(l,undefined,J)[0],K=c.getElementsByClassName(k,undefined,J)[0],H=c.getElementsByClassName(g,undefined,J)[0],b=(parseInt(c.getStyle(J,w),10)-parseInt(c.getStyle(L,w),10))+o;c.setStyle(K,w,b);c.setStyle(H,w,b);b=(parseInt(c.getStyle(J,h),10)-parseInt(c.getStyle(L,h),10))+o;c.setStyle(I,h,b);c.setStyle(H,h,b)},_recalculateConstants:function(){var b=this.get(f);switch(this.get(x)){case e:case t:this._barSpace=parseInt(this.get(h),10)-(parseInt(c.getStyle(b,"marginLeft"),10)||0)-(parseInt(c.getStyle(b,"marginRight"),10)||0);break;case G:case s:this._barSpace=parseInt(this.get(w),10)-(parseInt(c.getStyle(b,"marginTop"),10)||0)-(parseInt(c.getStyle(b,"marginBottom"),10)||0);break}this._barFactor=this._barSpace/(this.get(y)-(this.get(m)||0))||1},_animSetter:function(I){var H,b=this.get(f);if(I){if(I instanceof YAHOO.util.Anim){H=I}else{H=new YAHOO.util.Anim(b)}H.onTween.subscribe(this._animOnTween,this,true);H.onComplete.subscribe(this._animComplete,this,true);this._fixAnim(H,this.get(n))}else{H=this.get(a);if(H){H.onTween.unsubscribeAll();H.onComplete.unsubscribeAll()}H=null}return H},_fixAnim:function(I,H){if(I){if(!this._oldSetAttribute){this._oldSetAttribute=I.setAttribute}var b=this;switch(this.get(x)){case e:I.setAttribute=function(J,L,K){L=Math.round(L);b._oldSetAttribute.call(this,J,L,K);if(J==h){b._oldSetAttribute.call(this,p,-L*H,o)}};break;case t:I.setAttribute=function(J,M,K){M=Math.round(M);b._oldSetAttribute.call(this,J,M,K);if(J==h){var L=b._barSpace-M;b._oldSetAttribute.call(this,"left",L,o);b._oldSetAttribute.call(this,p,-L+M*H,o)}};break;case G:I.setAttribute=function(J,L,K){L=Math.round(L);b._oldSetAttribute.call(this,J,L,K);if(J==w){b._oldSetAttribute.call(this,p,"center "+(-L*H),o)}};break;case s:I.setAttribute=function(J,M,K){M=Math.round(M);b._oldSetAttribute.call(this,J,M,K);if(J==w){var L=b._barSpace-M;b._oldSetAttribute.call(this,"top",L,o);b._oldSetAttribute.call(this,p,"center "+(M*H-L),o)}};break}}},_animComplete:function(){var b=this.get(j);this._previousValue=b;this.fireEvent(F,b);this.fireEvent(u,b);c.removeClass(this.get(f),z)},_animOnTween:function(b,H){var I=Math.floor(this._tweenFactor*H[0].currentFrame+this._previousValue);this.fireEvent(F,I)},_valueChange:function(J,H){var I=this.get(a),b=Math.floor((J-this.get(m))*this._barFactor);this._setAriaText(J);if(this._rendered){if(I){I.stop();if(I.isAnimated()){I._onComplete.fire()}}this.fireEvent(C,this._previousValue);r._barSizeFunctions[((H!==false)&&I)?1:0][this.get(x)].call(this,J,b,this.get(f),I)}},_setAriaText:function(H){var b=this.get("element"),I=i.substitute(this.get(v),{value:H,minValue:this.get(m),maxValue:this.get(y)});b.setAttribute("aria-valuenow",H);b.setAttribute("aria-valuetext",I)}});var E=[{},{}];r._barSizeFunctions=E;E[0][e]=function(J,b,H,I){c.setStyle(H,h,b+o);this.fireEvent(F,J);this.fireEvent(u,J)};E[0][t]=function(J,b,H,I){c.setStyle(H,h,b+o);c.setStyle(H,"left",(this._barSpace-b)+o);this.fireEvent(F,J);this.fireEvent(u,J)};E[0][G]=function(J,b,H,I){c.setStyle(H,w,b+o);this.fireEvent(F,J);this.fireEvent(u,J)};E[0][s]=function(J,b,H,I){c.setStyle(H,w,b+o);c.setStyle(H,"top",(this._barSpace-b)+o);this.fireEvent(F,J);this.fireEvent(u,J)};E[1][e]=function(J,b,H,I){c.addClass(H,z);this._tweenFactor=(J-this._previousValue)/I.totalFrames/I.duration;I.attributes={width:{to:b}};I.animate()};E[1][t]=E[1][e];E[1][G]=function(J,b,H,I){c.addClass(H,z);this._tweenFactor=(J-this._previousValue)/I.totalFrames/I.duration;I.attributes={height:{to:b}};I.animate()};E[1][s]=E[1][G]})();YAHOO.register("progressbar",YAHOO.widget.ProgressBar,{version:"2.9.0",build:"2800"}); |
347 | 347 | BalloonConfig=function(balloon,set){set=set||'';if(!balloon.configured||set=='GBubble'||set=='GBox'){balloon.fontColor='black';balloon.fontFamily='Arial, sans-serif';balloon.fontSize='12pt';balloon.minWidth=100;balloon.maxWidth=400;balloon.delayTime=750;balloon.vOffset=10;balloon.hOffset=10;balloon.stem=true;balloon.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubble';balloon.ieImage='balloon_ie.png';balloon.balloonImage='balloon.png';balloon.upLeftStem='up_left.png';balloon.downLeftStem='down_left.png';balloon.upRightStem='up_right.png';balloon.downRightStem='down_right.png';balloon.closeButton='close.png';balloon.closeButtonWidth=16;balloon.allowAJAX=true;balloon.allowIframes=true;balloon.trackCursor=true;balloon.shadow=20;balloon.padding=10;balloon.stemHeight=32;balloon.stemOverlap=3;balloon.vOffset=1;balloon.hOffset=1;balloon.opacity=0.9;balloon.configured=set||true}switch(set){case('GBoxxxx'):balloon.bgColor='whitesmoke';balloon.borderStyle='2px solid gray';balloon.padding=5;balloon.shadow=0;balloon.stem=true;balloon.opacity=0.8;balloon.hOffset=1;balloon.vOffset=1;balloon.allowFade=false;break;case('GPlain'):balloon.padding=5;balloon.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GPlain';balloon.ieImage=null;balloon.shadow=0;balloon.stemHeight=15;balloon.stemOverlap=1;balloon.opacity=0.85;break;case('GFade'):balloon.allowFade=true;balloon.fadeIn=1000;balloon.faedOut=200;break}}; |
348 | 348 | var currentBalloonClass;var balloonIsVisible;var balloonIsSticky;var balloonInvisibleSelects;var balloonIsSuppressed;var tooltipIsSuppressed;var Balloon=function(){this.trackCursor=true;var myObject=this.isIE()?window:document;myObject.onscroll=function(){Balloon.prototype.nukeTooltip()};window.onbeforeunload=function(){Balloon.prototype.nukeTooltip();balloonIsSuppressed=true};if(this.isIE()){this.suppress=true}return this};Balloon.prototype.showTooltip=function(evt,caption,sticky,width,height,x,y){if(!this.configured){BalloonConfig(this,'GBubble')}this.stopTrackingX=this.trackCursor?100:10;this.stopTrackingY=this.trackCursor?50:10;if(this.isIE()&&document.readyState.match(/complete/i)){this.suppress=false}if(this.suppress||balloonIsSuppressed){return false}if(tooltipIsSuppressed&&!sticky){return false}if(this.opacity&&this.opacity<1){this.opacity=parseInt(parseFloat(this.opacity)*100)}else if(this.opacity&&this.opacity==1){this.opacity=100}else if(!this.opacity){this.opacity==100}if(this.isKonqueror()){this.allowFade=false;this.opacity=100}if(this.isIE()&&this.allowFade){this.opacity=100}var mouseOver=true;try{var mouseOver=evt.type.match('mouseover','i')}catch(e){}if(!mouseOver){sticky=true;this.fadeOK=false;if(balloonIsVisible){this.hideTooltip()}}else{this.fadeOK=this.allowFade}if(balloonIsVisible&&!balloonIsSticky&&mouseOver){return false}if(balloonIsVisible&&balloonIsSticky&&!sticky){return false}try{var el=this.getEventTarget(evt)}catch(e){var el=evt}if(sticky&&mouseOver&&this.isSameElement(el,this.currentElement)){return false}this.currentElement=el;this.elCoords=this.getLoc(el,'region');if(!sticky){var mouseoutFunc=el.onmouseout;var closeBalloon=function(){Balloon.prototype.hideTooltip();if(mouseoutFunc){mouseoutFunc()}};if(!mouseOver){el.onmouseup=function(){return false}}}balloonIsSticky=sticky;this.hideTooltip();this.currentHelpText=this.getAndCheckContents(caption);if(!this.currentHelpText){return false}this.width=width+"px";this.height=height+"px";this.actualWidth=null;this.x=x;this.y=y;this.hideTooltip();this.container=document.createElement('div');this.container.id='balloonPreloadContainer';document.body.appendChild(this.container);this.setStyle(this.container,'position','absolute');this.setStyle(this.container,'top',-8888);this.setStyle(this.container,'font-family',this.fontFamily);this.setStyle(this.container,'font-size',this.fontSize);this.currentHelpText=this.currentHelpText.replace(/\&/g,'&amp');this.container.innerHTML=unescape(this.currentHelpText);if(this.images){this.balloonImage=this.balloonImage?this.images+'/'+this.balloonImage:false;this.ieImage=this.ieImage?this.images+'/'+this.ieImage:false;this.upLeftStem=this.upLeftStem?this.images+'/'+this.upLeftStem:false;this.upRightStem=this.upRightStem?this.images+'/'+this.upRightStem:false;this.downLeftStem=this.downLeftStem?this.images+'/'+this.downLeftStem:false;this.downRightStem=this.downRightStem?this.images+'/'+this.downRightStem:false;this.closeButton=this.closeButton?this.images+'/'+this.closeButton:false;this.images=false}if(this.ieImage&&(this.isIE()||this.isChrome())){if(this.isOldIE()||this.opacity||this.allowFade){this.balloonImage=this.ieImage}}if(!this.preloadedImages){var images=[this.balloonImage,this.closeButton];if(this.ieImage){images.push(this.ieImage)}if(this.stem){images.push(this.upLeftStem,this.upRightStem,this.downLeftStem,this.downRightStem)}var len=images.length;for(var i=0;i<len;i++){if(images[i]){this.preload(images[i])}}this.preloadedImages=true}currentBalloonClass=this;if(!mouseOver)el.onmouseup=function(){return false};this.currentEvent=evt;evt.cancelBubble=true;this.setActiveCoordinates([]);this.doShowTooltip();this.pending=true};Balloon.prototype.preload=function(src){var i=new Image;i.src=src;this.setStyle(i,'position','absolute');this.setStyle(i,'top',-8000);document.body.appendChild(i);document.body.removeChild(i)};Balloon.prototype.doShowTooltip=function(){var self=currentBalloonClass;if(balloonIsVisible){return false}if(!self.parent){if(self.parentID){self.parent=document.getElementById(self.parentID)}else{self.parent=document.body}self.xOffset=self.getLoc(self.parent,'x1');self.yOffset=self.getLoc(self.parent,'y1')}window.clearTimeout(self.timeoutFade);if(!balloonIsSticky){self.setStyle('visibleBalloonElement','display','none')}self.parseIntAll();var balloon=self.makeBalloon();var pageWidth=YAHOO.util.Dom.getViewportWidth();var pageCen=Math.round(pageWidth/2);var pageHeight=YAHOO.util.Dom.getViewportHeight();var pageLeft=YAHOO.util.Dom.getDocumentScrollLeft();var pageTop=YAHOO.util.Dom.getDocumentScrollTop();var pageMid=pageTop+Math.round(pageHeight/2);self.pageBottom=pageTop+pageHeight;self.pageTop=pageTop;self.pageLeft=pageLeft;self.pageRight=pageLeft+pageWidth;var vOrient=self.activeTop>pageMid?'up':'down';var hOrient=self.activeRight>pageCen?'left':'right';var helpText=self.container.innerHTML;self.actualWidth=self.getLoc(self.container,'width');if(!isNaN(self.actualWidth)){self.actualWidth+=10}self.parent.removeChild(self.container);var wrapper=document.createElement('div');wrapper.id='contentWrapper';self.contents.appendChild(wrapper);wrapper.innerHTML=helpText;self.setBalloonStyle(vOrient,hOrient,pageWidth,pageLeft);if(balloonIsSticky){self.addCloseButton()}balloonIsVisible=true;self.pending=false;self.showHide();self.startX=self.activeLeft;self.startY=self.activeTop;self.fade(0,self.opacity,self.fadeIn)};Balloon.prototype.addCloseButton=function(){var self=currentBalloonClass;var margin=Math.round(self.padding/2);var closeWidth=self.closeButtonWidth||16;var balloonTop=self.getLoc('visibleBalloonElement','y1')+margin+self.shadow;var BalloonLeft=self.getLoc('topRight','x2')-self.closeButtonWidth-self.shadow-margin;var closeButton=document.getElementById('closeButton');if(!closeButton){closeButton=new Image;closeButton.setAttribute('id','closeButton');closeButton.setAttribute('src',self.closeButton);closeButton.onclick=function(){Balloon.prototype.nukeTooltip();var temp=$i('marcaIdentifica');if(temp){temp.parentNode.removeChild(temp)}};self.setStyle(closeButton,'position','absolute');document.body.appendChild(closeButton)}if(self.isIE()){BalloonLeft=BalloonLeft-5}self.setStyle(closeButton,'top',balloonTop);self.setStyle(closeButton,'left',BalloonLeft);self.setStyle(closeButton,'display','inline');self.setStyle(closeButton,'cursor','pointer');self.setStyle(closeButton,'z-index',999999999)};Balloon.prototype.makeBalloon=function(){var self=currentBalloonClass;var balloon=document.getElementById('visibleBalloonElement');if(balloon){self.hideTooltip()}balloon=document.createElement('div');balloon.setAttribute('id','visibleBalloonElement');self.parent.appendChild(balloon);self.activeBalloon=balloon;self.parts=new Array();var parts=new Array('contents','topRight','bottomRight','bottomLeft');for(var i=0;i<parts.length;i++){var child=document.createElement('div');child.setAttribute('id',parts[i]);balloon.appendChild(child);if(parts[i]=='contents')self.contents=child;self.parts.push(child)}if(self.displayTime){self.timeoutAutoClose=window.setTimeout(this.hideTooltip,self.displayTime)}return balloon};Balloon.prototype.setBalloonStyle=function(vOrient,hOrient,pageWidth,pageLeft){var self=currentBalloonClass;var balloon=self.activeBalloon;if(typeof(self.shadow)!='number')self.shadow=0;if(!self.stem)self.stemHeight=0;var fullPadding=self.padding+self.shadow;var insidePadding=self.padding;var outerWidth=self.actualWidth+fullPadding;var innerWidth=self.actualWidth;self.setStyle(balloon,'position','absolute');self.setStyle(balloon,'top',-9999);self.setStyle(balloon,'z-index',1000000);if(self.height){self.setStyle('contentWrapper','height',self.height-fullPadding)}if(self.width){self.setStyle(balloon,'width',self.width);innerWidth=self.width-fullPadding;if(balloonIsSticky){innerWidth-=self.closeButtonWidth}self.setStyle('contentWrapper','width',innerWidth)}else{self.setStyle(balloon,'width',outerWidth);self.setStyle('contentWrapper','width',innerWidth)}if(!self.width&&self.maxWidth&&outerWidth>self.maxWidth){self.setStyle(balloon,'width',self.maxWidth);self.setStyle('contentWrapper','width',self.maxWidth-fullPadding)}if(!self.width&&self.minWidth&&outerWidth<self.minWidth){self.setStyle(balloon,'width',self.minWidth);self.setStyle('contentWrapper','width',self.minWidth-fullPadding)}self.setStyle('contents','z-index',2);self.setStyle('contents','color',self.fontColor);self.setStyle('contents','font-family',self.fontFamily);self.setStyle('contents','font-size',self.fontSize);self.setStyle('contents','background','url('+self.balloonImage+') top left no-repeat');self.setStyle('contents','padding-top',fullPadding);self.setStyle('contents','padding-left',fullPadding);self.setStyle('bottomRight','background','url('+self.balloonImage+') bottom right no-repeat');self.setStyle('bottomRight','position','absolute');self.setStyle('bottomRight','right',0-fullPadding);self.setStyle('bottomRight','bottom',0-fullPadding);self.setStyle('bottomRight','height',fullPadding);self.setStyle('bottomRight','width',fullPadding);self.setStyle('bottomRight','z-index',-1);self.setStyle('topRight','background','url('+self.balloonImage+') top right no-repeat');self.setStyle('topRight','position','absolute');self.setStyle('topRight','right',0-fullPadding);self.setStyle('topRight','top',0);self.setStyle('topRight','width',fullPadding);self.setStyle('bottomLeft','background','url('+self.balloonImage+') bottom left no-repeat');self.setStyle('bottomLeft','position','absolute');self.setStyle('bottomLeft','left',0);self.setStyle('bottomLeft','bottom',0-fullPadding);self.setStyle('bottomLeft','height',fullPadding);self.setStyle('bottomLeft','z-index',-1);if(this.stem){var stem=document.createElement('img');stem.style.zIndex=50000;self.setStyle(stem,'position','absolute');balloon.appendChild(stem);if(vOrient=='up'&&hOrient=='left'){stem.src=self.upLeftStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='down'&&hOrient=='left'){stem.src=self.downLeftStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'right',0)}else if(vOrient=='up'&&hOrient=='right'){stem.src=self.upRightStem;var height=self.stemHeight+insidePadding-self.stemOverlap;self.setStyle(stem,'bottom',0-height);self.setStyle(stem,'left',self.shadow)}else if(vOrient=='down'&&hOrient=='right'){stem.src=self.downRightStem;var height=self.stemHeight-(self.shadow+self.stemOverlap);self.setStyle(stem,'top',0-height);self.setStyle(stem,'left',self.shadow)}if(self.fadeOK&&self.isIE()){self.parts.push(stem)}}if(self.allowFade){self.setOpacity(1)}else if(self.opacity){self.setOpacity(self.opacity)}if(hOrient=='left'){var pageWidth=self.pageRight-self.pageLeft;var activeRight=pageWidth-self.activeLeft;self.setStyle(balloon,'right',activeRight)}else{var activeLeft=self.activeRight-self.xOffset;self.setStyle(balloon,'left',activeLeft)}var overflow=balloonIsSticky?'auto':'hidden';self.setStyle('contentWrapper','overflow',overflow);if(balloonIsSticky){self.setStyle('contentWrapper','margin-right',self.closeButtonWidth)}var balloonLeft=self.getLoc(balloon,'x1');var balloonRight=self.getLoc(balloon,'x2');var scrollBar=20;if(hOrient=='right'&&balloonRight>(self.pageRight-fullPadding)){var width=(self.pageRight-balloonLeft)-fullPadding-scrollBar;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}else if(hOrient=='left'&&balloonLeft<(self.pageLeft+fullPadding)){var width=(balloonRight-self.pageLeft)-fullPadding;self.setStyle(balloon,'width',width);self.setStyle('contentWrapper','width',width-fullPadding)}var balloonWidth=self.getLoc(balloon,'width');var balloonHeight=self.getLoc(balloon,'height');var vOverlap=self.isOverlap('topRight','bottomRight');var hOverlap=self.isOverlap('bottomLeft','bottomRight');if(vOverlap){self.setStyle('topRight','height',balloonHeight-vOverlap[1])}if(hOverlap){self.setStyle('bottomLeft','width',balloonWidth-hOverlap[0])}if(vOrient=='up'){var activeTop=self.activeTop-balloonHeight;self.setStyle(balloon,'top',activeTop)}else{var activeTop=self.activeBottom;self.setStyle(balloon,'top',activeTop)}var balloonTop=self.getLoc(balloon,'y1');var balloonBottom=self.height?balloonTop+self.height:self.getLoc(balloon,'y2');var deltaTop=balloonTop<self.pageTop?self.pageTop-balloonTop:0;var deltaBottom=balloonBottom>self.pageBottom?balloonBottom-self.pageBottom:0;if(vOrient=='up'&&deltaTop){var newHeight=balloonHeight-deltaTop;if(newHeight>(self.padding*2)){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'top',self.pageTop+self.padding);self.setStyle(balloon,'height',newHeight)}}if(vOrient=='down'&&deltaBottom){var newHeight=balloonHeight-deltaBottom-scrollBar;if(newHeight>(self.padding*2)+scrollBar){self.setStyle('contentWrapper','height',newHeight-fullPadding);self.setStyle(balloon,'height',newHeight)}}var iframe=balloon.getElementsByTagName('iframe');if(iframe[0]){iframe=iframe[0];var w=self.getLoc('contentWrapper','width');if(balloonIsSticky&&!this.isIE()){w-=self.closeButtonWidth}var h=self.getLoc('contentWrapper','height');self.setStyle(iframe,'width',w);self.setStyle(iframe,'height',h);self.setStyle('contentWrapper','overflow','hidden')}self.setStyle('topRight','height',self.getLoc(balloon,'height'));self.setStyle('bottomLeft','width',self.getLoc(balloon,'width'));self.hOrient=hOrient;self.vOrient=vOrient};Balloon.prototype.fade=function(opacStart,opacEnd,millisec){var self=currentBalloonClass||new Balloon;if(!millisec||!self.allowFade){return false}opacEnd=opacEnd||100;var speed=Math.round(millisec/100);var timer=0;for(o=opacStart;o<=opacEnd;o++){self.timeoutFade=setTimeout('Balloon.prototype.setOpacity('+o+')',(timer*speed));timer++}};Balloon.prototype.setOpacity=function(opc){var self=currentBalloonClass;if(!self||!opc)return false;var o=parseFloat(opc/100);var parts=self.isIE()?self.parts:[self.activeBalloon];var len=parts.length;for(var i=0;i<len;i++){self.doOpacity(o,opc,parts[i])}};Balloon.prototype.doOpacity=function(op,opc,el){var self=currentBalloonClass;if(!el)return false;self.setStyle(el,'opacity',op);self.setStyle(el,'filter','alpha(opacity='+opc+')');self.setStyle(el,'MozOpacity',op);self.setStyle(el,'KhtmlOpacity',op)};Balloon.prototype.nukeTooltip=function(){this.hideTooltip(1)};Balloon.prototype.hideTooltip=function(override){if(override&&typeof override=='object')override=false;if(balloonIsSticky&&!override)return false;var self=currentBalloonClass;Balloon.prototype.showHide(1);Balloon.prototype.cleanup();if(self){window.clearTimeout(self.timeoutTooltip);window.clearTimeout(self.timeoutFade);window.clearTimeout(self.timeoutAutoClose);if(balloonIsSticky){self.currentElement=null}self.startX=0;self.startY=0}balloonIsVisible=false;balloonIsSticky=false};Balloon.prototype.cleanup=function(){var self=currentBalloonClass;var body;if(self){body=self.parent?self.parent:self.parentID?document.getElementById(self.parentID)||document.body:document.body}else{body=document.body}var bubble=document.getElementById('visibleBalloonElement');var close=document.getElementById('closeButton');var cont=document.getElementById('balloonPreloadContainer');if(bubble){body.removeChild(bubble)}if(close){body.removeChild(close)}if(cont){body.removeChild(cont)}};hideAllTooltips=function(){var self=currentBalloonClass;if(!self)return;window.clearTimeout(self.timeoutTooltip);if(self.activeBalloon)self.setStyle(self.activeBalloon,'display','none');balloonIsVisible=false;balloonIsSticky=false;currentBalloonClass=null};Balloon.prototype.setActiveCoordinates=function(evt){var self=currentBalloonClass;if(!self){return true}var evt=evt||window.event||self.currentEvent;if(!evt){return true}self.currentEvent={};for(var i in evt){self.currentEvent[i]=evt[i]}self.hOffset=self.hOffset||1;self.vOffset=self.vOffset||1;self.stemHeight=self.stem&&self.stemHeight?(self.stemHeight||0):0;var scrollTop=0;var scrollLeft=0;var XY=[self.x,self.y];var adjustment=self.hOffset<20?10:0;self.activeTop=scrollTop+XY[1]-adjustment-self.vOffset-self.stemHeight;self.activeLeft=scrollLeft+XY[0]-adjustment-self.hOffset;self.activeRight=scrollLeft+XY[0];self.activeBottom=scrollTop+XY[1]+self.vOffset+2*adjustment;if(balloonIsVisible&&!balloonIsSticky){var deltaX=Math.abs(self.activeLeft-self.startX);var deltaY=Math.abs(self.activeTop-self.startY);if(XY[0]<self.elCoords.left||XY[0]>self.elCoords.right||XY[1]<self.elCoords.top||XY[1]>self.elCoords.bottom){}if(deltaX>self.stopTrackingX||deltaY>self.stopTrackingY){}else if(self.trackCursor){var b=self.activeBalloon;var bwidth=self.getLoc(b,'width');var bheight=self.getLoc(b,'height');var btop=self.getLoc(b,'y1');var bleft=self.getLoc(b,'x1');if(self.hOrient=='right'){self.setStyle(b,'left',self.activeRight)}else if(self.hOrient=='left'){self.setStyle(b,'right',null);var newLeft=self.activeLeft-bwidth;self.setStyle(b,'left',newLeft)}if(self.vOrient=='up'){self.setStyle(b,'top',self.activeTop-bheight)}else if(self.vOrient=='down'){self.setStyle(b,'top',self.activeBottom)}}}return true};Balloon.prototype.eventXY=function(event){var XY=new Array(2);var e=event||window.event;if(!e){return false}if(e.pageX||e.pageY){XY[0]=e.pageX;XY[1]=e.pageY;return XY}else if(e.clientX||e.clientY){XY[0]=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;XY[1]=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;return XY}};Balloon.prototype.getEventTarget=function(event){var targ;var e=event||window.event;if(e.target)targ=e.target;else if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)targ=targ.parentNode;return targ};Balloon.prototype.setStyle=function(el,att,val){if(!el){return false}if(typeof(el)!='object'){el=document.getElementById(el)}if(!el){return false}var v=val;if(val&&att.match(/left|top|bottom|right|width|height|padding|margin/)){val=new String(val);if(!val.match(/auto/)){val+='px'}}if(att=='z-index'){if(el.style){el.style.zIndex=parseInt(val)}}else{if(this.isIE()&&att.match(/^left|right|top|bottom$/)&&!parseInt(val)&&val!=0){val=null}YAHOO.util.Dom.setStyle(el,att,val)}};Balloon.prototype.getLoc=function(el,request){var region=YAHOO.util.Dom.getRegion(el);switch(request){case('y1'):return parseInt(region.top);case('y2'):return parseInt(region.bottom);case('x1'):return parseInt(region.left);case('x2'):return parseInt(region.right);case('width'):return(parseInt(region.right)-parseInt(region.left));case('height'):return(parseInt(region.bottom)-parseInt(region.top));case('region'):return region}return region};Balloon.prototype.parseIntAll=function(){this.padding=parseInt(this.padding);this.shadow=parseInt(this.shadow);this.stemHeight=parseInt(this.stemHeight);this.stemOverlap=parseInt(this.stemOverlap);this.vOffset=parseInt(this.vOffset);this.delayTime=parseInt(this.delayTime);this.width=parseInt(this.width);this.maxWidth=parseInt(this.maxWidth);this.minWidth=parseInt(this.minWidth);this.fadeIn=parseInt(this.fadeIn)||1000};Balloon.prototype.showHide=function(visible){var self=currentBalloonClass||new Balloon;if(self.isOldIE()){var balloonContents=document.getElementById('contentWrapper');if(!visible&&balloonContents){var balloonSelects=balloonContents.getElementsByTagName('select');var myHash=new Object();for(var i=0;i<balloonSelects.length;i++){var id=balloonSelects[i].id||balloonSelects[i].name;myHash[id]=1}balloonInvisibleSelects=new Array();var allSelects=document.getElementsByTagName('select');for(var i=0;i<allSelects.length;i++){var id=allSelects[i].id||allSelects[i].name;if(self.isOverlap(allSelects[i],self.activeBalloon)&&!myHash[id]){balloonInvisibleSelects.push(allSelects[i]);self.setStyle(allSelects[i],'visibility','hidden')}}}else if(balloonInvisibleSelects){for(var i=0;i<balloonInvisibleSelects.length;i++){var id=balloonInvisibleSelects[i].id||balloonInvisibleSelects[i].name;self.setStyle(balloonInvisibleSelects[i],'visibility','visible')}balloonInvisibleSelects=null}}if(self.hide){var display=visible?'inline':'none';for(var n=0;n<self.hide.length;n++){if(self.isOverlap(self.activeBalloon,self.hide[n])){self.setStyle(self.hide[n],'display',display)}}}};Balloon.prototype.isOverlap=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');if(!R1||!R2)return false;var intersect=R1.intersect(R2);if(intersect){intersect=new Array((intersect.right-intersect.left),(intersect.bottom-intersect.top))}return intersect};Balloon.prototype.isSameElement=function(el1,el2){if(!el1||!el2)return false;var R1=this.getLoc(el1,'region');var R2=this.getLoc(el2,'region');var same=R1.contains(R2)&&R2.contains(R1);return same?true:false};Balloon.prototype.getAndCheckContents=function(caption){this.currentHelpText=this.getContents(caption);this.loadedFromElement=false;return this.currentHelpText};Balloon.prototype.getContents=function(section){if(!this.helpUrl&&!this.activeUrl)return section;if(this.loadedFromElement)return section;var url=this.activeUrl||this.helpUrl;url+=this.activeUrl?'':'?section='+section;this.activeUrl=null;var ajax;if(window.XMLHttpRequest){ajax=new XMLHttpRequest()}else{ajax=new ActiveXObject("Microsoft.XMLHTTP")}if(ajax){ajax.open("GET",url,false);ajax.onreadystatechange=function(){};try{ajax.send(null)}catch(e){}var txt=this.escapeHTML?escape(ajax.responseText):ajax.responseText;return txt||section}else{return section}};Balloon.prototype.isIE=function(){return document.all&&!window.opera};Balloon.prototype.isOldIE=function(){if(navigator.appVersion.indexOf("MSIE")==-1)return false;var temp=navigator.appVersion.split("MSIE");return parseFloat(temp[1])<7};Balloon.prototype.isKonqueror=function(){return navigator.userAgent.toLowerCase().indexOf('konqueror')!=-1};Balloon.prototype.isChrome=function(){return navigator.userAgent.toLowerCase().indexOf('chrome')>-1}; |
349 | -i3GEOF=[];YAHOO.namespace("i3GEO");i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",tamanhodoc:[],temaAtivo:"",contadorAtualiza:0,cria:function(){if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}var temp,tamanho;temp=window.location.href.split("?");if(temp[1]){i3GEO.configura.sid=temp[1];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}if(i3GEO.Interface.ALTTABLET!=""){if(i3GEO.util.detectaTablet()){return}}if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])},inicia:function(retorno){var montaMapa,mashup,tamanho;if(typeof("i3GEOmantemCompatibilidade")==='function'){i3GEOmantemCompatibilidade()}montaMapa=function(retorno){try{var temp,abreJM;if(retorno===""){alert("Ocorreu um erro no mapa - montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;if(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width,10)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}i3GEO.Interface.inicia()}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if($i("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}abreJM="sim";if(i3GEO.util.pegaCookie("botoesAjuda")){abreJM=i3GEO.util.pegaCookie("botoesAjuda");i3GEO.barraDeBotoes.AJUDA=(abreJM==="sim")?true:false}if(i3GEO.configura.iniciaJanelaMensagens===true){i3GEO.ajuda.abreJanela()}if(i3GEO.configura.liberaGuias.toLowerCase()==="sim"){i3GEO.guias.libera()}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if(i3GEO.configura.sid===""){mashup=function(retorno){i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}if(i3GEO.mapa.AUTORESIZE===true){i3GEO.mapa.ativaAutoResize()}},aposIniciar:function(){if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.inicia()}},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(retorno===""){corpoMapa.call();return}if(!retorno.data){alert(retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.Interface.redesenha();if($i("i3GEOidentificalistaTemas")){g_tipoacao="identifica";g_operacao='identifica'}else{g_operacao=""}if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+retorno.data.variaveis.tempo,"");temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[YAHOO.util.Dom.getViewportWidth(),YAHOO.util.Dom.getViewportHeight()];Dw=YAHOO.util.Dom.getDocumentWidth();Dh=YAHOO.util.Dom.getDocumentHeight();novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i("mst");if(temp){temp.style.width="100%"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;i3GEO.php.mudatamanho(i3GEO.atualiza,h,w);switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();break}if(i3GEO.guias.TIPO==="sanfona"){i3GEO.guias.ALTURACORPOGUIAS=h-(antigoh-i3GEO.guias.ALTURACORPOGUIAS)}else{i3GEO.guias.ALTURACORPOGUIAS=h}return[w,h]},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}}; | |
350 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/á|à |ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/Ã/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<input onchange=\""+onch+"\" tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.ResizePanel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas,n,nome="";if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td> <input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value=' ' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value=' ' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento,nx="",texto="Cor",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.ResizePanel(id,{height:"480px",modal:false,width:"380px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versao adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)}; | |
351 | -g_traducao={"p1":[{pt:"O i3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre. <a href='http://mapas.mma.gov.br/download' target=blank > Download</a>",it:"I3geo é un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Subtítulo",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tamaño",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable surrounding",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable logo",es:"Activar/desactivar logomarca",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da seleção",en:"Selection color",es:"Color de la selección",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color del fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Grado de coordenadas",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Template",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprieta"}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Image map format",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Base layers",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Subtitulo",it:"Attiva legenda"}],"p18":[{pt:"Não imprime a legenda",en:"Disable legend",es:"Desactivar Subtitulo",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",en:"Enables or disables the legend of a theme in the print option on the map",es:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",it:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa"}],"p20":[{pt:"Tela remota",en:"Remote screen",es:"Tela remota",it:"Tela remota"}],"p21":[{pt:"Animação",en:"Animation",es:"Animación",it:"Animation"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"Análise",en:"Analysis",es:"Análisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprieta"}],"u1":[{pt:"Sobre o i3Geo",en:"About i3Geo",es:"Sobre i3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos códigos",en:"Doc. of the codes",es:"Doc. de los códigos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u4a":[{pt:"Manual do usuário",en:"User manual",es:"Manual do usuário",it:"Manual do usuário"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software público",en:"Software público",es:"Software público",it:"Software pubblico"}],"u5b":[{pt:"Lista de funções",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometrías",it:"Geometrie"}],"u7":[{pt:"Grade de poligonos",en:"Polygon grid",es:"Grado de polígonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Grado de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hexágonos",en:"Grid of Hexagons",es:"Grado de hexágonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Entorno (Buffer)",it:"Buffer"}],"u11":[{pt:"Centróide",en:"Centroid",es:"Centro geométrico",it:"Baricentro"}],"u11a":[{pt:"Distância entre pontos",en:"Point distance",es:"Distancia de puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N point in polygon",es:"N puntos en polígono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en polígono/matriz",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribuição de pontos",en:"Point distribution",es:"Distribución de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u15a":[{pt:"Ferramentas",en:"Tools",es:"Herramientas",it:"Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Tomar imágenes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Grado",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Polígono",en:"Polygon",es:"Poligonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolv",es:"Dissolve",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupa",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro médio",en:"Mean center",es:"Centro médio",it:"Centro médio"}],"u29":[{pt:"Editor vetorial",en:"Vector editor",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui ou clique para excluir",en:"Drag the layer here to remove",es:"Arrastre el tema aqui ó haga clic para excluir",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",en:"Filters the list of layers",es:"filtra a lista de camadas",it:"filtra a lista de camadas"}],"t2b":[{pt:"Abre a legenda do mapa",en:"Opens the map legend",es:"Abre a legenda do mapa",it:"Abre a legenda do mapa"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Turn the layer on/off on the map. Wait a few moments to get the map redesigned or press the button to apply it.",es:"Haga clic para conectar o desconectar este tema, mostrándolo o no en el mapa. Después de alterar el estado del tema, espere algunos instantes para que el mapa sea rediseñado, o haga clic en el botón aplicar que se mostrará.",it:"Fare clic per attivare o disattivare questo tema. Dopo aver modificato lo stato del tema, La mappa aggiornata sar� visualizzata dopo qualche istante. Per visualizzare subito cliccare su Applica"}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn all layers on",es:"Haga clic para conectar los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn all layers off",es:"Haga clic para desconectar los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa seleção",en:"Clear selection",es:"Limpia la selección",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a seleção",en:"Zoom to selection",es:"Zoom a la selección",it:"Zoom della selezione"}],"t5":[{pt:"Limpa seleção existente nesse tema",en:"Clear selection",es:"Limpia la selección existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download in shapefile format",es:"Haga clic para hacer el download",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"dragging or wait",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the draw order",es:"Arrastre para cambiar la orden",it:"Trascina per modificare l'ordine"}],"t9":[{pt:"A escala do tema é compatível com a escala do mapa",en:"The scale of the layer is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema � compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema é incompatível com a escala do mapa",en:"The scale of the layer is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema � incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema não é conhecida",en:"The scale of the layer is not known",es:"La escala del tema no es conocida",it:"La scala del tema non � conosciuta"}],"t12":[{pt:"excluir",en:"delete",es:"Excluir",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"up",es:"Sube",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Drag the layer up",es:"Haga clic para subir ese tema en la orden de diseño",it:"Clicca per sollevare questo tema nell�ordine di progettazione"}],"t15":[{pt:"desce",en:"down",es:"Baja",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Drag the layer down",es:"Haga clic para bajar este tema en la orden de diseño",it:"Clicca per scendere questo tema nell�ordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"zoom to a layer",es:"Zoom para el tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Click to adjust the map in order to show the whole layer",es:"Haga clic para ajustar el mapa de forma para que muestre todo el tema",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Opções e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Subtitulo",it:"Legenda"}],"t19":[{pt:"Altera a transparência do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency.",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati pi� bassi siano visti"}],"t20":[{pt:"Opacidade",en:"Opacity",es:"Opacidad",it:"Opacit�"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Change layer name.",es:"Cambia el nombre actual del tema. Utilice para mejorar el subtitulo del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema con base en sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts on the subject, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Texto...",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que serão mostradas quando o mouse é estacionado sobre um elemento desse tema.",en:"Set the tooltips that will be shown when the mouse is over the element of that layer.",es:"Defina las etiquetas que se mostrarán cuando el ratón se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Tooltip...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informações, com base na tabela de atributos.",en:"Filter based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtro...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to that layer.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table...",es:"Tabla...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a alteração da forma de representação desse tema.",en:"Opens the editor of legend, allowing the modification of the form of representation of this theme.",es:"Abre el editor de subtítulo, permitiendo la alteración de la forma de representación de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Legend edit...",es:"Editar subtítulo...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"The data shows that layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompaña el ratón",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Muestra en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema visível apenas em determinadas escalas",en:"the layer is visible in specific scales",es:"capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gráfico",en:"Graphic",es:"Gráfico",it:"Grafico"}],"t37a":[{pt:"Tema com gráficos",en:"Theme chart",es:"Gráfico",it:"Grafico"}],"t37b":[{pt:"Gráfico interativo",en:"Interactive chart",es:"Gráfico",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padrão SLD.",en:"Export the legend to SLD.",es:"Exporta a legenda para o padrão SLD.",it:"Exporta a legenda para o padrão SLD."}],"t39":[{pt:"Exportar SLD",en:"SLD...",es:"SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Open the tool that lets you change the SQL data access",es:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"SQL...",es:"SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain...",es:"Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"SLD apply...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comment",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Most popular",es:"Mais populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",en:"Interval in seconds after which the layer will be updated. To ignore, leave blank",es:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",it:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizador"}],"t49":[{pt:"Mapa temático 3d",en:"Thematic map 3d",es:"Mapa temático 3d",it:"Mapa temático 3d"}],"a1":[{pt:"procurar tema:",en:"search layer:",es:"Buscar datos:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Upload de shape file",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload dbf or CSV file",es:"Upload de archivo dbf o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Download de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Web Map Context (WMC) Importer",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"WMS server connection",es:"Conectar con el servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"WMS-T server connection",es:"Conectar con el servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"GeoRss connection",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Click to connect or disconnect layer, showing it or not on the map. After changing the layer status, wait a few moments to be redesigned the map, or click in the button apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostrándolo o no en el mapa. Después de alterar el estado del tema, espere algunos instantes para que el mapa sea rediseñado, o haga clic en el botón aplicar que aparecerá",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verr� visualizzato."}],"a9":[{pt:"fonte",en:"font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"código:",en:"code",es:"Código",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir no Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Upload SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"a15":[{pt:"Conexões",en:"Conections",es:"Conexões",it:"Conexões"}],"a16":[{pt:"Serviços",en:"Services",es:"Servicios",it:"Servers"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Catálogo",en:"Catalog",es:"Catalogo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agrega",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Subtítulo",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca rápida",en:"Quick search",es:"Búsqueda rápida",it:"Ricerca rapida"}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"dinâmico",en:"dynamic",es:"Dinámico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz´-lo no mapa. O centro do mapa ser´ deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazará para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrangência geográfica da inicialização.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajustándola para mostrar la misma área geográfica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d2t":[{pt:"enquadramento inicial",en:"initial extent",es:"enquadramento inicial",it:"enquadramento inicial"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a região indicada por um retângulo. Após ativada, clique e arraste o mouse sobre o mapa na área de zoom desejada.",en:"Extends the map - place the clicked point in the center of the screen or extends the region indicated by a rectangular.After enabled, click and drag the mouse over the map in the area of zoom desired.",es:"Amplía el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o amplía la región indicada por un rectángulo. Después de activarla, haga clic y arrastre el ratón sobre el mapa en el área de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nell�area di zoom desiderata."}],"d3t":[{pt:"clique e arraste para ampliar",en:"click and drag to enlarge",es:"clique e arraste para ampliar",it:"clique e arraste para ampliar"}],"d4":[{pt:"Desloca a região visível no mapa. Após ativada, clique e arraste o mouse sobre o mapa para deslocar a região visível.",en:"Shifts the region visible on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desloca la región visible en el mapa",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d4t":[{pt:"clique e arraste para deslocar",en:"click and drag to move",es:"clique e arraste para deslocar",it:"clique e arraste para deslocar"}],"d5":[{pt:"Amplia o mapa tendo como referência o centro atual.",en:"Magnify the map with the reference the current center.",es:"Amplía el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d5t":[{pt:"aproximar",en:"zoom in",es:"aproximar",it:"aproximar"}],"d6":[{pt:"Reduz o mapa tendo como referência o centro atual.",en:"Reduces the map as having reference the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d6t":[{pt:"afastar",en:"zoom out",es:"afastar",it:"afastar"}],"d7":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on it.",es:"Muestra información sobre un punto en el mapa. Después de activarla haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7t":[{pt:"clique para identificar",en:"click to identify",es:"clique para identificar",it:"clique para identificar"}],"d7a":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. Once activated, stop the mouse for a few moments at the desired point or click on it.",es:"Muestra información sobre un punto en el mapa. Después de activarla, pare el ratón por algunos instantes en el punto deseado o haga clic sobre el mismo.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d7at":[{pt:"etiqueta",en:"label",es:"etiqueta",it:"etiqueta"}],"d8":[{pt:"Mostra a extensão geográfica atual em coordenadas geográficas",en:"It shows the extent of current geographic coordinates",es:"Muestra la extensión geográfica actual en coordenadas geográficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d8t":[{pt:"extensão atual",en:"total extent",es:"extensão atual",it:"extensão atual"}],"d9":[{pt:"Abre/fecha o mapa de referência",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d9t":[{pt:"mapa de referência",en:"reference map",es:"mapa de referência",it:"mapa de referência"}],"d10":[{pt:"Digite o novo valor de escala e clique no botão aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el botón aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrangência atual do mapa. Faça um zoom no mapa antes de abrir essa opção. Regiôes muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current scope of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very long search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opción. Regiones muy extensas pueden ocasionar una búsqueda muy lenta",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dell�apertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d11t":[{pt:"buscar na Wikipédia",en:"search in Wikipédia",es:"buscar na Wikipédia",it:"buscar na Wikipédia"}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usuário no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3d",en:"Generates file for 3d",es:"Genera archivo para 3d",it:"Genera file per 3d"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de satélite da região vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region's main views on the map",es:"Abre Google Maps, mostrando una imagen de satélite de la región en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d15t":[{pt:"Google Maps",en:"Google Maps",es:"Google Maps",it:"Google Maps"}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Busca documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d16t":[{pt:"Scielo",en:"Scielo",es:"Scielo",it:"Scielo"}],"d17":[{pt:"Projeto Confluence. Pontos de intersecção de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersección de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d17t":[{pt:"confluências",en:"confluences",es:"confluências",it:"confluências"}],"d18":[{pt:"Abre lente de ampliação",en:"Opens lens to expansion",es:"Abre lente de ampliación",it:"Apri lente di ingrandimento"}],"d18t":[{pt:"lente",en:"lens",es:"lente",it:"lente"}],"d19":[{pt:"Coloca as guias em uma janela móvel",en:"Open the tabs in a window mobile",es:"Coloca las guías en una ventana móvil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configuraçôes iniciais.",en:"Reload the map with the initial configurations.",es:"Rediseña el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d20t":[{pt:"reinicia",en:"restart",es:"reinicia",it:"reinicia"}],"d21":[{pt:"Mede a distância entre dois ou mais pontos clicados no mapa (menor distância). O cálculo de distância é aproximado e sua precisão depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (less distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o más puntos marcados en el mapa (menor distancia). El cálculo de distancia es aproximado y su precisión depende de la escala del mapa",it:"Misura la distanza tra due o pi� punti cliccati sulla mappa (minore distanza). Il calcolo della distanza � approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21t":[{pt:"distância",en:"distance",es:"distância",it:"dist�ncia"}],"d21a":[{pt:"Mede a área de um polígono desenhado na tela. O cálculo de área é aproximado e sua precisão depende da escala do mapa.",en:"It measures the area on the map. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mede a área de um polígono desenhado na tela. O cálculo de área é aproximado e sua precisão depende da escala do mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie � approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21at":[{pt:"área",en:"area",es:"área",it:"área"}],"d22":[{pt:"Insere pontos no mapa em coordenadas geográficas. Ospontos incluídos podem ser transformados em linhas ou polígonos. Os pontos são armazenados em um tema temporário, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. Items included can be converted into lines or polygons. Items are stored in a temporary layer, can be to download shapefile.",es:"Inserte puntos en el mapa en coordenadas geográficas. Los puntos incluidos pueden transformarse en líneas o polígonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse el download del archivo shapefile.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilit� di effettuare il download del file Shapefile."}],"d22t":[{pt:"inserir pontos",en:"insert points",es:"inserir pontos",it:"inserir pontos"}],"d23":[{pt:"Insere um gráfico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores numéricos na tabela de atributos.",en:"Insert a graphic in the clicked point as the exist attributes in the chosen layer. The layer must have items with numerical values in the table of attributes.",es:"Inserte un gráfico en el punto marcado según los atributos existentes en el tema elejido. El tema debe tener puntos con valores numéricos en la tabla de atributos",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para seleção de elementos de um tema. Os elementos selecionados podem ser utilizados em outras operaçôes, como buffer e seleção por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other buffer or selection operation by layer .",es:"Abre las herramientas para selección de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras ",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d24t":[{pt:"Selecionar",en:"Select",es:"Selecionar",it:"Selecionar"}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa opção para adicionar informaçôes ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opción para agregar información al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d25t":[{pt:"Inserir texto",en:"Text insert",es:"Inserir texto",it:"Inserir texto"}],"d26":[{pt:"Escolha o visual para os botões e outras características visuais do mapa",en:"Choose look for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras características visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait...",es:"Espere...",it:"Attendere..."}],"d29":[{pt:"Estações metar",en:"Metar stations",es:"Estações metar",it:"Estações metar"}],"d30":[{pt:"Linha do tempo",en:"Time line",es:"Linha do tempo",it:"Linha do tempo"}],"d31":[{pt:"Não existe nenhuma camada com etiquetas ativas",en:"There is no layer with active labels",es:"Não existe nenhuma camada com etiquetas ativas",it:"Não existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navegação com o mouse",en:"Mouse navigation",es:"Navegação com o mouse",it:"Navegação com o mouse"}],"ge2":[{pt:"Barra de status",en:"Status bar",es:"Barra de status",it:"Barra de status"}],"ge3":[{pt:"Reference map",en:"Mapa de referência",es:"Mapa de referência",it:"Mapa de referência"}],"ge4":[{pt:"Escala e legenda",en:"Scale and legend",es:"Escala e legenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosphere",es:"Atmosfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Coordinates grid",es:"Grade de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Sunshine",es:"Luz do sol",it:"Luz do sol"}],"ge8":[{pt:"Limites políticos",en:"Political boundaries",es:"Limites políticos",it:"Limites políticos"}],"ge9":[{pt:"Construções em 3d",en:"Buildings in 3D",es:"Construções em 3d",it:"Construções em 3d"}],"ge10":[{pt:"Estradas",en:"Roads",es:"Estradas",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terrain",es:"Terreno",it:"Terreno"}],"x1":[{pt:"Página principal",en:"Home",es:"Página principal",it:"Página principal"}],"x2":[{pt:"Lista de menus",en:"Menu list",es:"Lista de menus",it:"Lista de menus"}],"x3":[{pt:"Miniaturas",en:"Thumbnails",es:"Miniaturas",it:"Miniaturas"}],"x4":[{pt:"Pesquisa na INDE",en:"Search in SDI",es:"Pesquisa na INDE",it:"Pesquisa na INDE"}],"x5":[{pt:"Editar subgrupos",en:"Subgroups editing",es:"Editar subgrupos",it:"Editar subgrupos"}],"x6":[{pt:"Editar temas",en:"Theme editing",es:"Editar temas",it:"Editar temas"}],"x7":[{pt:"opção visível apenas para editores",en:"option visible only to editors",es:"opção visível apenas para editores",it:"opção visível apenas para editores"}],"x8":[{pt:"Sistema de administração",en:"Management System",es:"Sistema de administração",it:"Sistema de administração"}],"x9":[{pt:"Editar árvore",en:"Edit tree",es:"Editar árvore",it:"Editar árvore"}],"x10":[{pt:"Editar menus",en:"Edit menu",es:"Editar menus",it:"Editar menus"}],"x11":[{pt:"Mostra a legenda em uma janela",en:"Show the legend in a window",es:"Mostra a legenda em uma janela",it:"Mostra a legenda em uma janela"}],"x13":[{pt:"&Acute;rvore de camadas não encontrada",en:"Tree layers not found",es:"Arboles de capas no se encuentra",it:"&Acute;rvore de camadas não encontrada"}],"x14":[{pt:"sim",en:"si",es:"yes",it:"sim"}],"x15":[{pt:"não",en:"no",es:"no",it:"nao"}],"x16":[{pt:"Valor não definido",en:"Value not set",es:"Valor no establecido",it:"Valor não definido"}],"x17":[{pt:"Essa opção afeta apenas a impressão do mapa",en:"This option only affects the printing of the map",es:"Esta opción s&ocaute;lo afecta a la impresi&ocaute;n del mapa",it:"Essa opção afeta apenas a impressão do mapa"}],"x18":[{pt:"Nome não definido",en:"El nombre no se ha definido",es:"Name was not defined",it:"Name was not defined"}],"x19":[{pt:"Comentários de",en:"Reviews",es:"Comentarios",it:""}],"x20":[{pt:"Clique no mapa para desenhar o polígono",en:"Click the map to draw the polygon",es:"Haga clic en el mapa para dibujar el polígono",it:"Click the map to draw the polygon"}],"x21":[{pt:"Essa operação não funciona nessa interface",en:"This operation does not work on this interface",es:"Esta operación no funciona en esta interfaz",it:""}],"x22":[{pt:"Opção não disponível",en:"Option not available",es:"Opción no disponible",it:"Opci�n no disponible"}],"x23":[{pt:"Direção",en:"",es:"Dirección",it:"Direction"}],"x25":[{pt:"Método para calcular distâncias",en:"Method to calculate distances",es:"Método para calcular distancias",it:"Method to calculate distances"}],"x26":[{pt:"Voce quer mesmo encerrar a sessao?",en:"Do you really want to logout?",es:"¿Realmente desea salir?",it:""}],"x27":[{pt:"Usuário",en:"User",es:"Usuario",it:""}],"x28":[{pt:"Senha",en:"Password",es:"Contraseña",it:""}],"x29":[{pt:"Enviar",en:"Send",es:"Enviar",it:""}],"x30":[{pt:"Ativo",en:"Active",es:"Activo",it:""}],"x31":[{pt:"Erro",en:"Error",es:"Erro",it:""}],"x32":[{pt:"",en:"",es:"",it:""}]}; | |
352 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.idioma={MOSTRASELETOR:true,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id){if(i3GEO.idioma.DICIONARIO[id]){var t=i3GEO.idioma.DICIONARIO[id][0];return t[i3GEO.idioma.ATUAL]}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k=0;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel,temp,iu=i3GEO.util;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<550){w="width:12px;"}else{w=""}for(i=0;i<n;i++){temp=i3GEO.idioma.SELETORES[i];ins+='<img style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+iu.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+temp+'\')" ';if(temp==="en"){ins+='alt="Ingles" id="uk" />'}if(temp==="pt"){ins+='alt="Portugues" id="brasil" />'}if(temp==="es"){ins+='alt="Espanhol" id="espanhol" />'}if(temp==="it"){ins+='alt="Italiano" id="italiano" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}}};var $trad=function(id){return(i3GEO.idioma.traduzir(id))};(function(){try{var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c);g_linguagem=c}else{if(typeof(g_linguagem)!=="undefined"){i3GEO.idioma.define(g_linguagem)}else{g_linguagem="pt";i3GEO.idioma.define("pt")}}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}}catch(e){alert("Problemas com idiomas "+e)}})(); | |
353 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}cpJSON=new cpaint();cpJSON.set_response_type("JSON");cpJSON.set_transfer_mode("POST");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.locaplic não esta definida")}if(i3GEO.configura.sid===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.sid não esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereSHPgrafico",$trad("o1"));cpJSON.call(p,"insereSHPgrafico",retorno,par)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};cpJSON.call(p,"insereSHP",retorno,par)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao,par)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao,par)},excluitema:function(funcao,temas){var layer,retorno,p,n,i,par;i3GEO.php.verifica();retorno=function(retorno){i3GEO.janela.fechaAguarde("excluitema");n=temas.length;for(i=0;i<n;i++){if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(temas[i]);if(layer.length>0){i3geoOL.removeLayer(layer[0])}}if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(temas[i]);if(indice!==false){i3GeoMap.overlayMapTypes.removeAt(indice)}}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(temas[i]);i3GeoMap.getFeatures().removeChild(indice)}}funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("excluitema",$trad("o1"));p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php";par="funcao=excluitema&temas="+temas+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"excluitema",retorno,par)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID,retorno=function(retorno){i3GEO.janela.fechaAguarde("reordenatemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reordenatemas",$trad("o1"));cpJSON.call(p,"reordenatemas",retorno,par)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaHTML",funcao,par)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe,retorno=function(retorno){i3GEO.janela.fechaAguarde("inverteStatusClasse");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("inverteStatusClasse",$trad("o1"));cpJSON.call(p,"inverteStatusClasse",retorno,par)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"ligaDesligaTemas",retorno,par)},pegalistademenus:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistademenus",funcao,par)},pegalistadegrupos:function(funcao,id_menu,listasgrupos){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadegrupos",funcao,par)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadeSubgrupos",funcao,par)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao,par)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao,par)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao,par)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao,par)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao,par)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},listadrives:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao,par)},listaarquivos:function(funcao,caminho){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao,par)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao,par)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao,par)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatamanho");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatamanho",$trad("o1"));cpJSON.call(p,"pegaSistemas",retorno,par)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ativalogo&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("ativalogo");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("ativalogo",$trad("o1"));cpJSON.call(p,"ativalogo",retorno,par)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereAnnotation");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereAnnotation",$trad("o1"));cpJSON.call(p,"inserefeature",retorno,par)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"identificaunico",funcao,par)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=recuperamapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("recuperamapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("recuperamapa",$trad("o1"));cpJSON.call(p,"recuperamapa",retorno,par)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao,par)},referenciadinamica:function(funcao,zoom,tipo){i3GEO.php.verifica();if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferenciaDinamica",funcao,par)},referencia:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referencia&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferencia",funcao,par)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao,par)},aproxima:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aproxima",funcao,par)},afasta:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"afasta",funcao,par)},zoomponto:function(funcao,x,y,tamanho,simbolo,cor){i3GEO.php.verifica();if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}var retorno=function(retorno){i3GEO.janela.fechaAguarde("zoomponto");if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(x,y)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.pan2ponto(x,y)}funcao.call(funcao,retorno)},p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor;i3GEO.janela.abreAguarde("zoomponto",$trad("o1"));cpJSON.call(p,"zoomponto",retorno,par)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao,par)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){var retorno;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;atualiza=true;geo=false}if(geo===undefined){geo=false}if(atualiza===undefined){atualiza=true}if(ext===undefined){alert("extensao nao definida");return}retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":if(atualiza===true){i3GEO.Interface.googlemaps.zoom2extent(ext)}break;case"googleearth":if(atualiza===true){i3GEO.Interface.googleearth.zoom2extent(ext)}break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(ext);break}try{funcao.call(funcao,retorno)}catch(e){}};var p=locaplic+"/classesphp/mapa_controle.php";var par="funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo;cpJSON.call(p,"mudaext",retorno,par)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudaescala");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudaescala",$trad("o1"));cpJSON.call(p,"mudaescala",retorno,par)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"crialente",funcao,par)},geradestaque:function(funcao,tema,ext){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext,retorno=function(retorno){i3GEO.janela.fechaAguarde("geradestaque");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("geradestaque",$trad("o1"));cpJSON.call(p,"geradestaque",retorno,par)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoPT",funcao,par)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=selecaobox&ext="+box+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao,par)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoext",funcao,par)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoatrib2",funcao,par)},selecaotema:function(funcao,temao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaotema",funcao,par)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("sobetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("sobetema",$trad("o1"));cpJSON.call(p,"sobetema",retorno,par)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("descetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("descetema",$trad("o1"));cpJSON.call(p,"descetema",retorno,par)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("fontetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("fontetema",$trad("o1"));cpJSON.call(p,"fontetema",retorno,par)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomtema",$trad("o1"));cpJSON.call(p,"zoomtema",retorno,par)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomsel",$trad("o1"));cpJSON.call(p,"zoomsel",retorno,par)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("limpasel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("limpasel",$trad("o1"));cpJSON.call(p,"limpasel",retorno,par)},invertestatuslegenda:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("invertestatuslegenda");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("invertestatuslegenda",$trad("o1"));cpJSON.call(p,"invertestatuslegenda",retorno,par)},aplicaCorClasseTema:function(funcao,idtema,idclasse,rgb){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("aplicaCorClasseTema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("aplicaCorClasseTema",$trad("o1"));cpJSON.call(p,"aplicaCorClasseTema",retorno,par)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatransp");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatransp",$trad("o1"));cpJSON.call(p,"mudatransp",retorno,par)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudanome");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudanome",$trad("o1"));cpJSON.call(p,"mudanome",retorno,par)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid){if(arguments.length===11){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao,par)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaSHP");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaSHP",$trad("o1"));cpJSON.call(p,"adicionaTemaSHP",retorno,par)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaIMG");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaIMG",$trad("o1"));cpJSON.call(p,"adicionaTemaIMG",retorno,par)},identifica:function(funcao,x,y,resolucao,locaplic,sid){var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica&opcao=tip&xy="+x+","+y+"&resolucao=5&g_sid="+sid;cpJSON.call(p,"identifica",funcao,par)},identifica2:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas="";resolucao=5}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao="+resolucao+"&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){par+="&tema="+tema}cpJSON.call(p,"identifica",funcao,par)},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("reiniciaMapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reiniciaMapa",$trad("o1"));cpJSON.call(p,"reiniciaMapa",retorno,par)},procurartemas:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemas2:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas2&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemasestrela:function(funcao,nivel,fatorestrela,locaplic){if(arguments.length===3){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemasestrela&map_file=&nivel="+nivel+"&fatorestrela="+fatorestrela+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemasestrela");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemasestrela",$trad("o1"));cpJSON.call(p,"foo",retorno,par)}catch(e){}},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=adtema&temas="+temas+"&g_sid="+sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("adtema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adtema",$trad("o1"));cpJSON.call(p,"adtema",retorno,par)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao,par)},googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googlemaps",$trad("o1"));cpJSON.call(p,"googlemaps",retorno,par)},googleearth:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googleearth&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googleearth");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googleearth",$trad("o1"));cpJSON.call(p,"googleearth",retorno,par)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("openlayers",$trad("o1"));cpJSON.call(p,"openlayers",retorno,par)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.recalcPar();par+="&mapexten="+i3GEO.parametros.mapexten}cpJSON.call(p,"corpo",funcao,par)},converte2googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2googlemaps",$trad("o1"));cpJSON.call(p,"converte2googlemaps",retorno,par)},converte2openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2openlayers",$trad("o1"));cpJSON.call(p,"converte2openlayers",retorno,par)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaMapa&"+parametros,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"criaMapa",funcao,par)},inicia:function(funcao,embedLegenda,w,h){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"iniciaMapa",funcao,par)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao,par)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php",par="funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao,par)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer;cpJSON.call(p,"listaLayersWMS",funcao,par)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php",par="map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao,par)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaItensTema",funcao,par)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaRegistros",funcao,par)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=extregistros®istro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao,par)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao,par)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg&map_file=";cpJSON.call(p,"listaEpsg",funcao,par)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema,retorno=function(retorno){i3GEO.janela.fechaAguarde("criatemaSel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("criatemaSel",$trad("o1"));cpJSON.call(p,"chavegoogle",retorno,par)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao,par)},alteraData:function(funcao,tema,data){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data;cpJSON.call(p,"alteradata",funcao,par)},dadosPerfilRelevo:function(funcao,opcao,pontos,amostragem,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem+"&item="+item)},funcoesGeometriasWkt:function(funcao,listaWkt,operacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=funcoesGeometriasWkt&operacao="+operacao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&geometrias="+listaWkt)}}; | |
354 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.configura={grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"},{nome:$trad("u15a"),id:"ferramentas"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu1",text:$trad("u1"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u4a"),url:"javascript:i3GEO.ajuda.abreDoc('/documentacao/manual-i3geo-4_7-pt.pdf')"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"javascript:i3GEO.ajuda.abreDoc('/ajuda_usuario.php')"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("d27")+'</b></span>',url:"#"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Serviços WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperbólica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}],"ferramentas":[{id:"omenudataFerramentas0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("g4a")+'</b></span>',url:"#"},{id:"omenudataFerramentas4a",text:$trad("g1a"),url:"javascript:i3GEO.arvoreDeTemas.flutuante()"},{id:"omenudataFerramentas1a",text:$trad("t20"),url:"javascript:i3GEO.mapa.dialogo.opacidade()"},{id:"omenudataFerramentas2a",text:$trad("p21"),url:"javascript:i3GEO.mapa.dialogo.animacao()"},{id:"omenudataFerramentas3a",text:$trad("d24t"),url:"javascript:i3GEO.mapa.dialogo.selecao();"},{id:"omenudataFerramentas0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a7")+'</b></span>',url:"#"},{id:"omenudataFerramentas1b",text:$trad("t31"),url:"javascript:i3GEO.tema.dialogo.tabela()"},{id:"omenudataFerramentas2b",text:$trad("t23"),url:"javascript:i3GEO.tema.dialogo.procuraratrib()"},{id:"omenudataFerramentas3b",text:$trad("t25"),url:"javascript:i3GEO.tema.dialogo.toponimia()"},{id:"omenudataFerramentas4b",text:$trad("t27"),url:"javascript:i3GEO.tema.dialogo.etiquetas()"},{id:"omenudataFerramentas5b",text:$trad("t29"),url:"javascript:i3GEO.tema.dialogo.filtro()"},{id:"omenudataFerramentas6b",text:$trad("t33"),url:"javascript:i3GEO.tema.dialogo.editaLegenda()"},{id:"omenudataFerramentas7b",text:$trad("t42"),url:"javascript:i3GEO.tema.dialogo.cortina()"},{id:"omenudataFerramentas8b",text:$trad("t37a"),url:"javascript:i3GEO.tema.dialogo.graficotema()"},{id:"omenudataFerramentas9b",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataFerramentas10b",text:$trad("t49"),url:"javascript:i3GEO.tema.dialogo.tme()"},{id:"omenudataFerramentas0c",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a15")+'</b></span>',url:"#"},{id:"omenudataFerramentas1c",text:$trad("a16"),url:"javascript:i3GEO.arvoreDeTemas.dialogo.conectaservico()"},{id:"omenudataFerramentas0d",text:'<span style=color:gray;text-decoration:underline; ><b>Upload</b></span>',url:"#"},{id:"omenudataFerramentas3d",text:"Vetor (shp,dbf,csv,gpx,kml)",url:"javascript:i3GEO.arvoreDeTemas.dialogo.uploadarquivo()"}]}},tipoimagem:"nenhum",ajustaDocType:true,tipotip:"balao",alturatip:"200px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:70,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:1800,iniciaJanelaMensagens:false,mostraRosaDosVentos:"nao",liberaGuias:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:"",constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),titulo:$trad("d2t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"localizar",tipo:"",dica:$trad("o2"),titulo:$trad("o2"),funcaoonclick:function(){if(!$i("janelaBuscaRapida")){var janela=i3GEO.janela.cria("258px","20px","","","","Busca rápida","janelaBuscaRapida",false,"hd","","");$i("janelaBuscaRapida_corpo").style.backgroundColor="white";i3GEO.gadgets.mostraBuscaRapida(janela[2].id)}}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),titulo:$trad("d3t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.mensagemSimples("Pressione a tecla CTRL junto com o botão esquerdo do mouse e arraste para definir a área de zoom","?");g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}var temp;temp="zoom";i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);g_operacao='navega';g_tipoacao='zoomli';i3GEO.barraDeBotoes.ativaIcone("zoomli");marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLzoom);return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}if(i3GEO.eventos.MOUSEDOWN.toString().search("i3GEO.navega.zoomBox.inicia()")<0){i3GEO.eventos.MOUSEDOWN.push("i3GEO.navega.zoomBox.inicia()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}i3GEO.barraDeBotoes.BOTAOPADRAO="zoomli"}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),titulo:$trad("d4t"),funcaoonclick:function(){var temp;g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="pan";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="pan_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}return}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),titulo:$trad("d5t"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),titulo:$trad("d6t"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),titulo:$trad("d7t"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");g_tipoacao='identifica';g_operacao='identifica';cliqueIdentifica=function(){if(g_operacao==="identifica"||i3GEO.barraDeBotoes.BOTAOPADRAO==="identifica"){g_operacao="identifica";eval(i3GEO.configura.funcaoIdentifica)}var temp=function(){},i;i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp);i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica");i=$i("i3GEOmarcaIdentifica");if(i){i.style.display="block"}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")<0){i3GEO.eventos.MOUSECLIQUE.push("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSECLIQUE.remove("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),titulo:$trad("d7at"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){alert($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");g_tipoacao='identifica';g_operacao='identifica';verificaTip=function(){if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}if($i("marcaIdentifica")){return}if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoTip)}else{i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")>0){i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSECLIQUE.push("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSEPARADO.push("verificaTip()")}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),titulo:$trad("d8t"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),titulo:$trad("d9t"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),titulo:$trad("d11t"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),titulo:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",titulo:"fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),titulo:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),titulo:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),titulo:$trad("d15t"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),titulo:$trad("d16t"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),titulo:$trad("d17t"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),titulo:$trad("d18t"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),titulo:$trad("d20t"),funcaoonclick:function(){var temp=function(){var url=(window.location.href.split("?"));window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),titulo:$trad("d21t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),titulo:$trad("d21at"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"barraedicao",tipo:"",dica:$trad("u29"),titulo:$trad("u29"),funcaoonclick:function(){i3GEO.barraDeBotoes.editor.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),titulo:$trad("d22t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),titulo:$trad("d24t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),titulo:$trad("d25t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",titulo:"roteamento",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","Rota");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="Não foi possível criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);alert("Clique o ponto de origem da rota")}}]}}; | |
355 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.parametros.mapexten;cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{alert("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}}; | |
356 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.desenho={richdraw:"",estilos:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w){try{i3GEO.desenho.richdraw.renderer.create('circ','',i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){padrao=i3GEO.desenho.estilos[padrao];i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}}; | |
357 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.Interface={TABLET:false,ALTTABLET:"openlayers_t.htm",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:20,BARRADEZOOMLEFT:10,ATUAL:"openlayers",IDCORPO:"corpoMapa",ATIVAMENUCONTEXTO:false,IDMAPA:"",STATUS:{atualizando:[],trocando:false},atual2gm:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(google){i3GEO.Interface.atual2gm.initemp()}}catch(e){i3GEO.util.scriptTag("http://www.google.com/jsapi?callback=i3GEO.Interface.atual2gm.loadMaps","","",false)}},loadMaps:function(){google.load("maps","3",{callback:"i3GEO.Interface.atual2gm.initemp",other_params:"sensor=false"})},initemp:function(){var temp=function(){$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.googlemaps.inicia();i3GEO.janela.fechaAguarde("googleMapsAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("openlayers",i3GEO.configura.locaplic+"/imagens/dobraopenlayers.png")};i3GEO.php.converte2googlemaps(temp)}},atual2ol:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(OpenLayers){i3GEO.Interface.atual2ol.initemp()}}catch(e){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/openlayers/OpenLayers211.js.php","i3GEO.Interface.atual2ol.initemp()","",false)}},initemp:function(){var temp=function(){OpenLayers.ImgPath="../pacotes/openlayers/img/";$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.openlayers.inicia();i3GEO.janela.fechaAguarde("OpenLayersAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("googlemaps",i3GEO.configura.locaplic+"/imagens/dobragooglemaps.png");i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten)};i3GEO.php.converte2openlayers(temp)}},redesenha:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()},aplicaOpacidade:function(opacidade){i3GEO.Interface[i3GEO.Interface.ATUAL].aplicaOpacidade(opacidade)},atualizaMapa:function(){switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()}},atualizaTema:function(retorno,tema){i3GEO.Interface[i3GEO.Interface.ATUAL].atualizaTema(retorno,tema)},adicionaKml:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}i3GEO.navega.autoRedesenho.ativa();i3GEO.util.defineValor("i3geo_escalanum","value",i3GEO.parametros.mapscale);if((i3GEO.parametros.geoip==="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.Interface[i3GEO.Interface.ATUAL].inicia();if($i(i3GEO.login.divnomelogin)&&i3GEO.util.pegaCookie("i3geousuarionome")){$i(i3GEO.login.divnomelogin).innerHTML=i3GEO.util.pegaCookie("i3geousuarionome")}},alteraParametroLayers:function(parametro,valor){i3GEO.Interface[i3GEO.Interface.ATUAL].alteraParametroLayers(parametro,valor)},ativaBotoes:function(){if(i3GEO.Interface.STATUS.trocando===false){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{i3GEO.Interface[i3GEO.Interface.ATUAL].ativaBotoes()}}},openlayers:{FUNDOTEMA:"yellow",TILES:false,BUFFER:0,GADGETS:{PanZoomBar:true,PanZoom:false,LayerSwitcher:true,ScaleLine:true,OverviewMap:false},MINEXTENT:[-0.0005,-0.0005,0.0005,0.0005],MAXEXTENT:[-180,-90,180,90],LAYERSADICIONAIS:[],redesenha:function(){var openlayers=i3GEO.Interface.openlayers;openlayers.criaLayers();openlayers.ordenaLayers();openlayers.recalcPar();i3GEO.janela.fechaAguarde();openlayers.sobeLayersGraficos()},cria:function(w,h){var f,ins,mi=i3GEO.Interface.openlayers.MINEXTENT,ma=i3GEO.Interface.openlayers.MAXEXTENT,i=$i(i3GEO.Interface.IDCORPO),bb=i3GEO.barraDeBotoes;OpenLayers.DOTS_PER_INCH=i3GEO.util.calculaDPI();OpenLayers._getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/openlayers/"};if(i){f=$i("openlayers");if(!f){ins='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w+"px";f.style.height=h+"px"}i3GEO.Interface.IDMAPA="openlayers";if(i3GEO.Interface.TABLET===true){i3geoOL=new OpenLayers.Map({div:"openlayers",theme:null,controls:[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]})}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;i3geoOL=new OpenLayers.Map('openlayers',{controls:[],fractionalZoom:true,minResolution:"auto",minExtent:new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3]),maxResolution:"auto",maxExtent:new OpenLayers.Bounds(ma[0],ma[1],ma[2],ma[3]),allOverlays:false})}},inicia:function(){var montaMapa=function(){var pz,temp,layers,i,texto,estilo,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});if(openlayers.GADGETS.PanZoom===true){pz=new OpenLayers.Control.PanZoom();i3geoOL.addControl(pz);pz.div.style.zIndex=5000}openlayers.criaLayers();temp=$i("listaLayersBase");if(temp){estilo="cursor:pointer;vertical-align:top;padding-top:5px;";if(navm){estilo="border:0px solid white;cursor:pointer;vertical-align:middle;padding-top:0px;"}temp={"propriedades":[]};layers=i3geoOL.getLayersBy("isBaseLayer",true);layersn=layers.length;for(i=0;i<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].id+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}i3GEO.Interface.ativaBotoes();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}};if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);"}i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}},aplicaOpacidade:function(opacidade){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer&&layer.isBaseLayer===false){layer.setOpacity(opacidade)}}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+=" <span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,j="",html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,camada,urllayer,opcoes,i,n,temp=$i("i3GEOprogressoDiv"),fundoIsBase=true;if(temp){i3GEO.Interface.STATUS.atualizando=[];temp.style.display="none"}try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.Vector("Nenhum",{displayInLayerSwitcher:true,visibility:false,isBaseLayer:true,singleTile:true});i3geoOL.addLayer(layer);if($i(i3geoOL.id+"_events")){$i(i3geoOL.id+"_events").style.backgroundColor="rgb("+i3GEO.parametros.cordefundo+")"}}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:false,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){layer="";camada=i3GEO.arvoreDeCamadas.CAMADAS[i];opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES);if(i3geoOL.getLayersByName(camada.name).length===0&&camada.name.toLowerCase()!="copyright"){urllayer=url+"&layer="+camada.name+"&r="+Math.random();try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes);if(camada.wmssrs!=""&&layer.url){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||camada.type===0||camada.type===4||camada.type===8){opcoes.singleTile=true}else{temp=camada.type===3?opcoes.singleTile=false:opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES)}layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}if(layer&&layer!=""){temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}if(i3GEO.parametros.copyright!=""&&!$i("i3GEOcopyright")){temp=document.createElement("div");temp.id="i3GEOcopyright";temp.style.display="block";temp.style.top="0px";temp.style.left="0px";temp.style.zIndex=5000;temp.style.position="absolute";temp.innerHTML="<p class=paragrafo >"+i3GEO.parametros.copyright+"</p>";$i(i3GEO.Interface.IDMAPA).appendChild(temp)}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"&&layers[i].name!="Nenhum"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},inverteModoTile:function(){if(i3GEO.Interface.openlayers.TILES===true){i3GEO.Interface.openlayers.TILES=false}else{i3GEO.Interface.openlayers.TILES=true}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer){i3geoOL.removeLayer(layer,false)}}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){if(layers[i].url){url=layers[i].url;reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");eval("layers[i].mergeNewParams({"+parametro+":valor})");layers[i].redraw()}}},loadStartLayer:function(event){var p=$i("i3GEOprogressoDiv");if($i("ArvoreTituloTema"+event.object.name)){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA);if(p){p.style.display="block";i3GEO.arvoreDeCamadas.progressBar.set('maxValue',i3GEO.Interface.STATUS.atualizando.length);i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')-1)}}},loadStopLayer:function(event){var p=$i("i3GEOprogressoDiv");i3GEO.Interface.STATUS.atualizando.remove(event.object.name);if($i("ArvoreTituloTema"+event.object.name)){YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","");if(p){p.style.display="block";if(i3GEO.Interface.STATUS.atualizando.length>0){i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')+1)}else{i3GEO.arvoreDeCamadas.progressBar.set('value',0);p.style.display="none"}}}},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];if(layer){i3geoOL.setLayerIndex(layer,maiorindice+i)}}},sobeDesceLayer:function(tema,tipo){var layer=i3geoOL.getLayersByName(tema)[0],indice;if(layer){indice=i3geoOL.getLayerIndex(layer);if(tipo==="sobe"){i3geoOL.setLayerIndex(layer,indice+1)}else{i3geoOL.setLayerIndex(layer,indice-1)}}},ligaDesliga:function(obj){var layers=i3geoOL.getLayersByName(obj.value),desligar="",ligar="",b;if(layers.length>0){{layers[0].setVisibility(obj.checked)}if(obj.checked){ligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value)}b=new Image();b.src=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemasbeacon&desligar="+desligar+"&ligar="+ligar+"&adicionar=nao&g_sid="+i3GEO.configura.sid;b.onerror=function(){i3GEO.mapa.legendaHTML.atualiza()}}},ativaFundo:function(id){i3geoOL.setBaseLayer(i3geoOL.getLayer(id));i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].url){layers[i].mergeNewParams({r:Math.random()});layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&","");layers[i].url=layers[i].url+"&&";if(layers[i].visibility===true){layers[i].redraw()}}}},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){if(layer.url){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&","");layer.url=layer.url+"&&";layer.redraw()}}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){var modoAtual="";i3GEO.eventos.ativa($i("openlayers"));i3geoOL.events.register("movestart",i3geoOL,function(e){var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});i3geoOL.events.register("moveend",i3geoOL,function(e){var xy;modoAtual="";i3GEO.Interface.openlayers.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});i3geoOL.events.register("mousemove",i3geoOL,function(e){var p,lonlat,d,pos;if(modoAtual==="move"){return}p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}})},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();i3GEO.gadgets.atualizaEscalaNumerica(parseInt(escalaAtual,10))},zoom2ext:function(ext){var m,b;m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b)},pan2ponto:function(x,y){i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{MAPOPTIONS:{scaleControl:true},OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},removeTodosLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.removeTodosLayers();i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");if(w){f.style.width=w+"px";f.style.height=h+"px"}}i3GeoMap="";i3GEO.Interface.IDMAPA="googlemapsdiv";if(i3GEO.Interface.TABLET===false){i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=true;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=true;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=true}},ativaZoomBox:function(){i3GeoMap.enableKeyDragZoom({key:'ctrl'})},inicia:function(){var pol,ret,montaMapa;pol=i3GEO.parametros.mapexten;ret=pol.split(" ");montaMapa=function(retorno){var sw,ne,dobra=$i("i3GEOdobraPagina");try{i3GeoMap=new google.maps.Map($i(i3GEO.Interface.IDMAPA),i3GEO.Interface.googlemaps.MAPOPTIONS)}catch(e){alert(e);return}if(dobra){$i(i3GEO.Interface.IDMAPA).appendChild(dobra)}if(!$i("keydragzoom_script")){js=i3GEO.configura.locaplic+"/pacotes/google/keydragzoom.js.php";i3GEO.util.scriptTag(js,"i3GEO.Interface.googlemaps.ativaZoomBox()","keydragzoom_script")}i3GeoMap.setMapTypeId(i3GEO.Interface.googlemaps.TIPOMAPA);sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne));i3GeoMapOverlay=new google.maps.OverlayView();i3GeoMapOverlay.draw=function(){};i3GEO.Interface.googlemaps.criaLayers();i3GeoMapOverlay.setMap(i3GeoMap);i3GEO.Interface.googlemaps.registraEventos();if(i3GEO.Interface.STATUS.trocando===false){i3GEO.gadgets.mostraInserirKml()}i3GEO.Interface.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));if(i3GEO.Interface.STATUS.trocando===false){i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor()}i3GEO.gadgets.mostraMenuSuspenso();g_operacao="";g_tipoacao="";if(i3GEO.Interface.STATUS.trocando===true){$i(i3GEO.arvoreDeCamadas.IDHTML).innerHTML=""}if(i3GEO.Interface.STATUS.trocando===false){i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)}if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(this)"}i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googlemaps.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googlemaps.adicionaKml(true,i3GEO.parametros.kmlurl)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}};i3GEO.php.googlemaps(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0)}}}},criaImageMap:function(nomeLayer){var i3GEOTileO="",s;s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var pos,modoAtual="";google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao="";var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});google.maps.event.addListener(i3GeoMap,"dragend",function(){var xy;modoAtual="";i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar()});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){var xy;i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela;if(modoAtual==="move"){return}ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i,divmapa=$i("googlemapsdiv"),divimg,n;divimg=divmapa.getElementsByTagName("img");n=divimg.length;if(divimg&&n>0){for(i=0;i<n;i++){if(divimg[i].src.search("&layer="+nomeLayer+"&")>0){return divimg[i].parentNode.parentNode.parentNode}}}return false},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="",n,i,lista=[],listatemp;if(obj.checked&&!indice){ligar=obj.value;listatemp=i3GEO.arvoreDeCamadas.listaLigadosDesligados()[0];n=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<n;i++){if(i3GEO.util.in_array(i3GEO.arvoreDeCamadas.CAMADAS[i],listatemp)){lista.push(i3GEO.arvoreDeCamadas.CAMADAS[i])}}n=lista.length;indice=0;for(i=0;i<n;i++){if(lista[i]==obj.value){indice=n-1-i}}i3GEO.Interface.googlemaps.insereLayer(obj.value,indice);i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},aplicaOpacidade:function(opacidade){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,div;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(camada&&camada.name){div=i3GEO.Interface.googlemaps.retornaDivLayer(camada.name);if(div){YAHOO.util.Dom.setStyle(div,"opacity",opacidade)}}}},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var pol=mapexten,ret=pol.split(" "),sw=new google.maps.LatLng(ret[1],ret[0]),ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+=" <span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, this.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, this.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, this.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, this.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)"}i=$i(i3GEO.Interface.IDCORPO);if(i){i3GeoMap3d=document.createElement("div");i3GeoMap3d.style.width=w+"px";i3GeoMap3d.style.height=h+"px";i.style.height=h;i3GeoMap3d.id="i3GeoMap3d";i3GeoMap3d.style.zIndex=0;i.appendChild(i3GeoMap3d)}google.load("earth","1")},inicia:function(){google.earth.createInstance("i3GeoMap3d",i3GEO.Interface.googleearth.iniciaGE,i3GEO.Interface.googleearth.falha)},iniciaGE:function(object){var montaMapa=function(retorno){i3GeoMap=object;i3GeoMap.getWindow().setVisibility(true);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.Interface.googleearth.criaLayers();var options=i3GeoMap.getOptions(),layerRoot=i3GeoMap.getLayerRoot();options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled);options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility);options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility);options.setScaleLegendVisibility(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility);options.setAtmosphereVisibility(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility);options.setGridVisibility(i3GEO.Interface.googleearth.GADGETS.setGridVisibility);layerRoot.enableLayerById(i3GeoMap.LAYER_BORDERS,i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS);layerRoot.enableLayerById(i3GeoMap.LAYER_BUILDINGS,i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS);layerRoot.enableLayerById(i3GeoMap.LAYER_ROADS,i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS);layerRoot.enableLayerById(i3GeoMap.LAYER_TERRAIN,i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN);i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun);i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW);i3GEO.Interface.googleearth.POSICAOTELA=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO));i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googleearth.adicionaListaKml()}i3GEO.Interface.googleearth.registraEventos();if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googleearth.adicionaKml(true,i3GEO.parametros.kmlurl,i3GEO.parametros.kmlurl,false)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}};i3GEO.php.googleearth(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice,layer;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice===false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=0,i=0;if(n>0){for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice}else{return false}},aplicaOpacidade:function(opacidade){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),i;for(i=0;i<n;i++){i3GeoMap.getFeatures().getChildNodes().item(i).setOpacity(opacidade)}},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar()});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","","Ferramentas","i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div> ';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+=" <span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}}; | |
358 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.mapa={AUTORESIZE:false,GEOXML:[],insereDobraPagina:function(tipo,imagem){var novoel=$i("i3GEOdobraPagina");if(!novoel){novoel=document.createElement("img")}novoel.src=imagem;novoel.id="i3GEOdobraPagina";if(tipo==="googlemaps"){novoel.onclick=function(){i3GEO.Interface.atual2gm.inicia()}}if(tipo==="openlayers"){novoel.onclick=function(){i3GEO.Interface.atual2ol.inicia()}}novoel.style.cursor="pointer";novoel.style.position="absolute";novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.zIndex="50000";novoel.style.left=i3GEO.parametros.w-35+"px";YAHOO.util.Event.addListener(novoel,"click",YAHOO.util.Event.stopPropagation);$i(i3GEO.Interface.IDMAPA).appendChild(novoel)},reposicionaDobraPagina:function(){var novoel=$i("i3GEOdobraPagina");if(!novoel){return}novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.left=i3GEO.parametros.w-35+"px"},ativaAutoResize:function(){window.onresize=function(){var Dw,Dh,r=false;Dw=YAHOO.util.Dom.getViewportWidth();Dh=YAHOO.util.Dom.getViewportHeight();if(Math.abs(Dw-i3GEO.tamanhodoc[0])>50){r=true}if(Math.abs(Dh-i3GEO.tamanhodoc[1])>50){r=true}if(r===false){return}i3GEO.tamanhodoc=[Dw,Dh];setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.reposiciona()}else{i3GEO.guias.ajustaAltura()}i3GEO.mapa.reposicionaDobraPagina()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(codigo){if(codigo===""){return}if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")}},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert($trad("x21"));return}i3GEO.php.ativalogo(i3GEO.atualiza);var cr=$i("i3GEOcopyright");if(cr){if(cr.style.display==="block"){cr.style.display="none"}else{cr.style.display="block"}}},verifica:function(retorno){try{if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:true,ID:"",cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg,temp=function(retorno){var ins,elementos,i,temp,re;re=new RegExp("<img src='' />","g");if(i3GEO.mapa.legendaHTML.ID!==""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!=="erro")&&(retorno.data!==undefined)){ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -45px; top: -22px;">Mostra a legenda em uma janela</p></div>'}temp=retorno.data.legenda;temp=temp.replace(re,"");ins+="<div id='corpoLegi' >"+temp+"</div>";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;i<elementos.length;i+=1){elementos[i].style.display="none"}}};if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}idleg=$i("wlegenda");if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},libera:function(){var temp=function(retorno){var novoel,temp,n,i,janela;if(!$i("moveLegi")){novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";temp='<div class="hd" >Legenda</div>';temp+='<div id="wlegenda" style="display:block;padding:5px 2px 5px 0px;text-align:left;background-color:white;height:300px;width:300px;overflow:auto" ></div>';novoel.innerHTML=temp;document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("moveLegi",{width:"302px",fixedcenter:true,constraintoviewport:false,underlay:"shadow",close:true,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();novoel.onmouseover=function(){if($i("moveLegi").style.display==="block"){YAHOO.util.Dom.setStyle("moveLegi","opacity",1)}};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle("moveLegi","opacity",0.20)}}else{janela=YAHOO.i3GEO.janela.manager.find("moveLegi")}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i<n;i+=1){temp[i].style.display="none"}janela.show()};i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{animacao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.animacao()","animacao","animacao")},opacidade:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()","opacidademapa","opacidademapa")},telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' > </a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var pos,temp,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span style='text-decoration:underline;text-align:left;font-size:9pt'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "&&ds[0]&&ds[0]!=" "){try{nds=ds.length;for(s=0;s<nds;s+=1){for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}ins+="<nl>";mostra=true}else{ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+valor+"</span><br>";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; | |
359 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.tema={TEMPORIZADORESID:{},exclui:function(tema){g_operacao="excluitema";var p;try{p=document.getElementById("idx"+tema).parentNode.parentNode.parentNode;do{p.removeChild(p.childNodes[0])}while(p.childNodes.length>0);p.parentNode.removeChild(p)}catch(e){}i3GEO.php.excluitema(i3GEO.atualiza,[tema]);i3GEO.mapa.ativaTema("");i3GEO.temaAtivo=""},fonte:function(tema){i3GEO.mapa.ativaTema(tema);window.open(i3GEO.configura.locaplic+"/admin/abrefontemapfile.php?tema="+tema)},sobe:function(tema){i3GEO.mapa.ativaTema(tema);var temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.sobetema(temp,tema)},desce:function(tema){i3GEO.mapa.ativaTema(tema);var temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.descetema(temp,tema)},zoom:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomtema(i3GEO.atualiza,tema)},zoomsel:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomsel(i3GEO.atualiza,tema)},limpasel:function(tema){i3GEO.mapa.ativaTema(tema);g_operacao="limpasel";var temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,tema)};i3GEO.php.limpasel(temp,tema)},mudatransp:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var valor="",temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,idtema)};if($i("tr"+idtema)){valor=$i("tr"+idtema).value}if(valor!==""){i3GEO.php.mudatransp(temp,idtema,valor)}else{alert($trad("x16"))}},invertestatuslegenda:function(idtema){alert($trad("x17"));i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var temp=function(retorno){i3GEO.atualiza(retorno);i3GEO.arvoreDeCamadas.atualiza()};i3GEO.php.invertestatuslegenda(temp,idtema)},alteracorclasse:function(idtema,idclasse,rgb){i3GEO.mapa.ativaTema(idtema);var temp=function(){i3GEO.atualiza();i3GEO.Interface.atualizaTema("",idtema);i3GEO.arvoreDeCamadas.atualizaLegenda(idtema)};i3GEO.php.aplicaCorClasseTema(temp,idtema,idclasse,rgb)},mudanome:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="mudanome";var valor="";if($i("nn"+idtema)){valor=$i("nn"+idtema).value}if(valor!==""){i3GEO.php.mudanome(i3GEO.atualiza,idtema,valor)}else{alert($trad("x18"))}},mostralegendajanela:function(idtema,nome,tipoOperacao){var retorna,janela;if(tipoOperacao==="ativatimer"){mostralegendajanelaTimer=setTimeout("i3GEO.tema.mostralegendajanela('"+idtema+"','"+nome+"','abrejanela')",4000)}if(tipoOperacao==="abrejanela"){try{clearTimeout(mostralegendajanelaTimer)}catch(e){}retorna=function(retorno){$i("janelaLegenda"+idtema+"_corpo").innerHTML=retorno.data.legenda};if(!$i("janelaLegenda"+idtema)){janela=i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false);janela[2].style.textAlign="left";janela[2].style.background="white";janela[2].innerHTML=$trad("o1")}i3GEO.php.criaLegendaHTML(retorna,idtema,"legenda3.htm")}if(tipoOperacao==="desativatimer"){clearTimeout(mostralegendajanelaTimer)}},temporizador:function(idtema,tempo){if(!tempo){tempo=$i("temporizador"+idtema).value}if(tempo!=""&&parseInt(tempo,10)>0){eval('i3GEO.tema.TEMPORIZADORESID.'+idtema+' = {tempo: '+tempo+',idtemporizador: setInterval(function('+idtema+'){if(!$i("arrastar_'+idtema+'")){delete(i3GEO.tema.TEMPORIZADORESID.'+idtema+');return;}i3GEO.Interface.atualizaTema("",idtema);},parseInt('+tempo+',10)*1000)};')}else{try{window.clearInterval(i3GEO.tema.TEMPORIZADORESID[idtema].idtemporizador);delete(i3GEO.tema.TEMPORIZADORESID[idtema])}catch(e){}}},dialogo:{tme:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tme()","tme","tme")},mostraWms:function(tema){i3GEO.janela.mensagemSimples(i3GEO.configura.locaplic+"/ogc.php?tema="+tema,"WMS url")},comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"","","<img src='"+i3GEO.configura.locaplic+"/imagens/player_volta.png' style=cursor:pointer onclick='javascript:history.go(-1)'><span style=position:relative;top:-2px; > "+$trad("x19")+" "+tema+" </span><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js";i3GEO.util.scriptTag(js,"i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}else{i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo)}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' > </a>")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}}; | |
360 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.analise={dialogo:{graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},linhaDoTempo:function(){i3GEO.janela.cria("450px","300px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' > </a>");atualizaLinhaDoTempo=function(){var doc="";try{if(navn){if($i("wdocai")){doc=$i("wdocai").contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){i3GEO.parametros.r==="nao"?alert($trad("x22")):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="1px"}g_tipoacao="mede"}else{if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.richdraw.fecha()}var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='<div class="hd" style="font-size:11px"> Distância aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" > </a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td> </td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td> Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td> <input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:"330px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeDistancia.fechaJanela)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","");janela=YAHOO.i3GEO.janela.manager.find("mostradistancia")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1]);if(navm&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var janela;i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostradistancia");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},clique:function(){var n,d,decimal,dd;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> "+$trad("x23")+" (DMS)= "+r;texto+="<br>"+$trad("x24")+": "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};var x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;g_areapixel<0?alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >Área aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" > </a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostraarea",{width:"220px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeArea.fechaJanela)}else{janela=YAHOO.i3GEO.janela.manager.find("mostraarea")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1])},fechaJanela:function(){var janela;i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostraarea");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},clique:function(){var n,m;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{if(navn){pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1)}}catch(men){}m=i3GEO.calculo.area(pontosdistobj,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}}; | |
361 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.maparef={fatorZoomDinamico:-3,SELETORTIPO:true,PERMITEFECHAR:true,PERMITEDESLOCAR:true,TRANSICAOSUAVE:false,OPACIDADE:65,TOP:4,RIGHT:20,inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef,janela;if($i("i3geo_winRef")){janela=YAHOO.i3GEO.janela.manager.find("i3geo_winRef");janela.show();janela.bringToTop();return}if(navm){i3GEO.maparef.TRANSICAOSUAVE=false}if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='<div class="hd" style="text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">';ins+='<span id=maparefmaismenosZoom style=display:none > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> ";if(this.SELETORTIPO){ins+="<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>";ins+="<option value='fixo' select >fixo</option>";ins+="<option value='mapa' >mapa</option>";ins+="<option value='dinamico' >dinâmico</option>";ins+="</select>"}ins+="</div>"}ins+='<div class="bd" style="border:1px solid black;text-align:left;padding:3px;height: 150px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;display:none" onload="javascript:this.style.display = \'block\'" id="imagemReferencia" src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;if(i3GEO.maparef.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100);novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100)}}document.body.appendChild(novoel)}if($i("i3geo_winRef").style.display!=="block"){$i("i3geo_winRef").style.display="block";this.PERMITEDESLOCAR?temp="shadow":temp="none";janela=new YAHOO.widget.Panel("i3geo_winRef",{height:"177px",width:"156px",fixedcenter:false,constraintoviewport:true,underlay:temp,close:i3GEO.maparef.PERMITEFECHAR,visible:true,draggable:i3GEO.maparef.PERMITEDESLOCAR,modal:false,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);if(i3GEO.maparef.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.render();janela.show();try{janela.header.style.height="20px"}catch(e){};r=$i("i3geo_winRef_c");if(r){r.style.clip="rect(0px, 160px, 185px, 0px)";r.style.position="absolute"}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));$i("mapaReferencia").style.height="150px";$i("i3geo_winRef").style.border="1px solid gray";moveX=pos[0]+i3GEO.parametros.w+153-i3GEO.maparef.RIGHT-300;moveY=pos[1]+i3GEO.maparef.TOP;if(i3GEO.Interface.ATUAL==="googlemaps"){moveY+=30}janela.moveTo(moveX,moveY);escondeRef=function(){YAHOO.util.Event.removeListener(janela.close,"click");$i("imagemReferencia").src="";janela.destroy();i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none")};YAHOO.util.Event.addListener(janela.close,"click",escondeRef);i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block");if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",temp)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width="156px"}},atualiza:function(forca){if(arguments.length===0){forca=false}var tiporef,temp,re;temp=$i("refDinamico")?tiporef=$i("refDinamico").value:tiporef="fixo";if($i("mapaReferencia")){temp=$i("maparefmaismenosZoom");if(tiporef==="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}if(tiporef==="fixo"){if(i3GEO.parametros.utilizacgi.toLowerCase()!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference')}}if(tiporef==="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}}else{i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.maparef.atualiza()")}},processaImagem:function(retorno){var m,box,temp,tiporef="fixo";if((retorno.data!=="erro")&&(retorno.data!==undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;temp=$i("imagemReferencia");if(temp){m=new Image();m.src=refimagem;temp.src=m.src}temp=$i("refDinamico");if(temp){tiporef=temp.value}if(tiporef!=="fixo"){box=$i("boxref");if(box){box.style.display="none"}return}i3GEO.maparef.atualizaBox()}},atualizaBox:function(){var box=i3GEO.maparef.criaBox(),w;i3GEO.calculo.ext2rect("boxref",i3GEO.parametros.extentref,i3GEO.parametros.mapexten,i3GEO.parametros.celularef,$i("mapaReferencia"));w=parseInt(box.style.width,10);if(w>120){box.style.display="none";return}box.style.display="block";box.style.top=parseInt(box.style.top,10)+4+"px";box.style.left=parseInt(box.style.left,10)+4+"px";if(w<3){box.style.width="3px";box.style.height="3px"}},criaBox:function(){var box=$i("boxref");if(!box){novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.cursor="move";novoel.style.backgroundColor="RGB(120,220,220)";novoel.style.borderWidth="3px";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=0.4}$i("mapaReferencia").appendChild(novoel);boxrefdd=new YAHOO.util.DD("boxref");novoel.onmouseup=function(){var rect,telaminx,telamaxx,telaminy,m,x,ext;rect=$i("boxref");telaminx=parseInt(rect.style.left,10);telamaxy=parseInt(rect.style.top,10);telamaxx=telaminx+parseInt(rect.style.width,10);telaminy=telamaxy+parseInt(rect.style.height,10);m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)};return novoel}else{return box}},click:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(objposicaocursor.ddx,objposicaocursor.ddy);return}try{i3GEO.php.pan(i3GEO.atualiza,i3GEO.parametros.mapscale,"ref",objposicaocursor.refx,objposicaocursor.refy)}catch(e){i3GEO.janela.fechaAguarde("i3GEO.atualiza")}}}; | |
362 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.ajuda={ATIVAJANELA:true,DIVAJUDA:"i3geo_ajuda",DIVLETREIRO:"i3geo_letreiro",MENSAGEMPADRAO:$trad("p1"),TRANSICAOSUAVE:true,OPACIDADE:20,abreDoc:function(url){if(!url){url="/documentacao/index.html"}window.open(i3GEO.configura.locaplic+url)},abreJanela:function(){try{var nx,ny,corpo,texto,janela,temp,largura=262,YU=YAHOO.util,pos=[20,i3GEO.parametros.h/2];if(this.ATIVAJANELA===false){return}temp=$i("contemFerramentas");if(temp){largura=parseInt(temp.style.width,10)-5}if(!$i("janelaMenTexto")){corpo=$i(i3GEO.Interface.IDCORPO);if(corpo){pos=YU.Dom.getXY(corpo)}else{corpo=$i(i3GEO.Interface.IDMAPA);if(corpo){pos=YU.Dom.getXY(corpo)}}nx=pos[0]-largura-3;ny=i3GEO.parametros.h-78;texto='<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>';if(nx<0){nx=10;ny=ny-50}janela=i3GEO.janela.cria(largura-3,"auto","",nx,ny," ","i3geo_janelaMensagens",false,"hd","","",true);janela[2].innerHTML=texto;YU.Event.addListener(janela[0].close,"click",i3GEO.ajuda.fechaJanela);this.ativaCookie()}}catch(e){}},ativaCookie:function(){var i=i3GEO.util.insereCookie;i("g_janelaMen","sim");i("botoesAjuda","sim")},ativaLetreiro:function(mensagem){var l;if($i(i3GEO.ajuda.DIVLETREIRO)){if(arguments.length===0){mensagem=i3GEO.parametros.mensagens}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.ajuda.ativaLetreiro()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.ajuda.ativaLetreiro()")}try{clearTimeout(i3GEO.ajuda.tempoLetreiro)}catch(e){i3GEO.ajuda.tempoLetreiro=""}l=$i(i3GEO.ajuda.DIVLETREIRO);if(l.style.display==="none"){return}l.style.cursor="pointer";if(mensagem===""){l.value="";return}if(l.size===1){l.size=i3GEO.parametros.w/8}BMessage=mensagem+" ---Clique para parar--- ";l.onclick=function(){l.style.display="none"};if(BMessage!==" ---Clique para parar--- "){BQuantas=0;BSize=l.size;BPos=BSize;BSpeed=1;BSpaces="";i3GEO.ajuda.mostraLetreiro()}i3GEO.ajuda.mostraLetreiro(mensagem)}},desativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","nao")},fechaJanela:function(){i3GEO.ajuda.desativaCookie();i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body)},mostraJanela:function(texto){var j=$i(this.DIVAJUDA),k=$i("janelaMenTexto"),jm=$i("i3geo_janelaMensagens"),Dom=YAHOO.util.Dom,h=parseInt(Dom.getStyle(jm,"height"),10);if(j){j.innerHTML=texto===""?"-":texto}else{if(h){Dom.setY("i3geo_janelaMensagens",Dom.getY(jm)+h)}if(k){k.innerHTML=texto}if(this.TRANSICAOSUAVE){texto!==""?Dom.setStyle(jm,"opacity","1"):Dom.setStyle(jm,"opacity",(this.OPACIDADE/100))}h=parseInt(Dom.getStyle(jm,"height"),10);if(h){Dom.setY(jm,Dom.getY(jm)-h)}}},mostraLetreiro:function(){for(var count=0;count<BPos;count+=1){BSpaces+=" "}if(BPos<1){$i(i3GEO.ajuda.DIVLETREIRO).value=BMessage.substring(Math.abs(BPos),BMessage.length);if(BPos+BMessage.length<1){BPos=BSize;BQuantas=BQuantas+1}}else{$i(i3GEO.ajuda.DIVLETREIRO).value=BSpaces+BMessage}BPos-=BSpeed;if(BQuantas<2){i3GEO.ajuda.tempoLetreiro=setTimeout(function(){i3GEO.ajuda.mostraLetreiro()},140)}},redesSociais:function(){i3GEO.janela.cria("400px","400px",i3GEO.configura.locaplic+"/ferramentas/redessociais/index.php","","",$trad("u5c"),YAHOO.util.Dom.generateId(null,"redes"))}}; | |
363 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}YAHOO.namespace("i3GEO.janela");YAHOO.i3GEO.janela.manager=new YAHOO.widget.OverlayManager();YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();YAHOO.i3GEO.janela.managerAguarde=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 2px 5px 2px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,OPACIDADEAGUARDE:50,TIPS:[],ULTIMOZINDEX:0,prepara:function(){var iu=i3GEO.util;iu.escondePin();iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza){if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}var i,wlargurA,ins,novoel,wdocaiframe,temp,fix,underlay,ifr,janela;if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(!classe||classe==""){classe="hd"}if(!id||id===""){id="wdoca"}if(!modal||modal===""){modal=false}ifr=false;if(i3GEO.Interface&&i3GEO.Interface.ATUAL==="googleearth"){i3GEO.janela.TRANSICAOSUAVE=false;ifr=true}fix=false;if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}temp=navm?0:2;wlargurA=parseInt(wlargura,10)+temp+"px";ins='<div id="'+id+'_cabecalho" class="'+classe+'" style="background-color:white;">';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' style='z-index:2;position:absolute;left:3px;top:2px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"}ins+="<span style='font-size:10px;'>"+texto+"</span>";if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12+"px";temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)+"px"}$i(id+'_corpo').style.width=parseInt(wlargura,10)+"px"}if(waltura==="auto"){janela=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:"none",fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{janela=new YAHOO.widget.ResizePanel(id,{hideMode:'offsets',iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}if(nx!==""&&nx!=="center"){janela.moveTo(nx,ny+50)}YAHOO.i3GEO.janela.manager.register(janela);if(this.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.cfg.setProperty("zIndex",[10000]);janela.render();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}if(ifr===true){janela.iframe.style.zIndex=0}temp=$i(id+"_corpo");if(temp){if(navm){temp.style.paddingRight="0px"}temp.style.width=parseInt(temp.style.width,10)-2+"px"}if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(janela.close,"click",i3GEO.janela.fecha,janela,{id:id},true);return([janela,$i(id+"_cabecalho"),$i(id+"_corpo")])},minimiza:function(id){var temp=$i(id+"_corpo"),n,i,m=YAHOO.i3GEO.janela.manager.find(id);if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe}}else{temp.style.display="block";if(m){m.showIframe}}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}},fecha:function(event,args){var i,id;i3GEO.util.escondePin();i3GEO.util.escondeBox();if(i3GEO.janela.ANTESFECHA){for(i=0;i<i3GEO.janela.ANTESFECHA.length;i++){eval(i3GEO.janela.ANTESFECHA[i])}}if(i3GEO.janela.id){id=i3GEO.janela.id}else{id=event.id}if(id==undefined){id=args.id}i3GEO.janela.destroi(id)},destroi:function(id){var janela=YAHOO.i3GEO.janela.manager.find(id);i3GEO.util.removeScriptTag(id+"_script");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w+"px";i.style.height=h+"px"}},abreAguarde:function(id,texto){var pos,temp,janela;if(!id||id==undefined){return}janela=YAHOO.i3GEO.janela.managerAguarde.find(id);pos=[0,0];if($i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(i3GEO.janela.AGUARDEMODAL==true){texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>"}if(!janela){janela=new YAHOO.widget.Panel(id,{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:i3GEO.janela.AGUARDEMODAL,monitorresize:false});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){janela.setBody(texto);janela.body.style.padding="5px"}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){janela.setHeader("<span><img id=aguardeGifAberto src='"+i3GEO.configura.locaplic+"/imagens/aguarde.gif' /></span> <span style=font-size:8px >"+YAHOO.i3GEO.janela.managerAguarde.overlays.length+"</span>")}if(i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();try{janela.header.style.height="20px"}catch(e){}temp=$i(id+"_c");if(temp){temp.style.backgroundColor=""}YAHOO.util.Dom.setStyle(temp,"opacity",i3GEO.janela.OPACIDADEAGUARDE/100)},fechaAguarde:function(id){if(id!=undefined){var janela=YAHOO.i3GEO.janela.managerAguarde.find(id);if(janela){YAHOO.i3GEO.janela.managerAguarde.remove(janela);janela.destroy()}}},ativaAlerta:function(){YAHOO.namespace("i3GEO.janela.dialogInfo");YAHOO.i3GEO.janela.dialogInfo=new YAHOO.widget.SimpleDialog("simpledialog1",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:"fecha",handler:function(){this.hide()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.i3GEO.janela.manager.register(YAHOO.i3GEO.janela.dialogInfo);YAHOO.i3GEO.janela.dialogInfo.setHeader("Alerta");YAHOO.i3GEO.janela.dialogInfo.render(document.body);window.alert=function(texto){YAHOO.i3GEO.janela.dialogInfo.cfg.setProperty("text",texto);YAHOO.i3GEO.janela.dialogInfo.show()}},mensagemSimples:function(texto,cabecalho){var janela;if($i("mensagemSimples1")){janela=YAHOO.i3GEO.janela.manager.find("mensagemSimples1")}else{janela=new YAHOO.widget.SimpleDialog("mensagemSimples1",{width:"300px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""});YAHOO.i3GEO.janela.manager.register(janela);janela.setHeader(cabecalho);janela.render(document.body)}janela.setHeader(cabecalho);janela.cfg.setProperty("text",texto);janela.show()},tip:function(cabecalho){var Nid,i,novoel,res;if(arguments.length===0){cabecalho="fixar"}Nid=YAHOO.util.Dom.generateId();i=$i("i3geo_rosa");if(i){i.style.display="none"}if($i(i3GEO.Interface.IDCORPO)){$i("img").title=""}novoel=document.createElement("div");novoel.id=Nid;novoel.style.position="absolute";novoel.style.zIndex=5000;novoel.style.textAlign="left";novoel.style.background="white";if(navm){novoel.style.filter="alpha(opacity=90)"}else{novoel.style.opacity=".9"}document.body.appendChild(novoel);i3GEO.janela.TIPS.push($i(Nid));res="<div id='"+Nid+"cabecatip' style='text-align:left;background-color:rgb(240,240,240)'>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:$i(\""+Nid+"cabecatip\").innerHTML =\"\";' >"+cabecalho+"</span></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9+"px";ist.left=objposicaocursor.telax-5+"px";ist.display="block";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.excluiTips('todos')")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.excluiTips('todos')")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.janela.excluiTips('naofixos')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.janela.excluiTips('naofixos')")}return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,slider="",bg,thumb;janela=i3GEO.janela.cria(230,200,"","","","Opacidade","opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;bg="slider-bg";thumb="slider-thumb";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},comboCabecalhoTemas:function(idDiv,idCombo,ferramenta,tipo){var temp=$i(idDiv);if(temp){temp.innerHTML="";i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var container=$i(idDiv),c;container.innerHTML=retorno.dados;container.style.left="0px";container.styletextAlign="left";c=$i(idCombo);c.style.width="150px";c.style.border="solid #B4B4B4 1px";c.style.top="6px";c.style.left="2px";c.style.position="relative";c.style.fontSize="10px";c.style.color="#686868";if(i3GEO.temaAtivo!==""){c.value=i3GEO.temaAtivo}if(i3GEOF[ferramenta].tema){c.value=i3GEOF[ferramenta].tema}if(c.value===""){i3GEOF[ferramenta].tema="";$i("i3GEOF."+ferramenta+"_corpo").innerHTML=""}c.onchange=function(){var valor=$i(idCombo).value;if(valor!==""){i3GEO.mapa.ativaTema(valor);i3GEOF[ferramenta].tema=valor;$i("i3GEOF."+ferramenta+"_corpo").innerHTML="";eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');")}}},temp.id,"",false,tipo)}temp="i3GEO.janela.comboCabecalhoTemas('"+idDiv+"','"+idCombo+"','"+ferramenta+"','"+tipo+"')";if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(temp)<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push(temp)}}};try{YAHOO.widget.ResizePanel=function(el,userConfig){if(arguments.length>0){YAHOO.widget.ResizePanel.superclass.constructor.call(this,el,userConfig)}};YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE="yui-resizepanel";YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE="resizehandle";YAHOO.extend(YAHOO.widget.ResizePanel,YAHOO.widget.Panel,{init:function(el,userConfig){YAHOO.widget.ResizePanel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.ResizePanel);var Dom=YAHOO.util.Dom,oInnerElement=this.innerElement,oResizeHandle=document.createElement("DIV"),sResizeHandleId=this.id+"_resizehandle";oResizeHandle.id=sResizeHandleId;oResizeHandle.className=YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE;Dom.addClass(oInnerElement,YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE);this.resizeHandle=oResizeHandle;function initResizeFunctionality(){var me=this,oHeader=this.header,oBody=this.body,oFooter=this.footer,nStartWidth,nStartHeight,aStartPos=0,nBodyBorderTopWidth,nBodyBorderBottomWidth,nBodyTopPadding,nBodyBottomPadding,nBodyOffset=0;oInnerElement.appendChild(oResizeHandle);this.ddResize=new YAHOO.util.DragDrop(sResizeHandleId,this.id);this.ddResize.setHandleElId(sResizeHandleId);this.ddResize.onMouseDown=function(e){nStartWidth=oInnerElement.offsetWidth;nStartHeight=oInnerElement.offsetHeight;if(YAHOO.env.ua.ie&&document.compatMode==="BackCompat"){nBodyOffset=0}else{nBodyBorderTopWidth=parseInt(Dom.getStyle(oBody,"borderTopWidth"),10);nBodyBorderBottomWidth=parseInt(Dom.getStyle(oBody,"borderBottomWidth"),10);nBodyTopPadding=parseInt(Dom.getStyle(oBody,"paddingTop"),10);nBodyBottomPadding=parseInt(Dom.getStyle(oBody,"paddingBottom"),10);nBodyOffset=nBodyBorderTopWidth+nBodyBorderBottomWidth+nBodyTopPadding+nBodyBottomPadding}me.cfg.setProperty("width",nStartWidth+"px");aStartPos=[Event.getPageX(e),Event.getPageY(e)]};this.ddResize.onDrag=function(e){var aNewPos=[Event.getPageX(e),Event.getPageY(e)],nOffsetX=aNewPos[0]-aStartPos[0],nOffsetY=aNewPos[1]-aStartPos[1],nNewWidth=Math.max(nStartWidth+nOffsetX,10),nNewHeight=Math.max(nStartHeight+nOffsetY,10),nBodyHeight=(nNewHeight-(oFooter.offsetHeight+oHeader.offsetHeight+nBodyOffset));me.cfg.setProperty("width",nNewWidth+"px");oBody.style.width=nNewWidth-4+"px";if(nBodyHeight<0){nBodyHeight=0}oBody.style.height=nBodyHeight+"px";if($i("wdocai")){$i("wdocai").style.height=nBodyHeight+"px";$i("wdocai").style.width=oBody.style.width+"px"}};this.ddResize.onMouseUp=this.ddResize.onDrag.call()}function onBeforeShow(){initResizeFunctionality.call(this);this.unsubscribe("beforeShow",onBeforeShow)}function onBeforeRender(){if(!this.footer){this.setFooter("")}if(this.cfg.getProperty("visible")){initResizeFunctionality.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}this.unsubscribe("beforeRender",onBeforeRender)}this.subscribe("beforeRender",onBeforeRender);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.initEvent.fire(YAHOO.widget.ResizePanel)},toString:function(){return"ResizePanel "+this.id}})}catch(e){} | |
364 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/gisicons/show-layers.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/gisicons/show-catalog.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/gisicons/show-legend.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",click:function(){var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp;ins="<br><div id='banners' style='overflow:auto;text-align:left'>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div><a href='"+link+"'><img src='"+temp.IMAGEM+"'></a></div><br>";ins+="<div><p style=text-align:center >"+nome+"</p></div><br>";ig1++}while(ig1<ig1lt)}$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML=ins+"</div>"};$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde...";i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas)}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){guia.style.height=altura+"px"}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]}},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px";if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";temp.left=config.larguraPuxador+"px";temp.width="0px";temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px";temp=$i("i3GEOguiaMovelIcones").style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";temp.top="38px";temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.20);if($i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL);if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.abreFecha()}},mostraIcones:function(){if($i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="";if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ins+="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;;' /></button>"}}$i("i3GEOguiaMovelIcones").innerHTML=ins;i3GEO.guias.guiaMovel.desativaIcones();if($i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id)){$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.backgroundColor="#cedff2";$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.boxShadow="none"}},desativaIcones:function(){var ims=$i("i3GEOguiaMovelIcones").getElementsByTagName("button"),n=ims.length,i;for(i=0;i<n;i++){ims[i].style.backgroundColor="white";ims[i].style.boxShadow=""}},ativa:function(chave){if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.escondeGuias();i3GEO.guias.mostra(chave);i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.desativaIcones();if($i(i3GEO.guias.CONFIGURA[chave].id)){$i(i3GEO.guias.CONFIGURA[chave].id).parentNode.style.backgroundColor="#cedff2";$i(i3GEO.guias.CONFIGURA[chave].id).parentNode.style.boxShadow="none"}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;$i("i3GEOguiaMovelIcones").style.display="none";$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1;if(molde.style.display==="block"){$i("i3GEOguiaMovelIcones").style.display="none";$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim.animate();anim1.animate();anim1.onComplete.subscribe(function(){molde.style.display="none"})}else{molde.style.display="block";attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){$i("i3GEOguiaMovelIcones").style.display="block";$i("i3GEOguiaMovelConteudo").style.display="block";i3GEO.guias.guiaMovel.mostraIcones();YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});anim.animate();anim1.animate()}}}}; | |
365 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeCamadas={BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:true,finaliza:"",EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:true,ANIMAMAPA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true},CAMADAS:"",CAMADASINICIAIS:"",ARVORE:null,IDHTML:"listaTemas",SID:null,LOCAPLIC:null,ATIVATEMA:"",cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=(i3GEO.parametros.w/2)-75+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){eval(i3GEO.arvoreDeCamadas.finaliza)}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,newVal,root,tempNode,titulo,d,c,ltema,temaNode,i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("a7")+"</b></td><td>";titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode);estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:noGrupo,expanded:d},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var ins="",imb=i3GEO.util.$im("branco.gif"),estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(this.ARRASTARLIXEIRA===true){ins+="<img "+estilo("i3geo_lixeira")+" onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='"+$trad("t2")+"' />"}if(this.FILTRAR===true){ins+="<img "+estilo("i3geo_filtro")+" onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' />"}if(this.ABRELEGENDA===true){ins+="<img "+estilo("soltaleg2")+" onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' />"}if(this.ALTERAOPACIDADE===true){ins+="<img "+estilo("opacidadeMapa")+" onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='"+$trad("t20")+"' />"}if(this.ANIMAMAPA===true&&(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps")){ins+="<img "+estilo("animaMapa")+" onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='"+$trad("p21")+"' />"}if(this.LIGARDESLIGARTODOS===true){ins+=" <img "+estilo("olhoAberto")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' />";ins+=" <img "+estilo("olhoFechado")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' />"}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick.call()}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var opcoesNode,idtema,ltema,farol,mfarol,tnome="",imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+=" <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+=" <img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+=" <img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+=" <img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.fonte===true){tnome+=" <img class='fonte' src='"+imb+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(funcoes.zoomtema===true)){tnome+=" <img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node);if(funcoes.compartilhar===true&<ema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:false,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&<ema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;if(funcoes.opacidade===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+" <a class='tic' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+" <a class='tic' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","8","")+" <a class='tic' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' href='#' />"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","10","")+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if((ltema.type<4||ltema.type===8)&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&<ema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&<ema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&<ema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}if(funcoes.tme===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t49"),$trad("t49"),'i3GEO.tema.dialogo.tme(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar){desativar=original.data.desativar;nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.configura.templateLegenda!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.configura.templateLegenda)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name)};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:top;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' >";estilo=navm?"cursor:pointer;vertical-align:15%;":"cursor:pointer;";html+="<input class=inputsb style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:20%;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img style='"+estilo+"' src='"+tema.iconetema+"' />"}if(tema.contextoescala.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+=" <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:20%;color:black;";if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA){html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};try{clearTimeout(tempoBotaoAplicar)}catch(erro){}tempoBotaoAplicar="";if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(idtema,camadas){var i;if(!camadas){camadas=i3GEO.arvoreDeCamadas.CAMADAS}i=camadas.length;while(i>0){i-=1;if(camadas[i].name===idtema){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}if(operador==="menor"){if(temp<valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; | |
366 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.navega={TEMPONAVEGAR:600,FATORZOOM:2,timerNavega:null,centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.aproxima(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.afasta(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.zoomponto(i3GEO.atualiza,"+x+","+y+","+tamanho+",'"+simbolo+"','"+cor+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{alert("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.mudaext(i3GEO.atualiza,'"+tipoimagem+"','"+ext+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},aplicaEscala:function(locaplic,sid,escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true)}},panFixo:function(locaplic,sid,direcao,w,h,escala){var x=0,y=0,f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(w===""){w=i3GEO.parametros.w}if(h===""){h=i3GEO.parametros.h}if(escala===""){escala=i3GEO.parametros.mapscale}switch(direcao){case"norte":y=h/6;x=w/2;break;case"sul":y=h-(h/6);x=w/2;break;case"leste":x=w-(w/6);y=h/2;break;case"oeste":x=w/6;y=h/2;break;case"nordeste":y=h/6;x=w-(w/6);break;case"sudeste":y=h-(h/6);x=w-(w/6);break;case"noroeste":y=h/6;x=w/6;break;case"sudoeste":y=h-(h/6);x=w/6;break}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.pan(x,y);return}f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.pan(i3GEO.atualiza,"+escala+",'',"+x+","+y+");";try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},panFixoNorte:function(){i3GEO.navega.panFixo('','','norte','','','')},panFixoSul:function(){i3GEO.navega.panFixo('','','sul','','','')},panFixoOeste:function(){i3GEO.navega.panFixo('','','oeste','','','')},panFixoLeste:function(){i3GEO.navega.panFixo('','','leste','','','')},mostraRosaDosVentos:function(){var novoel,setas,i;try{if(i3GEO.configura.mostraRosaDosVentos==="nao"){return}if(g_tipoacao==="area"){return}}catch(e){}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10||objposicaocursor.imgy>(i3GEO.parametros.h-10)){return}if(!$i("i3geo_rosa")){novoel=document.createElement("div");novoel.id="i3geo_rosa";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navn){novoel.style.opacity=".7"}else{novoel.style.filter="alpha(opacity=70)"}document.body.appendChild(novoel)}setas="<table id='rosaV' >";setas+="<tr onclick=\"javascript:i3GEO.configura.mostraRosaDosVentos='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>";setas+="<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','noroeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','norte','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','nordeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','oeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><table><tr>";setas+="<td><img class='rosamais' title='aproxima' onclick=\"i3GEO.navega.zoomin('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="<td><img class='rosamenos' title='afasta' onclick=\"i3GEO.navega.zoomout('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="</tr></table></td>";setas+="<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','leste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudoeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27+"px";i.style.left=objposicaocursor.telax-27+"px";i.style.display="block";if($i("img")){YAHOO.util.Event.addListener($i("img"),"mousemove",function(){var i=$i("i3geo_rosa");i.style.display="none";YAHOO.util.Event.removeListener(escondeRosa)})}i3GEO.ajuda.mostraJanela('Clique nas pontas da rosa para navegar no mapa. Clique em x para parar de mostrar essa opção.')},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}var i=$i("i3geoboxZoom").style;i.width=0+"px";i.height=0+"px";i.visibility="visible";i.display="block";i.left=objposicaocursor.telax+"px";i.top=objposicaocursor.telay+"px";boxxini=objposicaocursor.telax;boxyini=objposicaocursor.telay;tamanhox=0;tamanhoy=0;if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.zoomBox.desloca()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.zoomBox.desloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}},criaBox:function(){if(i3GEO.navega.timerNavega!==null){return}if(!$i("i3geoboxZoom")){var novoel;novoel=document.createElement("div");novoel.style.width="0px";novoel.style.height="0px";novoel.id="i3geoboxZoom";novoel.style.display="none";novoel.style.fontSize="0px";if(navn){novoel.style.opacity=0.25}novoel.style.backgroundColor="gray";novoel.style.position="absolute";novoel.style.border="2px solid #ff0000";if(navm){novoel.style.filter="alpha(opacity=25)"}novoel.onmousemove=function(){var b,wb,hb;b=$i("i3geoboxZoom").style;wb=parseInt(b.width,10);hb=parseInt(b.height,10);if(navm){if(wb>2){b.width=wb-2+"px"}if(hb>2){b.height=hb-2+"px"}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.navega.zoomBox.termina()};document.body.appendChild(novoel)}},desloca:function(){var bxs,ppx,py;if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}bxs=$i("i3geoboxZoom").style;if(bxs.display!=="block"){return}ppx=objposicaocursor.telax;py=objposicaocursor.telay;if(navm){if((ppx>boxxini)&&((ppx-boxxini-2)>0)){bxs.width=ppx-boxxini-2+"px"}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2+"px"}if(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2+"px"}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2+"px"}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){var valor,v,x1,y1,x2,y2,f,limpa=function(){};if(g_tipoacao!=='zoomli'){i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");return}try{if(i3GEO.navega.timerNavega!==null){return}valor=i3GEO.calculo.rect2ext("i3geoboxZoom",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxZoom");if(bxs){bxs.style.display="none";bxs.style.visibility="hidden";bxs.style.width=0+"px";bxs.style.height=0+"px"}};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.zoomBox.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(v);return}f="i3GEO.navega.timerNavega = null;i3GEO.navega.zoomExt('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','"+i3GEO.configura.tipoimagem+"','"+v+"')";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){limpa.call();return}}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.lente.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.lente.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.lente.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.lente.movimenta()")}},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){alert("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.lente.movimenta()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.lente.atualiza()")},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0 75 75 0)';novoeli=document.createElement("div");novoeli.id="div_di";novoel.appendChild(novoeli);$i("div_di").innerHTML="<p style='position:absolute;top:0px;left:0px'>+-</p>"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(160,0,"","center","center","Feche para parar destaque ","ativadesativaDestaque");YAHOO.util.Event.addListener(janela[0].close,"click",i3GEO.navega.destacaTema.desativa);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.destacaTema.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.destacaTema.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.destacaTema.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()")}},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.destacaTema.atualiza()");i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()");i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+" "+(objposicaocursor.imgx-10)+" "+(objposicaocursor.imgy-10)+" "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+')'}}},barraDeZoom:{cria:function(){var temp="",estilo;if(navn){temp+='<div style="text-align:center;position:relative;left:9px" >'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='<div id="vertMaisZoom" style="'+estilo+'"></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';if(navm){temp+='<div id=vertMenosZoom style="left:-1px;" ></div>'}else{temp+='<div id=vertMenosZoom ></div>'}if(navn){temp+='</div>'}return temp},ativa:function(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w+"px";iclone.style.height=i3GEO.parametros.h+"px";iclone.style.top=corpo.style.top+"px";iclone.style.left=corpo.style.left+"px";$i("img").style.display="none";iclone.style.display="block"}}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousemove=function(){try{var iclone,corpo,nt,nl,velhoh,velhow,nh=0,nw=0,t,l,fatorEscala;iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}nt=0;nl=0;i3geo_ns=parseInt(i3GEO.parametros.mapscale,10);if((g_fatordezoom>0)&&(g_fatordezoom<7)){g_fatordezoom=g_fatordezoom+1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh/g_fatordezoom;nw=velhow/g_fatordezoom;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t+((velhoh-nh)*0.5);nl=l+((velhow-nw)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if((g_fatordezoom<0)&&(g_fatordezoom>-7)){g_fatordezoom=g_fatordezoom-1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh*g_fatordezoom*-1;nw=velhow*g_fatordezoom*-1;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t-((nh-velhoh)*0.5);nl=l-((nw-velhow)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if(iclone){iclone.style.width=nw+"px";iclone.style.height=nh+"px";if(iclone.style.pixelTop){iclone.style.pixelTop=nt}else{iclone.style.top=nt+"px"}if(iclone.style.pixelLeft){iclone.style.pixelLeft=nl}else{iclone.style.left=nl+"px"}}if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3geo_ns}}catch(e){}}}}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}i3GEO.util.criaBox();g_operacao="navega";var idgoogle="googlemaps"+Math.random();i3GEO.janela.cria((i3GEO.parametros.w/2)+25+"px",(i3GEO.parametros.h/2)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>",idgoogle);atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}}; | |
367 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],NAVEGAMAPA:[],MOUSEPARADO:["i3GEO.navega.mostraRosaDosVentos()"],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:[],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(this.TIMERPARADO)}catch(e){this.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(this.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEDOWN)},mouseupMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEUP)},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(this.MOUSECLIQUE)},executaEventos:function(eventos){var f=0;try{if(eventos.length>0){f=eventos.length-1;if(f>=0){do{if(eventos[f]!==""){eval(eventos[f])}}while(f--)}}}catch(e){eventos[f]=""}},posicaoMouseMapa:function(e){var teladd,teladms,container="",targ="",pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;if(!e){e=window.event}try{if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){}if(container!=="divGeometriasTemp"&&container!=="mapaReferencia"){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googlemaps","googleearth","openlayers"])){return}}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id===""&&$i(i3GEO.Interface.IDMAPA)){targ=$i(i3GEO.Interface.IDMAPA)}try{if(g_panM!=='undefined'&&g_panM==="sim"){pos=i3GEO.util.pegaPosicaoObjeto(targ.parentNode)}else{pos=i3GEO.util.pegaPosicaoObjeto(targ)}if(g_panM==="sim"){pos[0]=pos[0]-i3GEO.parametros.w;pos[1]=pos[1]-i3GEO.parametros.h}}catch(m){pos=i3GEO.util.pegaPosicaoObjeto(targ)}mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.pixelsize;ex=i3GEO.parametros.mapexten;try{if(targ.id==="imagemReferencia"){c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;r=$i("i3geo_rosa");if(r){r.style.display="none"}}}catch(e){i3GEO.parametros.celularef=0}teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex,targ.id);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout(function(){i3GEO.eventos.mouseParado()},i3GEO.configura.tempoMouseParado)}catch(e){}try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=true;try{objmapaparado="parar"}catch(e){}};docMapa.onmousedown=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousedownMapa()}};docMapa.onclick=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousecliqueMapa()}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa()}}},botaoDireita:function(exy){try{var k=(navm)?event.button:exy.button;if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){var x,y,doc=document;if(arguments.length===0){ixg="ixg";ixm="ixm";ixs="ixs";iyg="iyg";iym="iym";iys="iys";if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}if(g_tipoacao!=="capturaponto"){return}else{try{if(doc){x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById(ixg)){doc.getElementById(ixg).value=x[0]}if(doc.getElementById(ixm)){doc.getElementById(ixm).value=x[1]}if(doc.getElementById(ixs)){doc.getElementById(ixs).value=x[2]}if(doc.getElementById(iyg)){doc.getElementById(iyg).value=y[0]}if(doc.getElementById(iym)){doc.getElementById(iym).value=y[1]}if(doc.getElementById(iys)){doc.getElementById(iys).value=y[2]}}}catch(m){}}}}; | |
368 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:true,uploadlocal:true,uploadarquivo:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,conectargeojson:true,nuvemTags:true,nuvemTagsFlash:false,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true,carousel:true,inde:true,uploadgpx:true,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true,flutuante:true},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:false,IDSMENUS:[],RETORNAGUIA:"",IDHTML:"arvoreAdicionaTema",LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,flutuante:function(){var janela,temp,cabecalho,minimiza,idold,corpo,altura;cabecalho=function(){};if($i("i3GEOFcatalogo_corpo")){return}minimiza=function(){i3GEO.janela.minimiza("i3GEOFcatalogo")};altura=i3GEO.parametros.w-150;if(altura>500){altura=500}janela=i3GEO.janela.cria("360px",altura+"px","","","",$trad("g1a"),"i3GEOFcatalogo",false,"hd",cabecalho,minimiza);temp=function(){delete(i3GEO.arvoreDeTemas.ARVORE)};YAHOO.util.Event.addListener(janela[0].close,"click",temp,janela[0].panel,{id:janela[0].id},true);corpo=$i("i3GEOFcatalogo_corpo");corpo.style.backgroundColor="white";corpo.innerHTML=$trad("o1");corpo.style.overflow="auto";if($i(i3GEO.arvoreDeTemas.IDHTML)){$i(i3GEO.arvoreDeTemas.IDHTML).innerHTML=""}idold=i3GEO.arvoreDeTemas.IDHTML;delete(i3GEO.arvoreDeTemas.ARVORE);i3GEO.arvoreDeTemas.IDHTML="i3GEOFcatalogo_corpo";i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"");i3GEO.arvoreDeTemas.IDHTML=idold},listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos não definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0,expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,temp;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.arvoreDeTemas.checked=false;i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\")";html+="onclick='javascript:"+adiciona+"' "+" type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >"+layer+" - "+titulo+"</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){var c,m,i,k,jj,j;if(i3GEO.arvoreDeTemas.IDSMENUS.length===0){i3GEO.arvoreDeTemas.MENUS=retorno.data}else{i3GEO.arvoreDeTemas.MENUS=[];c=retorno.data.length;m=i3GEO.arvoreDeTemas.IDSMENUS.length;for(i=0,j=c;i<j;i+=1){for(k=0,jj=m;k<jj;k+=1){if(retorno.data[i].idmenu===i3GEO.arvoreDeTemas.IDSMENUS[k]){i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i])}}}}if(funcao!==""){eval(funcao+"(retorno)")}};i3GEO.php.pegalistademenus(retorno)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data[0];if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var montanos=function(retorno){try{var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight:false},node)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red'>Nada encontrado<br><br></span>",isLeaf:true,expanded:false,enableHighlight:false},node)}}}node.loadComplete()}catch(e){}};i3GEO.php.procurartemasestrela(montanos,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1)},cria:function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes,tipoBotao){if(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.IDHTML)},montaArvore:function(){var tempNode,tempNode1,retorno,root,insp,outrasOpcoes,dados,c,i,j,conteudo,editor;(function(){function changeIconMode(){buildTree()}function buildTree(){i3GEO.arvoreDeTemas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<br><br><table><tr>"+"<td><span style='font-size:12px'> "+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' > </a></span></td>"+"<td><input onclick='javascript:this.select();' class='digitar' type='text' id='i3geo_buscatema' size='15' value='' /></td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table> ";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+" <br>",isLeaf:true,enableHighlight:false,expanded:false,hasIcon:false},root)}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin' target=blank >Sistema de administração</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/arvore.html' target=blank >Editar árvore</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='opção visível apenas para editores' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >Editar menus</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php?tipoxml=kml' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/visual/default/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.flutuante===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='#' onclick='i3GEO.arvoreDeTemas.flutuante()' >Abrir em janela flutuante</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<b> OGC-WMS</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>"+editor,idwms:"raiz",expanded:false,enableHighlight:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<b> "+$trad("t46")+"</b> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' > </a>",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+$im("e"+ig+".png")+"' />",enableHighlight:false,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<b> <span title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<b> <span title='nao publicado' ><s>"+dados[i].nomemenu+"</s></span>"+editor}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu,enableHighlight:false,expanded:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,1);if(dados[i].status==="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"<b>Sistemas</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' > </a>",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<s>"+sis[ig].NOME+"</s>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','Sistemas')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt);if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}}},adicionaNoNavegacaoDir:function(){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){var temp=function(){var drives,iglt,ig,drive,tempNode;drives=i3GEO.arvoreDeTemas.DRIVES;if(drives==undefined||drives==""||drives.length===0){i3GEO.arvoreDeTemas.ARVORE.draw();return}iglt=drives.length;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' > </a>",enableHighlight:false,expanded:false},i3GEO.arvoreDeTemas.ARVORE.getRoot());ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho,enableHighlight:false,expanded:false},tempNode);drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig+=1}while(ig<iglt);i3GEO.arvoreDeTemas.ARVORE.draw()};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,temp)}},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra&&raiz[i].nome!=""){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&grupos[i].nome!=undefined){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' ><s>"+grupos[i].nome+"</s></span>"}}d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos,1);tempNode.isLeaf=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&subgrupos[i].nome!=undefined){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' ><s>"+subgrupos[i].nome+"</s></span>"}}d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaSubGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' ><s>"+temas[i].nome+"</s></span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,conteudo,dirs,tempNode,arquivos;dirs=retorno.data.diretorios;for(ig=0;ig<dirs.length;ig+=1){tempNode=new YAHOO.widget.HTMLNode({html:dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='i3GEO.util.adicionaSHP(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:conteudo,caminho:node.data.caminho+"/"+conteudo},node)}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html,estilo="",clique;if(navm){estilo="padding-top:1px;"}html="<td style='"+estilo+"'><span>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img title='"+tema.tid+"' src='"+$im("down1.gif")+"'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{if(i3GEO.arvoreDeTemas.ATIVATEMAIMEDIATO===false){clique="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeTemas.adicionaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicar\",this)'"}else{clique="onclick='i3GEO.arvoreDeTemas.adicionaTemas([\""+tema.tid+"\"])'"}}html+=clique;if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="</td><td title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='cursor:pointer;font-size:11px;text-align:left;color:"+cor+";padding-left:0px;' "+clique+">";html+=tema.nome;html+="</td></span>";return(html)},propTemas:function(node){var html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >"+$trad("x19")+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface=openlayers_t.htm&temasa="+node.data.idtema+"&layers="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface=openlayers_t.htm&temasa="+node.data.idtema+"&layers="+node.data.idtema;new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>":"<img src='"+i3GEO.util.$im("e0.png")+"'/>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0,imb=i3GEO.util.$im("branco.gif"),OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS,estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(OPCOESADICIONAIS.refresh===true){ins+="<td><img "+estilo("refresh")+" onclick='i3GEO.arvoreDeTemas.atualiza()' title='Refresh'/></td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectaservico()' title='"+$trad("a15")+"'/></td>";t+=20;ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' title='"+$trad("a14")+"'/></td>";t+=20}else{if(OPCOESADICIONAIS.uploadgpx===true){ins+="<td><img "+estilo("uploadgpx")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' title='upload GPX'/></td>";t+=20}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<td><img "+estilo("uploaddbf")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' title='"+$trad("a2b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.uploadlocal===true){ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.upload()' title='"+$trad("a2")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carregaKml===true){ins+="<td><img "+estilo("carregarKml")+" onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' title='Kml'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwms===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' title='"+$trad("a4")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<td><img "+estilo("conectarwmst")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' title='"+$trad("a4b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<td><img "+estilo("conectargeorss")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' title='"+$trad("a5")+"'/></td>";t+=20}}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img "+estilo("download")+" onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' title='"+$trad("a3")+"'/></td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img "+estilo("importarwmc")+" onclick='i3GEO.arvoreDeTemas.dialogo.importarwmc()' title='"+$trad("a3a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img "+estilo("carouselTemas")+" onclick='i3GEO.arvoreDeTemas.dialogo.carouselTemas()' title='Miniaturas'/></td>";t+=20}if(OPCOESADICIONAIS.inde===true){ins+="<td><img "+estilo("buscaInde")+" onclick='i3GEO.arvoreDeTemas.dialogo.buscaInde()' title='Pesquisa na INDE'/></td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk="";if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,html:d,expanded:false},nodePalavra)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,expanded:false,html:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var temp;try{clearTimeout(tempoBotaoAplicar)}catch(e){}tempoBotaoAplicar="";i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length===1&&i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){temp=window.confirm("O tema existe no mapa. Adiciona novamente?");if(!temp){return}}if(tsl.length>0){temp=function(retorno){i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!==i3GEO.guias.ATUAL){i3GEO.guias.escondeGuias();i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.php.adtema(temp,tsl.toString())}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig+=1){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFuploadarquivo")};titulo="Upload de arquivo</a>";janela=i3GEO.janela.cria("250px","150px","","","",titulo,"i3GEOFuploadarquivo",false,"hd",cabecalho,minimiza);$i("i3GEOFuploadarquivo_corpo").style.backgroundColor="white";$i("i3GEOFuploadarquivo_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de arquivo</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.uploadlocal===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.upload()' /></td>"+" <td>Shape file</td>"+" </tr>"}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' /></td>"+" <td>DBF ou CSV</td>"+" </tr>"}if(OPCOESADICIONAIS.uploadgpx===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' /></td>"+" <td>GPX</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadkml()' /></td>"+" <td>KML ou KMZ</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},conectaservico:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFconectaservico")};titulo="Conexão com serviços</a>";janela=i3GEO.janela.cria("260px","150px","","","",titulo,"i3GEOFconectaservico",false,"hd",cabecalho,minimiza);$i("i3GEOFconectaservico_corpo").style.backgroundColor="white";$i("i3GEOFconectaservico_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de conex&aatilde;o</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.carregaKml===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' /></td>"+" <td>KML</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwms===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' /></td>"+" <td>WMS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' /></td>"+" <td>WMS-T</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' /></td>"+" <td>GeoRSS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeojson===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeojson()' /></td>"+" <td>GeoJson</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},carregaKml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carregakml/index.js","i3GEOF.carregakml.criaJanelaFlutuante()","i3GEOF.carregakml_script")},carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},buscaInde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/index.js","i3GEOF.buscainde.criaJanelaFlutuante()","i3GEOF.buscainde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.js","i3GEOF.nuvemtags.criaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","","Nuvem Flash")},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","Diretórios")},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/index.js","i3GEOF.importarwmc.criaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' > </a>")},conectarwmst:function(){var l,a;if(i3GEO.parametros.w){l=i3GEO.parametros.w+150}else{l=400}if(i3GEO.parametros.h){a=i3GEO.parametros.h+200}else{a=350}i3GEO.janela.cria(l/2+"px",a/2+"px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' > </a>")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeojson:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectargeojson/index.js","i3GEOF.conectargeojson.criaJanelaFlutuante()","i3GEOF.conectargeojson_script")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=29' > </a>")},upload:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js","i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")},uploaddbf:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js","i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")},uploadgpx:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadgpx/index.js","i3GEOF.uploadgpx.criaJanelaFlutuante()","i3GEOF.uploadgpx_script")},uploadkml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadkml/index.js","i3GEOF.uploadkml.criaJanelaFlutuante()","i3GEOF.uploadkml_script")}},abrejanelaIframe:function(w,h,s){var janelaeditor=i3GEO.janela.cria(w,h,s,parseInt(Math.random()*100,10),10,s,"janela"+i3GEO.util.randomRGB(),false);YAHOO.util.Event.addListener(janelaeditor[0].close,"click",i3GEO.arvoreDeTemas.atualiza,janelaeditor[0].panel,{id:janelaeditor[0].id},true)}}; | |
369 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.barraDeBotoes={ATIVA:true,TIPO:"yui",OFFSET:-205,MAXBOTOES:11,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{localizar:true,zoomli:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,selecao:true,google:true,barraedicao:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.Interface.ATUAL==="openlayers"){try{i3GEO.Interface.openlayers.OLzoom.deactivate()}catch(e){}}var estilo,temp,ist,cor,ko;this.BOTAOCLICADO=icone;ko=this.LISTABOTOES.length-1;if(this.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(this.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(this.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(this.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(this.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(this.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(this.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){if(i3GEO.barraDeBotoes.ATIVA===false){return}var temp,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43+"px";temp.style.left=posX+18+"px"}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{temp=l[b].iddiv;if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){if(i3GEO.barraDeBotoes.ATIVA===false){return}i3GEO.barraDeBotoes.AJUDA=false;euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(),temp="dockBg-r.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP);if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="dockBg-r2.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-l.png"}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.ATIVAJANELA=true;i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}};if(!$i("euDockMensagem")){temp=document.createElement("div");temp.style.top="38px";temp.style.color="gray";temp.style.textAlign="center";temp.style.fontSize="10px";temp.innerHTML="";temp.id="euDockMensagem";euEnv.euDockArray.euDock_0.div.appendChild(temp)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,e,wj,recuo,novoel,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.i3GEO.janela.botoes=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})}else{YAHOO.i3GEO.janela.botoes=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})}}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","hd2")}},ativaMenuContexto:function(idbarra){if(i3GEO.barraDeBotoes.ATIVA===false){return}var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:" <span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+idbarra;$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){i3GEO.barraDeBotoes.BARRAS[i].show()}}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var i,n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i]&&BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){i3GEO.barraDeBotoes.editor.carregaJs("janelaEditorVetorial")},carregaJs:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js","i3GEO.barraDeBotoes.editor.ativaPainel('"+idjanela+"')","openlayers.js",true)}else{if(!i3GEO.editorOL.layergrafico){i3GEO.editorOL.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="Editor vetorial";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}"}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.editorOL.layergrafico=new OpenLayers.Layer.Vector("Edição",{styleMap:styleMap1,displayInLayerSwitcher:false,visibility:true});i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]);i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}; | |
349 | +i3GEOF=[];YAHOO.namespace("i3GEO");var i3GEO={parametros:{mapexten:"",mapscale:"",mapres:"",pixelsize:"",mapfile:"",cgi:"",extentTotal:"",mapimagem:"",geoip:"",listavisual:"",utilizacgi:"",versaoms:"",versaomscompleta:"",mensagens:"",w:"",h:"",locsistemas:"",locidentifica:"",r:"",locmapas:"",celularef:"",kmlurl:"",mensageminicia:"",interfacePadrao:"openlayers.htm",embedLegenda:"nao",autenticadoopenid:"nao",cordefundo:"",copyright:"",editor:"nao"},scrollerWidth:"",finaliza:"",finalizaAPI:"",tamanhodoc:[],temaAtivo:"",contadorAtualiza:0,cria:function(){if(i3GEO.configura.ajustaDocType===true){i3GEO.util.ajustaDocType()}var temp,tamanho;temp=window.location.href.split("?");if(temp[1]){i3GEO.configura.sid=temp[1];if(i3GEO.configura.sid.split("#")[0]){i3GEO.configura.sid=i3GEO.configura.sid.split("#")[0]}}else{i3GEO.configura.sid=""}if(i3GEO.configura.sid==='undefined'){i3GEO.configura.sid=""}if(i3GEO.Interface.ALTTABLET!=""){if(i3GEO.util.detectaTablet()){return}}if(!i3GEO.configura.locaplic||i3GEO.configura.locaplic===""){i3GEO.util.localizai3GEO()}tamanho=i3GEO.calculaTamanho();i3GEO.Interface.cria(tamanho[0],tamanho[1])},inicia:function(retorno){var montaMapa,mashup,tamanho;if(typeof("i3GEOmantemCompatibilidade")==='function'){i3GEOmantemCompatibilidade()}montaMapa=function(retorno){try{var temp,abreJM;if(retorno===""){alert("Ocorreu um erro no mapa - montaMapa");retorno={data:{erro:"erro"}}}if(retorno.data.erro){document.body.style.backgroundColor="white";document.body.innerHTML="<br>Para abrir o i3Geo utilize o link:<br><a href="+i3GEO.configura.locaplic+"/ms_criamapa.php >"+i3GEO.configura.locaplic+"/ms_criamapa.php</a>";return("linkquebrado")}else{if(retorno.data.variaveis){i3GEO.parametros=retorno.data.variaveis;i3GEO.parametros.mapscale=i3GEO.parametros.mapscale*1;i3GEO.parametros.mapres=i3GEO.parametros.mapres*1;i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*1;i3GEO.parametros.w=i3GEO.parametros.w*1;i3GEO.parametros.h=i3GEO.parametros.h*1;i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;if(retorno.data.variaveis.navegacaoDir.toLowerCase()==="sim"){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir=true}temp=0;if($i("contemFerramentas")){temp=temp+parseInt($i("contemFerramentas").style.width,10)}if($i("ferramentas")){temp=temp+parseInt($i("ferramentas").style.width,10)}if($i("mst")){$i("mst").style.width=i3GEO.parametros.w+temp+"px"}i3GEO.Interface.inicia()}else{alert("Erro. Impossivel criar o mapa "+retorno.data);return}if($i("ajuda")){i3GEO.ajuda.DIVAJUDA="ajuda"}abreJM="sim";if(i3GEO.util.pegaCookie("botoesAjuda")){abreJM=i3GEO.util.pegaCookie("botoesAjuda");i3GEO.barraDeBotoes.AJUDA=(abreJM==="sim")?true:false}if(i3GEO.configura.iniciaJanelaMensagens===true){i3GEO.ajuda.abreJanela()}if(i3GEO.configura.liberaGuias.toLowerCase()==="sim"){i3GEO.guias.libera()}}i3GEO.aposIniciar()}catch(e){}};if(!$i("i3geo")){document.body.id="i3geo"}$i("i3geo").className="yui-skin-sam";if(i3GEO.configura.sid===""){mashup=function(retorno){i3GEO.configura.sid=retorno.data;i3GEO.inicia(retorno)};i3GEO.configura.mashuppar+="&interface="+i3GEO.Interface.ATUAL;i3GEO.php.criamapa(mashup,i3GEO.configura.mashuppar)}else{if(i3GEO.parametros.w===""||i3GEO.parametros.h===""){tamanho=i3GEO.calculaTamanho();i3GEO.parametros.w=tamanho[0];i3GEO.parametros.h=tamanho[1]}i3GEO.php.inicia(montaMapa,i3GEO.configura.embedLegenda,i3GEO.parametros.w,i3GEO.parametros.h)}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.fechaAguarde()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.fechaAguarde()")}if(i3GEO.mapa.AUTORESIZE===true){i3GEO.mapa.ativaAutoResize()}},aposIniciar:function(){if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finaliza)){i3GEO.finaliza.call()}else{if(i3GEO.finaliza!=""){eval(i3GEO.finaliza)}}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.inicia()}},atualiza:function(retorno){var corpoMapa,erro,mapscale,temp;if(i3GEO.contadorAtualiza>1){i3GEO.contadorAtualiza--;return}if(i3GEO.contadorAtualiza>0){i3GEO.contadorAtualiza--}i3GEO.contadorAtualiza++;corpoMapa=function(){if($i("ajaxCorpoMapa")){return}i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem)};if(arguments.length===0){i3GEO.janela.fechaAguarde("ajaxCorpoMapa");corpoMapa.call();return}if(retorno===""){corpoMapa.call();return}if(!retorno.data){alert(retorno);i3GEO.mapa.recupera.inicia();return}try{if(retorno.data==="erro"){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia();return}else if(retorno.data==="ok"||retorno.data===""){corpoMapa.call();return}}catch(e){}erro=function(){var c=confirm("Ocorreu um erro, quer tentar novamente?");if(c){corpoMapa.call()}else{i3GEO.janela.fechaAguarde()}return};if(arguments.length===0||retorno===""||retorno.data.variaveis===undefined){erro.call();return}else{if(arguments.length===0){return}i3GEO.mapa.verifica(retorno);tempo="";if(i3GEO.desenho.richdraw){i3GEO.desenho.richdraw.clearWorkspace()}mapscale=i3GEO.parametros.mapscale;i3GEO.atualizaParametros(retorno.data.variaveis);if(retorno.data.variaveis.erro!==""){alert(retorno.data.variaveis.erro)}try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas);if(i3GEO.parametros.mapscale!==mapscale){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){}i3GEO.arvoreDeCamadas.CAMADAS=retorno.data.temas;i3GEO.Interface.redesenha();if($i("i3GEOidentificalistaTemas")){g_tipoacao="identifica";g_operacao='identifica'}else{g_operacao=""}if($i("mensagemt")){$i("mensagemt").value=i3GEO.parametros.mapexten}i3GEO.eventos.navegaMapa();i3GEO.ajuda.mostraJanela("Tempo de redesenho em segundos: "+retorno.data.variaveis.tempo,"");temp=i3GEO.arvoreDeCamadas.verificaAplicaExtensao();if(temp!==""){i3GEO.tema.zoom(temp)}}},calculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,Dw,Dh;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}if(i3GEO.configura.autotamanho===true){if(window.top===window.self){window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0)}}if(i3GEO.scrollerWidth===""){i3GEO.scrollerWidth=i3GEO.util.getScrollerWidth()}i3GEO.tamanhodoc=[YAHOO.util.Dom.getViewportWidth(),YAHOO.util.Dom.getViewportHeight()];Dw=YAHOO.util.Dom.getDocumentWidth();Dh=YAHOO.util.Dom.getDocumentHeight();novow=Dw-i3GEO.scrollerWidth;novoh=Dh;document.body.style.width=novow+"px";document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i("corpoMapa");if(temp){if(temp.style){if(temp.style.width){w=parseInt(temp.style.width,10);h=parseInt(temp.style.width,10);i3GEO.parametros.w=w}if(temp.style.height){h=parseInt(temp.style.height,10);i3GEO.parametros.h=h}}}temp=$i("contemImg");if(temp){temp.style.height=h+"px";temp.style.width=w+"px"}return[w,h]},reCalculaTamanho:function(){var diminuix,diminuiy,menos,novow,novoh,w,h,temp,antigoh=i3GEO.parametros.h;diminuix=(navm)?i3GEO.configura.diminuixM:i3GEO.configura.diminuixN;diminuiy=(navm)?i3GEO.configura.diminuiyM:i3GEO.configura.diminuiyN;menos=0;temp=$i("contemFerramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("contemFerramentas").style.width,10)}temp=$i("ferramentas");if(temp&&temp.style&&temp.style.width){menos+=parseInt($i("ferramentas").style.width,10)}document.body.style.width="100%";temp=i3GEO.util.tamanhoBrowser();novow=temp[0];novoh=temp[1];temp=(antigoh-(novoh-diminuiy));document.body.style.height=novoh+"px";w=novow-menos-diminuix;h=novoh-diminuiy;temp=$i(i3GEO.Interface.IDMAPA);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i(i3GEO.Interface.IDCORPO);if(temp){temp.style.height=h+"px";temp.style.width=w+"px";YAHOO.util.Event.addListener(temp,"click",YAHOO.util.Event.stopEvent);YAHOO.util.Event.addFocusListener(temp,YAHOO.util.Event.preventDefault)}temp=$i("mst");if(temp){temp.style.width="100%"}i3GEO.parametros.w=w;i3GEO.parametros.h=h;i3GEO.php.mudatamanho(i3GEO.atualiza,h,w);switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);break;case"googleearth":i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3geoOL.updateSize();break}if(i3GEO.guias.TIPO==="sanfona"){i3GEO.guias.ALTURACORPOGUIAS=h-(antigoh-i3GEO.guias.ALTURACORPOGUIAS)}else{i3GEO.guias.ALTURACORPOGUIAS=h}return[w,h]},atualizaParametros:function(variaveis){i3GEO.parametros.mapscale=variaveis.mapscale*1;i3GEO.parametros.mapres=variaveis.mapres*1;i3GEO.parametros.pixelsize=variaveis.pixelsize*1;i3GEO.parametros.mapexten=variaveis.mapexten;i3GEO.parametros.mapimagem=variaveis.mapimagem;i3GEO.parametros.w=variaveis.w*1;i3GEO.parametros.h=variaveis.h*1;i3GEO.parametros.mappath=variaveis.mappath;i3GEO.parametros.mapurl=variaveis.mapurl;if(i3GEO.login.verificaCookieLogin()){i3GEO.parametros.editor="sim"}else{i3GEO.parametros.editor="nao"}}}; | |
350 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/á|à |ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/Ã/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<input onchange=\""+onch+"\" tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.ResizePanel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas,n,nome="";if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td> <input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value=' ' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value=' ' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento,nx="",texto="Cor",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.ResizePanel(id,{height:"480px",modal:false,width:"380px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versao adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)}; | |
351 | +g_traducao={"p1":[{pt:"O i3Geo é software livre! Para download clique <a href='http://mapas.mma.gov.br/download' target=blank >aqui</a>. <b><a href='http://"+window.location.host+"/i3geo/mobile/qrcode.htm' target=blank >Qrcode mobile</a></b>",en:"I3geo is a open source software! <a href='http://mapas.mma.gov.br/download' target=blank >Click</a> to download.",es:"I3Geo es software libre!. <a href='http://mapas.mma.gov.br/download' target=blank > Descargar</a>",it:"I3geo è un software libero! <a href='http://mapas.mma.gov.br/download' target=blank >clicca qui </a> per il download."}],"p2":[{pt:"Filtro de cores",en:"Image type",es:"Tipo de imagen",it:"Tipo di immagine"}],"p3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"p4":[{pt:"Escala",en:"Scale",es:"Escala",it:"Scala"}],"p5":[{pt:"Tamanho",en:"Size",es:"Tamaño",it:"Dimensione"}],"p6":[{pt:"Ativa/desativa entorno",en:"Enable/Disable Border",es:"Activar/desactivar entorno",it:"Attiva / Disattiva campo"}],"p7":[{pt:"Ativa/desativa logo",en:"Enable/Disable Logo",es:"Activar/desactivar Logo",it:"Attiva / disattiva logo"}],"p8":[{pt:"Cor da selecao",en:"Color of Selection",es:"Color de la selección",it:"Colore della selezione"}],"p9":[{pt:"Cor do fundo",en:"Background color",es:"Color de fondo",it:"Colore dello sfondo"}],"p10":[{pt:"Grade de coordenadas",en:"Graticule",es:"Gratíla",it:"Reticolo"}],"p11":[{pt:"Template",en:"Template",es:"Plantilla",it:"Template"}],"p12":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizzazione"}],"p13":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"p14":[{pt:"Aplicar",en:"Apply",es:"Aplicar",it:"Applica"}],"p15":[{pt:"Formato da imagem do mapa",en:"Format of Image Map",es:"Formato de la imagen del mapa",it:"Image map format"}],"p16":[{pt:"Camadas de fundo",en:"Base layers",es:"Capas Base",it:"Base layers"}],"p17":[{pt:"Imprime legenda",en:"Enable legend",es:"Activar Leyenda",it:"Attiva legenda"}],"p18":[{pt:"Não imprime a legenda",en:"Disable legend",es:"Desactivar Leyenda",it:"Disattiva legenda"}],"p19":[{pt:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa",en:"Enable or disable the legend of a theme in the print option of the map",es:"Activa o desactiva la leyenda de un tema en la opción de impresión del mapa",it:"Ativa ou desativa a legenda de um tema na opção de impressão do mapa"}],"p20":[{pt:"Tela remota",en:"Remote screen",es:"Pantalla remota",it:"Tela remota"}],"p21":[{pt:"Animação",en:"Animation",es:"Animación",it:"Animation"}],"s1":[{pt:"Ajuda",en:"Help",es:"Ayuda",it:"Aiuto?"}],"s2":[{pt:"Análise",en:"Analysis",es:"Análisis",it:"Analisi"}],"s3":[{pt:"Janelas",en:"Windows",es:"Ventanas",it:"Finestra"}],"s4":[{pt:"Arquivo",en:"Files",es:"Archivo",it:"Archivio"}],"s5":[{pt:"Propriedades",en:"Properties",es:"Propiedades",it:"Proprietà"}],"u1":[{pt:"Sobre o i3Geo",en:"About i3Geo",es:"Acerca de i3Geo",it:"Informazioni WebGis"}],"u2":[{pt:"Doc. dos códigos",en:"Doc. of the codes",es:"Doc. de los códigos",it:"Doc. dei codici"}],"u3":[{pt:"WikiBook",en:"WikiBook",es:"WikiBook",it:"WikiBook"}],"u4":[{pt:"Tutoriais",en:"Tutorials",es:"Tutoriales",it:"Guida"}],"u4a":[{pt:"Manual do usuário",en:"User manual",es:"Manual de usuario",it:"Manual do usuário"}],"u5":[{pt:"Blog",en:"Blog",es:"Blog",it:"Blog"}],"u5a":[{pt:"Software público",en:"Software público Brazil",es:"Software público Brasil",it:"Software pubblico"}],"u5b":[{pt:"Lista de funções",en:"Function list",es:"Lista de funciones",it:"Lista delle funzioni"}],"u5c":[{pt:"Redes sociais",en:"Social networks",es:"Redes sociales",it:"Reti sociali"}],"u6":[{pt:"Geometrias",en:"Geometries",es:"Geometrías",it:"Geometrie"}],"u7":[{pt:"Grade de poligonos",en:"Polygon grid",es:"Grado de polígonos",it:"Reticolo poligonale"}],"u8":[{pt:"Grade de pontos",en:"Grid of Points",es:"Gratíla de puntos",it:"Reticolo puntuale"}],"u9":[{pt:"Grade de hexágonos",en:"Grid of Hexagons",es:"Gratíla de hexágonos",it:"Reticolo Esagonale"}],"u10":[{pt:"Entorno(Buffer)",en:"Buffer",es:"Area Influencia (Buffer)",it:"Buffer"}],"u11":[{pt:"Centróide",en:"Centroid",es:"Centroide",it:"Baricentro"}],"u11a":[{pt:"Distância entre pontos",en:"Distance between points",es:"Distancia entre puntos",it:"Distanza tra i punti"}],"u12":[{pt:"N pontos em poligono",en:"N points in polygon",es:"N puntos en polígono",it:"N punti nel Poligono"}],"u13":[{pt:"Ponto em poligono/raster",en:"Point in polygon/raster",es:"Punto en polígono/raster",it:"Punto nel Poligono / raster"}],"u14":[{pt:"Distribuição de pontos",en:"Points distribution",es:"Distribución de puntos",it:"Distribuzione di punti"}],"u15":[{pt:"Barras de ferramentas",en:"Toolbars",es:"Barras de herramientas",it:"Barre Strumenti"}],"u15a":[{pt:"Ferramentas",en:"Tools",es:"Herramientas",it:"Strumenti"}],"u16":[{pt:"Janela de mensagens",en:"Message window",es:"Ventana de mensajes",it:"Finestra messaggi"}],"u17":[{pt:"Salvar mapa",en:"Save map",es:"Guardar mapa",it:"Salva mappa"}],"u18":[{pt:"Carregar mapa",en:"Load map",es:"Cargar mapa",it:"Apri mappa"}],"u19":[{pt:"Pegar imagens",en:"Get pictures",es:"Captar imágenes",it:"Apri immagine"}],"u20":[{pt:"Converter em WMS e WMC",en:"Convert to WMS and WMC",es:"Convertir en WMS y WMC",it:"Converti in WMS e WMC"}],"u20a":[{pt:"Converter em KML",en:"Convert to KML",es:"Convertir en KML",it:"Converti in KML"}],"u21":[{pt:"Gerador de links",en:"Link generator",es:"Generador de enlaces",it:"Genera collegamento"}],"u22":[{pt:"Grade",en:"Graticule",es:"Gratíla",it:"Reticolo"}],"u23":[{pt:"Ponto",en:"Point",es:"Punto",it:"Punto"}],"u24":[{pt:"Polígono",en:"Polygon",es:"Polígonos",it:"Poligono"}],"u25":[{pt:"Dissolve",en:"Dissolve",es:"Disolver",it:"Dissolvi"}],"u26":[{pt:"Agrupa",en:"Group",es:"Agrupar",it:"Aggrega"}],"u27":[{pt:"Outros",en:"Others",es:"Otros",it:"Altri"}],"u28":[{pt:"Centro médio",en:"Middle center",es:"Centro medio",it:"Centro médio"}],"u29":[{pt:"Editor vetorial",en:"Vector editor",es:"Editor vetorial",it:"Editor vetorial"}],"t1":[{pt:"Camadas",en:"Layers",es:"Capas",it:"Strati"}],"t2":[{pt:"Arraste o tema aqui ou clique para excluir",en:"Drag the layer here or make click to remove",es:"Arrastre el tema aquí ó haga clic para excluir",it:"Trascina qui per rimuovere"}],"t2a":[{pt:"Filtra a lista de camadas",en:"Filters the list of layers",es:"Filtra la lista de capas",it:"filtra a lista de camadas"}],"t2b":[{pt:"Abre a legenda do mapa",en:"Opens the map legend",es:"Despliega la leyenda del mapa",it:"Abre a legenda do mapa"}],"t3":[{pt:"Clique para ligar ou desligar esse tema, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Click to enable or disable this theme, showing it or not on the map. After changing the status of the theme, wait a few moments to get the map to be reloaded, or click the Apply button that will be display.",es:"Haga clic para activar o desactivar este tema, mostrándolo o no en el mapa. Después de cambiar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el botón aplicar que se mostrará.",it:"Fare clic per attivare o disattivare questo tema. Dopo aver modificato lo stato del tema, La mappa aggiornata sarà visualizzata dopo qualche istante. Per visualizzare subito cliccare su Applica"}],"t3a":[{pt:"Clique para ligar todos os temas",en:"Turn on all layers",es:"Haga clic para activar todos los temas",it:"Turn all layers on"}],"t3b":[{pt:"Clique para desligar todos os temas",en:"Turn off all layers",es:"Haga clic para desactivar todos los temas",it:"Turn all layers off"}],"t4":[{pt:"limpa seleção",en:"Clear selection",es:"Limpia la selección",it:"Pulizia della selezione"}],"t4a":[{pt:"zoom para a seleção",en:"Zoom to selection",es:"Zoom a la selección",it:"Zoom della selezione"}],"t5":[{pt:"Limpa seleção existente nesse tema",en:"Clear selection existing in this theme",es:"Limpia la selección existente en este tema",it:"Pulizia della selezione esistente in questo strato"}],"t6":[{pt:"Clique para fazer o download desse tema no formato shapefile",en:"Click to download this theme in shapefile format",es:"Haga clic para descargar este tema en formato shape",it:"Clicca per il download di questo tema nel formato Shapefile"}],"t7":[{pt:"clique e arraste",en:"Dragging",es:"Haga clic y arrastre",it:"Clicca e trascina"}],"t7a":[{pt:"Clique e arraste para mudar a ordem. Arraste e solte na lixeira para remover. Aguarde para ver a legenda.",en:"Click and Dragg to rearrange order. Drag and drop to remove. Please to wait to see the legend",es:"Haga clic y arrastre para cambiar el orden. Arrastre y suelte remover. Aguarde para ver la leyenda.",it:"Clicca e trascina"}],"t8":[{pt:"arraste para mudar a ordem",en:"drag to change the order",es:"Arrastre para cambiar el orden",it:"Trascina per modificare l'ordine"}],"t9":[{pt:"A escala do tema é compatível com a escala do mapa",en:"The scale of the theme is compatible with the scale of the map",es:"La escala del tema es compatible con la escala del mapa",it:"La scala del tema è compatibile con la scala della mappa"}],"t10":[{pt:"A escala do tema é incompatível com a escala do mapa",en:"The scale of the theme is incompatible with the scale of the map",es:"La escala del tema es incompatible con la escala del mapa",it:"La scala del tema è incompatibile con la scala della mappa"}],"t11":[{pt:"A escala do tema não é conhecida",en:"The scale of the layer is unknown",es:"La escala del tema no es conocida",it:"La scala del tema non è conosciuta"}],"t12":[{pt:"excluir",en:"Delete",es:"Eliminar",it:"Eliminare"}],"t12a":[{pt:"Clique para excluir esse tema do mapa.",en:"Delete this layer of the map.",es:"Haga clic para excluir este tema del mapa",it:"Clicca per rimuovere questo strato della mappa"}],"t13":[{pt:"sobe",en:"Up",es:"Subir",it:"Mettere sopra "}],"t14":[{pt:"Clique para subir esse tema na ordem de desenho",en:"Click to move up the layer in design order",es:"Haga clic para subir ese tema en la orden de diseño",it:"Clicca per sollevare questo tema nellordine di progettazione"}],"t15":[{pt:"desce",en:"Down",es:"Bajar",it:"scendere"}],"t16":[{pt:"Clique para descer esse tema na ordem de desenho",en:"Click to move down the layer in design order",es:"Haga clic para bajar este tema en la orden de diseño",it:"Clicca per scendere questo tema nellordine di progettazione."}],"t17":[{pt:"zoom para o tema",en:"Zoom to layer",es:"Zoom al tema",it:"Zoom al tema"}],"t18":[{pt:"Clique para ajustar o mapa de forma a mostrar todo o tema",en:"Zoom all",es:"Zoom a todo",it:"Clicca per regolare la mappa per visualizzare tutto lo strato"}],"t18a":[{pt:"Opções e propriedades",en:"Options",es:"Opciones",it:"Opzioni"}],"t18b":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"t19":[{pt:"Altera a transparência do tema, possibilitando que as camadas inferiores possam ser vistas.",en:"Change the layer transparency. It make possible to see inferior layers",es:"Altera la transparencia del tema, haciendo posible que las capas inferiores puedan verse",it:"Modifica la trasparenza del tema, consentendo che gli strati più bassi siano visti"}],"t20":[{pt:"Opacidade",en:"Opacity",es:"Opacidad",it:"Opacità"}],"t21a":[{pt:"Muda o nome atual do tema. Utilize para melhorar a legenda do mapa.",en:"Rename layer. Use it for make a better legend of the map",es:"Renombrar tema. Utilice para mejorar la leyenda del mapa.",it:"Cambia il nome del tema corrente. Utilizzare per migliorare la legenda della mappa."}],"t21":[{pt:"Novo nome:",en:"New name",es:"Nuevo nombre",it:"Nuovo nome"}],"t22":[{pt:"Localize elementos no tema com base em seus atributos descritivos.",en:"Find elements on the layer based on their descriptive attributes.",es:"Ubique elementos en el tema en base a sus atributos descriptivos",it:"Trova gli elementi nel tema secondo i suoi attributi descrittivi."}],"t23":[{pt:"Procurar",en:"Search...",es:"Buscar...",it:"Cerca..."}],"t24":[{pt:"Crie uma nova camada no mapa para apresentar textos descritivos sobre esse tema, tendo como base a tabela de atributos.",en:"Create a new layer to display descriptive texts about this theme, based on table of attributes.",es:"Crear una nueva capa en el mapa para presentar textos descriptivos sobre este tema, teniendo como base la tabla de atributos",it:"Creare un nuovo strato sulla mappa per visualizzare testi descrittivi sul tema, secondo la tabella di attributi."}],"t25":[{pt:"Texto (nomes ou valores)",en:"Label...",es:"Etiquetas..",it:"Testo..."}],"t26":[{pt:"Defina as etiquetas que serão mostradas quando o mouse é estacionado sobre um elemento desse tema.",en:"Define the label that will be shown when the mouse is over one element of this theme.",es:"Defina las etiquetas que se mostrarán cuando el ratón se estaciona sobre un elemento de este tema",it:"Definire le etichette da visualizzare quando il mouse si ferma su un elemento di questo tema."}],"t27":[{pt:"Ativar etiquetas",en:"Label...",es:"Etiquetas...",it:"Descrizioni..."}],"t28":[{pt:"Insira um filtro nesse tema para mostrar apenas determinadas informações, com base na tabela de atributos.",en:"Insert a Filter in this theme for show specific information, based on the table of attributes.",es:"Inserte un filtro en este tema para mostrar solo determinadas informaciones, con base en la tabla de atributos",it:"Inserisci un filtro in questo tema per mostrare solo determinate informazioni, con base nella tabella di attributi"}],"t29":[{pt:"Filtrar",en:"Filter...",es:"Filtrar...",it:"Filtro..."}],"t30":[{pt:"Veja a tabela de atributos relacionada a esse tema.",en:"See the table of attributes related to this theme.",es:"Vea la tabla de atributos relacionada con este tema",it:"Vedi la tabella degli attributi di questo tema."}],"t31":[{pt:"Tabela com os dados",en:"Table of attributes...",es:"Tabla de atributos...",it:"Tabella..."}],"t32":[{pt:"Abre o editor de legenda, permitindo a alteração da forma de representação desse tema.",en:"Opens the legend editor, allowing the modification of the form of representation of this theme.",es:"Abre el editor de leyenda, permitiendo la alteración de la forma de representación de este tema",it:"Aprire l'editor di legenda, che consente la modifica della forma di rappresentazione di questo tema "}],"t33":[{pt:"Editar legenda",en:"Edit Legend...",es:"Editar leyenda...",it:"Modifica la legenda"}],"t34":[{pt:"Mostra os dados desse tema em uma janela que acompanha o mouse.",en:"Shows the data of this layer in a window that tracks the mouse.",es:"Muestra los datos de este tema en una ventana que acompaña el ratón",it:"Mostra i dati di questo tema in una finestra che accompagna il mouse."}],"t35":[{pt:"Mostra em janela",en:"Show in window",es:"Mostrar en la ventana...",it:"Mostra nella finestra..."}],"t36":[{pt:"tema visível apenas em determinadas escalas",en:"Layer is visible in specific scales",es:"Capa visible en ciertas escalas",it:"Tema visibile solo a determinate scale"}],"t37":[{pt:"Gráfico",en:"Graphic",es:"Gráfico",it:"Grafico"}],"t37a":[{pt:"Tema com gráficos",en:"Theme with chart",es:"Tema con Gráfico",it:"Grafico"}],"t37b":[{pt:"Gráfico interativo",en:"Interactive chart",es:"Gráfico Interactivo",it:"Grafico"}],"t38":[{pt:"Exporta a legenda para o padrão SLD.",en:"Export the legend to standard SLD.",es:"Exporta la leyenda para estándar SLD.",it:"Exporta a legenda para o padrão SLD."}],"t39":[{pt:"Exportar SLD",en:"Export to SLD...",es:"Exportar a SLD...",it:"SLD..."}],"t40":[{pt:"Abre a ferramenta que permite alterar o SQL de acesso aos dados",en:"Opens the tool that lets you change the SQL data access",es:"Abre una herramienta que permite alterar el SQL de acceso a los datos",it:"Abre a ferramenta que permite alterar o SQL de acesso aos dados"}],"t41":[{pt:"Editar SQL",en:"Edit SQL...",es:"Editar SQL...",it:"SQL..."}],"t42":[{pt:"Efeito cortina",en:"Curtain efect...",es:"Efecto Cortina...",it:"Tenda..."}],"t43":[{pt:"Aplicar SLD",en:"Apply SLD...",es:"Aplicar SLD...",it:"Aplicar SLD..."}],"t44":[{pt:"Salvar mapfile",en:"Save mapfile",es:"Guardar mapfile",it:"Salva mapfile"}],"t45":[{pt:"Comentar",en:"Comment",es:"Comentar",it:"Comentar"}],"t46":[{pt:"Mais populares",en:"Most popular",es:"Mas populares",it:"Mais populares"}],"t47":[{pt:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco",en:"Interval in seconds after which the layer will be updated. To ignore, leave blank",es:"Intervalo en segundos despues del cual la capa será actualizada. Para ignorar, deje en blanco.",it:"Intervalo em segundos após o qual a camada será atualizada. Para ignorar, deixe em branco"}],"t48":[{pt:"Temporizador",en:"Timer",es:"Temporizador",it:"Temporizador"}],"t49":[{pt:"Mapa temático 3D",en:"Thematic map 3D",es:"Mapa temático 3D",it:"Mapa temático 3D"}],"a1":[{pt:"procurar tema:",en:"Search layer:",es:"Buscar Tema:",it:"Ricerca il tema:"}],"a2":[{pt:"Upload de shape file",en:"Upload shape file",es:"Subir archivo shape",it:"Upload del shape file"}],"a2b":[{pt:"Upload de arquivo dbf ou CSV",en:"Upload DBF or CSV file",es:"Subir archivo DBF o CSV",it:"Upload del file dbf o CSV"}],"a3":[{pt:"Download de dados",en:"Data download",es:"Descarga de datos",it:"Download dei dati"}],"a3a":[{pt:"Importar Web Map Context (WMC)",en:"Import Web Map Context (WMC)",es:"Importar Web Map Context (WMC)",it:"Importar Web Map Context (WMC)"}],"a4":[{pt:"Conectar com servidor WMS",en:"Connect to WMS Server",es:"Conectar al servidor WMS",it:"Connetti con il server WMS"}],"a4b":[{pt:"Conectar com servidor WMS-T",en:"Connect to WMS-T Server",es:"Conectar al servidor WMS-T",it:"Connetti con il server WMS-T"}],"a5":[{pt:"Conectar com GeoRss",en:"Connect to GeoRss",es:"Conectar con GeoRss",it:"Connetti con il GeoRss"}],"a5a":[{pt:"Nuvem de tags",en:"Tags cloud",es:"Nube de Tags",it:"Tag"}],"a6":[{pt:"Acesso aos arquivos do servidor",en:"Access files in server directory",es:"Acceso a los archivos del servidor",it:"Accesso agli archivi del server"}],"a7":[{pt:"Temas",en:"Layers",es:"Temas",it:"Temi"}],"a8":[{pt:"Clique no box ao lado do tema para ligar ou desligar, mostrando-o ou não no mapa. Após alterar o estado do tema, aguarde alguns instantes para o mapa ser redesenhado, ou clique no botão aplicar que será mostrado.",en:"Click to connect or disconnect this layer, showing it or not on the map. After changing the layer status, wait a few moments to be reloaded on the map, or click in the button Apply that will be shown.",es:"Haga clic para conectar o desconectar este tema, mostrándolo o no en el mapa. Después de alterar el estado del tema, espere algunos instantes para que el mapa sea recargado, o haga clic en el botón aplicar que aparecerá",it:"Clicca sulla casella accanto al tema per attivare o disattivare, mostrandolo o meno sulla mappa. Dopo aver modificato lo stato del tema, attendere qualche istante per vedere ridisegnata la mappa, oppure fare clic sul pulsante Applica, che verrà visualizzato."}],"a9":[{pt:"Fonte",en:"Font",es:"Fuente",it:"Fonte"}],"a10":[{pt:"código:",en:"Code",es:"Código",it:"Codice"}],"a11":[{pt:"Sistemas",en:"Systems",es:"Sistemas",it:"Sistemi"}],"a12":[{pt:"Abrir sistema",en:"Open system",es:"Abrir sistema",it:"Aprire il sistema"}],"a13":[{pt:"Abrir no Google Earth",en:"Open in Google Earth",es:"Abrir en Google Earth",it:"Abrir no Google Earth"}],"a14":[{pt:"Upload SHP, CSV, DBF, GPX, KML",en:"Upload SHP, CSV, DBF, GPX, KML",es:"Subir SHP, CSV, DBF, GPX, KML",it:"Upload SHP, CSV, DBF, GPX, KML"}],"a15":[{pt:"Conexões",en:"Conections",es:"Conexiones",it:"Conexões"}],"a16":[{pt:"Serviços",en:"Services",es:"Servicios",it:"Servers"}],"g1":[{pt:"Temas",en:"Layer",es:"Temas",it:"Temi"}],"g1a":[{pt:"Catálogo",en:"Catalog",es:"Catálogo",it:"Catalog"}],"g2":[{pt:"Adiciona",en:"Add",es:"Agregar",it:"Aggiunge"}],"g3":[{pt:"Legenda",en:"Legend",es:"Leyenda",it:"Legenda"}],"g4":[{pt:"Mapas",en:"Maps",es:"Mapas",it:"Mappa"}],"g4a":[{pt:"Mapa",en:"Map",es:"Mapa",it:"Mappe"}],"o1":[{pt:"Aguarde...",en:"Wait...",es:"Espere...",it:"Attendere..."}],"o2":[{pt:"Busca rápida",en:"Quick search",es:"Búsqueda rápida",it:"Ricerca rapida"}],"o3":[{pt:"Lendo imagem...",en:"Loading images...",es:"Leyendo imagen...",it:"Lettura di immagini..."}],"o4":[{pt:"Aguarde...abrindo lente",en:"Wait...Opening lens...",es:"Espere...abriendo lente",it:"Attendere...apertura della lente"}],"o5":[{pt:"Aguarde...iniciando",en:"Wait...initializing",es:"Espere...iniciando",it:"Attendere...partenza"}],"o6":[{pt:"dinâmico",en:"Dynamic",es:"Dinámico",it:"Dinamico"}],"d1":[{pt:"Digite as coordenadas de um ponto (X=longitude e Y=latitude) para localiz´-lo no mapa. O centro do mapa ser´ deslocado para o ponto digitado.",en:"Enter the coordinates of a point (X=longitude and Y=latitude) to localize it on the map. The center of the map is move to the point entered.",es:"Digite las coordenadas de un punto (X=longitud e Y=latitud) para ubicarlas en el mapa. El centro del mapa se desplazará para el punto digitado.",it:"Inserisci le coordinate di un punto (X=longitudine e Y=latitudine) per individuarlo sulla mappa. Il centro della mappa viene spostato al punto digitato"}],"d2":[{pt:"Altera a escala do mapa ajustando-a para mostrar a mesma abrangência geográfica da inicialização.",en:"Change the scale of the map adjusting it to show the same initial geographical cover.",es:"Modifica la escala del mapa ajustándola para mostrar la misma área geográfica inicial",it:"Modificare la scala della mappa adeguandola per mostrare la stessa copertura geografica sin dall'inizializzazione"}],"d2t":[{pt:"Enquadramento inicial",en:"Initial extent",es:"Encuadre inicial",it:"enquadramento inicial"}],"d3":[{pt:"Amplia o mapa - desloca o ponto clicado para centro da tela ou amplia a região indicada por um retângulo. Após ativada, clique e arraste o mouse sobre o mapa na área de zoom desejada.",en:"Extends the map - places the point where you clicked in the center of the screen or extends to the region indicated by a rectangle. Once activated, click and drag the mouse over the map in the desired zoom area",es:"Amplía el mapa - coloca el punto donde se hizo clic en el centro de la pantalla o amplía a la región indicada con un rectángulo. Después de activarla, haga clic y arrastre el ratón sobre el mapa en el área de zoom deseada",it:"Ampliare la mappa - pone il punto cliccato nel centro dello schermo o ingrandisce la regione indicata con un rettangolo. Dopo aver attivata, cliccare e trascinare il mouse sopra la mappa nellarea di zoom desiderata."}],"d3t":[{pt:"clique e arraste para ampliar",en:"Click and drag to enlarge",es:"Haga click y arraste para ampliar",it:"clique e arraste para ampliar"}],"d4":[{pt:"Desloca a região visível no mapa. Após ativada, clique e arraste o mouse sobre o mapa para deslocar a região visível.",en:"Moves the visible region on the map. Once activated, click and drag the mouse over the map to move the visible region.",es:"Desplaza la región visible en el mapa. Después de activada, haga clic y arrastre el ratón sobre el mapa para mover la región visible.",it:"Sposta la regione visibile sulla mappa. Dopo averla attivata, cliccare e trascinare il mouse sulla mappa per spostare la regione visibile "}],"d4t":[{pt:"clique e arraste para deslocar",en:"Click and drag to move",es:"Haga Click y arraste para mover",it:"clique e arraste para deslocar"}],"d5":[{pt:"Amplia o mapa tendo como referência o centro atual.",en:"Magnify the map with the reference the current center.",es:"Amplía el mapa teniendo como referencia el centro actual",it:"Estendi la mappa tenendo come riferimento il centro corrente."}],"d5t":[{pt:"aproximar",en:"zoom in",es:"Acercar",it:"aproximar"}],"d6":[{pt:"Reduz o mapa tendo como referência o centro atual.",en:"Reduces the map with the reference of the current center.",es:"Reduce el mapa teniendo como referencia el centro actual",it:"Riduci la mappa tenendo come referimento il centro corrente"}],"d6t":[{pt:"afastar",en:"Zoom out",es:"Alejar",it:"afastar"}],"d7":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, clique sobre o mapa.",en:"Displays information about a point on the map. Once activated, click on the map.",es:"Muestra información sobre un punto en el mapa. Después de activarla haga clic sobre el mapa.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fare clic su di esso."}],"d7t":[{pt:"clique para identificar",en:"Click to identify",es:"Click para identificar",it:"clique para identificar"}],"d7a":[{pt:"Mostra informações sobre um ponto no mapa. Após ativada, pare o mouse por alguns instantes no ponto desejado ou clique sobre o mesmo.",en:"Displays information about a point on the map. After activated, stop the mouse for a moment at the desired point or click on it.",es:"Muestra información sobre un punto en el mapa. Después de activarse, detenga el ratón por un momento en el punto deseado o haga click en él.",it:"Mostra gli informazioni su un punto sulla mappa. Dopo averla attivata, fermare il mouse per qualche istante nel punto desiderato o fare clic su di esso."}],"d7at":[{pt:"etiqueta",en:"Label",es:"Etiqueta",it:"etiqueta"}],"d8":[{pt:"Mostra a extensão geográfica atual em coordenadas geográficas",en:"Shows the current extend in geographic coordinates",es:"Muestra la extensión geográfica actual en coordenadas geográficas",it:"Mostra la estensione geografica corrente in coordinate geografiche"}],"d8t":[{pt:"extensão atual",en:"Actual extent",es:"Extensió actual",it:"extensão atual"}],"d9":[{pt:"Abre/fecha o mapa de referência",en:"Open/close the reference map ",es:"Abre/cierra el mapa de referencia",it:"Apertura/chiusura della mappa di riferimento"}],"d9t":[{pt:"mapa de referência",en:"Reference map",es:"Mapa de referencia",it:"mapa de referência"}],"d10":[{pt:"Digite o novo valor de escala e clique no botão aplicar para alterar a escala do mapa",en:"Enter the new value of scale and click the button Apply to change the scale of the map",es:"Digite el nuevo valor de escala y haga clic en el botón aplicar para modificar la escala del mapa",it:"Immettere il nuovo valore di scala e clicca sul pulsante Applica per cambiare la scala della mappa"}],"d11":[{pt:"Busca dados na Wikipedia na abrangência atual do mapa. Faça um zoom no mapa antes de abrir essa opção. Regiôes muito extensas podem tornar a busca muito demorada",en:"Search data on Wikipedia in the current extend of the map. Make a zoom on the map before opening this option. Regions very extensive can make a very slow search ",es:"Busca datos en Wikipedia en el alcance actual del mapa. Haga zoom en el mapa antes de abrir esta opción. Regiones muy extensas pueden ocasionar una búsqueda muy lentas",it:"Ricerca dati su Wikipedia nell'ambito corrente della mappa. Fare uno zoom sulla mappa prima dellapertura di questa opzione. Regioni molto ampie potrebbero causare una ricerca troppo lenta."}],"d11t":[{pt:"buscar na Wikipédia",en:"search in Wikipedia",es:"buscar na Wikipedia",it:"buscar na Wikipédia"}],"d12":[{pt:"Imprime o mapa",en:"Print the map",es:"Imprime el mapa",it:"Stampa la mappa"}],"d13":[{pt:"Localiza o IP do usuário no mapa",en:"Locates the user's IP on the map",es:"Ubica el IP del usuario en el mapa",it:"Trova IP dell'utente nella mappa"}],"d14":[{pt:"Gera arquivo para 3D",en:"Generates file for 3D",es:"Genera archivo para 3D",it:"Genera file per 3D"}],"d15":[{pt:"Abre o Google Maps, mostrando uma imagem de satélite da região vista no mapa principal",en:"Open Google Maps, showing a satellite image of the region on the map",es:"Abre Google Maps, mostrando una imagen de satélite de la región en el mapa principal",it:"Apri Google Maps, mostrando un'immagine satellitare della regione vista sulla mappa principale."}],"d15t":[{pt:"Google Maps",en:"Google Maps",es:"Google Maps",it:"Google Maps"}],"d16":[{pt:"Pesquisa documentos na base de dados Scielo (dados preliminares)",en:"Search documents in the database Scielo (preliminary data)",es:"Buscar documentos en la base de datos Scielo (datos preliminares)",it:"Ricerca dei documenti nella base di dati Scielo (dati preliminari)"}],"d16t":[{pt:"Scielo",en:"Scielo",es:"Scielo",it:"Scielo"}],"d17":[{pt:"Projeto Confluence. Pontos de intersecção de coordenadas observadas em campo",en:"Confluence Project. Points of intersection of coordinates observed in field",es:"Proyecto Confluence. Puntos de intersección de coordenadas observadas en campo",it:"Progetto di confluenza. Punti di intersezione delle coordinate osservate in campo"}],"d17t":[{pt:"confluências",en:"Confluences",es:"Confluencias",it:"confluências"}],"d18":[{pt:"Abre lente de ampliação",en:"Opens magnifying lens",es:"Abrir lupa",it:"Apri lente di ingrandimento"}],"d18t":[{pt:"lente",en:"lens",es:"lente",it:"lente"}],"d19":[{pt:"Coloca as guias em uma janela móvel",en:"Open the tabs in a window mobile",es:"Coloca las guías en una ventana móvil",it:"Aprire le schede in una finestra mobile."}],"d20":[{pt:"Redesenha o mapa com as configuraçôes iniciais.",en:"Reload the map with the initial configurations.",es:"Recarga el mapa con las configuraciones iniciales",it:"Ricarica la mappa con la configurazione iniziale."}],"d20t":[{pt:"reinicia",en:"restart",es:"reinicia",it:"reinicia"}],"d21":[{pt:"Mede a distância entre dois ou mais pontos clicados no mapa (menor distância). O cálculo de distância é aproximado e sua precisão depende da escala do mapa.",en:"It measures the distance between two or more clicked points on the map (shortest distance). The calculation of distance is approximate and their accuracy depends on the scale of the map.",es:"Mide la distancia entre dos o más puntos marcados en el mapa (menor distancia). El cálculo de distancia es aproximado y su precisión depende de la escala del mapa.",it:"Misura la distanza tra due o più punti cliccati sulla mappa (minore distanza). Il calcolo della distanza è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21t":[{pt:"distância",en:"distance",es:"distancia",it:"distância"}],"d21a":[{pt:"Mede a área de um polígono desenhado na tela. O cálculo de área é aproximado e sua precisão depende da escala do mapa.",en:"It measures the area of a polgono drawn on the screen. The calculation of area is approximate and their accuracy depends on the scale of the map.",es:"Mide el área de un polígono dibujado sobre la pantalla. El cálculo del área es aproximado y su precisión depende de la escala del mapa.",it:"Misura l'area di un poligono tracciato sullo schermo. Il calcolo della superficie è approssimativo e la sua precisione dipende dalla scala della mappa."}],"d21at":[{pt:-"área",en:"area",es:"área",it:"área"}],"d22":[{pt:"Insere pontos no mapa em coordenadas geográficas. Ospontos incluídos podem ser transformados em linhas ou polígonos. Os pontos são armazenados em um tema temporário, podendo-se fazer o download do arquivo shapefile.",en:"Insert points on the map in geographical coordinates. The points included can be converted into lines or polygons. The points are stored in a temporary layer, and we can download it like shapefile.",es:"Inserte puntos en el mapa en coordenadas geográficas. Los puntos incluidos pueden transformarse en líneas o polígonos. Los puntos se almacenan en un tema temporal, pudiendo hacerse la descarga en formato de archivo shape.",it:"Inserire punti sulla mappa in coordinate geografiche. I punti inseriti possono essere trasformati in linee o poligoni. I punti vengono memorizzati in un tema temporaneo, con la possibilità di effettuare il download del file Shapefile."}],"d22t":[{pt:"inserir pontos",en:"insert points",es:"insertar puntos",it:"inserir pontos"}],"d23":[{pt:"Insere um gráfico no ponto clicado conforme os atributos existentes no tema escolhido. O tema deve possuir itens com valores numéricos na tabela de atributos.",en:"Insert a graphic of the existing attributes on the selected layer in the clicked point. The layer must have columns with numerical values in the table of attributes.",es:"Inserte un gráfico en el punto marcado según los atributos existentes en el tema seleccionado. El tema debe tener campos con valores numéricos en la tabla de atributos.",it:"Inserire un grafico nel punto cliccato con gli attributi che esistono nel tema scelto. Il tema deve avere gli oggetti con valori numerici contenute nella tabella di attributi."}],"d24":[{pt:"Abre as ferramentas para seleção de elementos de um tema. Os elementos selecionados podem ser utilizados em outras operaçôes, como buffer e seleção por tema.",en:"Opens the tools to select elements of a layer. The elements selected can be used in other operations like buffer or selection by theme.",es:"Abre las herramientas para selección de elementos de un tema. Los elementos seleccionados pueden utilizarse en otras operaciones como áreas de influencia o selección por tema",it:"Aprire gli strumenti per selezionare gli elementi di un tema. Gli elementi selezionati possono essere utilizzati in altre operazioni, come ad esempio buffer e selezione per tema."}],"d24t":[{pt:"Selecionar",en:"Select",es:"Seleccionar",it:"Selecionar"}],"d25":[{pt:"Insere texto no mapa clicando em um ponto. Utilize essa opção para adicionar informaçôes ao mapa.",en:"Insert text on the map by clicking on a point. Use this option to add information on the map.",es:"Inserte texto en el mapa haciendo clic en un punto. Utilice esta opción para agregar información al mapa",it:"Inserisci il testo sulla mappa cliccando su un punto. Utilizzare questa opzione per aggiungere informazioni alla mappa."}],"d25t":[{pt:"Inserir texto",en:"Insert text",es:"Insertar texto",it:"Inserir texto"}],"d26":[{pt:"Escolha o visual para os botões e outras características visuais do mapa",en:"Choose the visual for the buttons and other map's visual characteristics",es:"Elija la vista para los botones y otras características visuales del mapa",it:"Scegli il visuale (??) per i pulsanti e le altre caratteristiche visive della mappa."}],"d27":[{pt:"Interface",en:"Interface",es:"Interface",it:"Interface"}],"d28":[{pt:"Aguarde...gerando os arquivos",en:"Wait... generating files",es:"Espere... generando los archivos",it:"Attendere..."}],"d29":[{pt:"Estações METAR",en:"METAR-Br Stations",es:"Estaciones METAR-Br",it:"Estações metar"}],"d30":[{pt:"Linha do tempo",en:"Timeline",es:"Línea del tiempo",it:"Linha do tempo"}],"d31":[{pt:"Não existe nenhuma camada com etiquetas ativas",en:"There is no layer with active labels",es:"No existe ninguna capa con etiquetas activas",it:"Não existe nenhuma camada com etiquetas ativas"}],"d32":[{pt:"Aplicativos",en:"Applications",es:"Aplicaciones",it:"Applicazioni"}],"ge1":[{pt:"Navegação com o mouse",en:"Mouse navigation",es:"Navegación con el ratón",it:"Navegação com o mouse"}],"ge2":[{pt:"Barra de status",en:"Status bar",es:"Barra de estado",it:"Barra de status"}],"ge3":[{pt:"Mapa de referência",en:"Reference map",es:"Mapa de referencia",it:"Mapa de referência"}],"ge4":[{pt:"Escala e legenda",en:"Scale and legend",es:"Escala y leyenda",it:"Escala e legenda"}],"ge5":[{pt:"Atmosfera",en:"Atmosphere",es:"Atmósfera",it:"Atmosfera"}],"ge6":[{pt:"Grade de coordenadas",en:"Coordinates grid",es:"Grilla de coordenadas",it:"Grade de coordenadas"}],"ge7":[{pt:"Luz do sol",en:"Sunshine",es:"Luz del sol",it:"Luz do sol"}],"ge8":[{pt:"Limites políticos",en:"Political boundaries",es:"Límites políticos",it:"Limites políticos"}],"ge9":[{pt:"Construções em 3D",en:"Buildings in 3D",es:"Construciones en 3D",it:"Construções em 3D"}],"ge10":[{pt:"Estradas",en:"Roads",es:"Carreteras",it:"Estradas"}],"ge11":[{pt:"Terreno",en:"Terrain",es:"Terreno",it:"Terreno"}],"x1":[{pt:"Página principal",en:"Home",es:"Inicio",it:"Página principal"}],"x2":[{pt:"Lista de menus",en:"Menu list",es:"Lista de menús",it:"Lista de menus"}],"x3":[{pt:"Miniaturas",en:"Thumbnails",es:"Miniaturas",it:"Miniaturas"}],"x4":[{pt:"Pesquisa na INDE",en:"Search in SDI of INDE-Br",es:"Buscar en IDE del INDE-Br",it:"Pesquisa na INDE"}],"x5":[{pt:"Editar subgrupos",en:"Edit subgroups",es:"Editar subgrupos",it:"Editar subgrupos"}],"x6":[{pt:"Editar temas",en:"Edit Theme",es:"Editar temas",it:"Editar temas"}],"x7":[{pt:"opção visível apenas para editores",en:"option visible only for editors",es:"opción visible solo para editores",it:"opção visível apenas para editores"}],"x8":[{pt:"Sistema de administração",en:"Admin. System",es:"Sistema de administración",it:"Sistema de administração"}],"x9":[{pt:"Editar árvore",en:"Edit tree",es:"Editar árbol",it:"Editar árvore"}],"x10":[{pt:"Editar menus",en:"Edit menus",es:"Editar menus",it:"Editar menus"}],"x11":[{pt:"Mostra a legenda em uma janela",en:"Show the legend in a window",es:"Muestra una leyenda en una ventana",it:"Mostra a legenda em uma janela"}],"x13":[{pt:"&Acute;rvore de camadas não encontrada",en:"Tree layers not found",es:"Arboles de capas no se encuentra",it:"&Acute;rvore de camadas não encontrada"}],"x14":[{pt:"sim",en:"si",es:"yes",it:"sim"}],"x15":[{pt:"não",en:"no",es:"no",it:"nao"}],"x16":[{pt:"Valor não definido",en:"Value not set",es:"Valor no establecido",it:"Valor não definido"}],"x17":[{pt:"Essa opção afeta apenas a impressão do mapa",en:"This option only affects the printing of the map",es:"Esta opción s&ocaute;lo afecta a la impresi&ocaute;n del mapa",it:"Essa opção afeta apenas a impressão do mapa"}],"x18":[{pt:"Nome não definido",en:"El nombre no se ha definido",es:"Name was not defined",it:"Name was not defined"}],"x19":[{pt:"Comentários de",en:"Reviews",es:"Comentarios",it:""}],"x20":[{pt:"Clique no mapa para desenhar o polígono",en:"Click the map to draw the polygon",es:"Haga clic en el mapa para dibujar el polígono",it:"Click the map to draw the polygon"}],"x21":[{pt:"Essa operação não funciona nessa interface",en:"This operation does not work on this interface",es:"Esta operación no funciona en esta interfaz",it:""}],"x22":[{pt:"Opção não disponível",en:"Option not available",es:"Opción no disponible",it:"Opci�n no disponible"}],"x23":[{pt:"Direção",en:"",es:"Dirección",it:"Direction"}],"x25":[{pt:"Método para calcular distâncias",en:"Method to calculate distances",es:"Método para calcular distancias",it:"Method to calculate distances"}],"x26":[{pt:"Voce quer mesmo encerrar a sessao?",en:"Do you really want to logout?",es:"¿Realmente desea salir?",it:""}],"x27":[{pt:"Usuário",en:"User",es:"Usuario",it:""}],"x28":[{pt:"Senha",en:"Password",es:"Contraseña",it:""}],"x29":[{pt:"Enviar",en:"Send",es:"Enviar",it:""}],"x30":[{pt:"Ativo",en:"Active",es:"Activo",it:""}],"x31":[{pt:"Erro",en:"Error",es:"Erro",it:""}],"x32":[{pt:"Enviar senha",en:"Send password",es:"Enviar la contraseña",it:""}],"x33":[{pt:"",en:"",es:"",it:""}]}; | |
352 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.idioma={MOSTRASELETOR:true,IDSELETOR:"",SELETORES:["pt","en","es"],DICIONARIO:g_traducao,define:function(codigo){i3GEO.idioma.ATUAL=codigo;i3GEO.util.insereCookie("i3geolingua",codigo)},retornaAtual:function(){return(i3GEO.idioma.ATUAL)},defineDicionario:function(obj){i3GEO.idioma.DICIONARIO=obj},alteraDicionario:function(id,novo){i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL]=novo},traduzir:function(id){if(i3GEO.idioma.DICIONARIO[id]){var t=i3GEO.idioma.DICIONARIO[id][0];return t[i3GEO.idioma.ATUAL]}else{return}},adicionaDicionario:function(novodic){for(var k in novodic){if(novodic.hasOwnProperty(k)){i3GEO.idioma.DICIONARIO[k]=novodic[k]}}},mostraDicionario:function(){var w,k=0;w=window.open();for(k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>")}}},trocaIdioma:function(codigo){i3GEO.util.insereCookie("i3geolingua",codigo);window.location.reload(true)},listaIdiomas:function(){for(var k in i3GEO.idioma.DICIONARIO){if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k)){return(i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]))}}},mostraSeletor:function(){if(!i3GEO.idioma.MOSTRASELETOR){return}var ins,n,w,i,pos,novoel,temp,iu=i3GEO.util;ins="";n=i3GEO.idioma.SELETORES.length;if($i("i3geo")&&i3GEO.parametros.w<550){w="width:12px;"}else{w=""}for(i=0;i<n;i++){temp=i3GEO.idioma.SELETORES[i];ins+='<img style="'+w+'padding:0 0px;top:-7px;padding-right:0px;border: 1px solid white;" src="'+iu.$im("branco.gif")+'" onclick="i3GEO.idioma.trocaIdioma(\''+temp+'\')" ';if(temp==="en"){ins+='alt="Ingles" id="uk" />'}if(temp==="pt"){ins+='alt="Portugues" id="brasil" />'}if(temp==="es"){ins+='alt="Espanhol" id="espanhol" />'}if(temp==="it"){ins+='alt="Italiano" id="italiano" />'}}if(i3GEO.idioma.IDSELETOR!==""&&$i(i3GEO.idioma.IDSELETOR)){$i(i3GEO.idioma.IDSELETOR).innerHTML=ins}else{pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if(!$i("i3geoseletoridiomas")){novoel=document.createElement("div");novoel.innerHTML=ins;novoel.id="i3geoseletoridiomas";document.body.appendChild(novoel)}else{novoel=$i("i3geoseletoridiomas")}novoel.style.position="absolute";novoel.style.top=pos[1]-17+"px";novoel.style.left=pos[0]+"px";novoel.style.zIndex=5000}}};$trad=function(id){return(i3GEO.idioma.traduzir(id))};(function(){try{var c=i3GEO.util.pegaCookie("i3geolingua");if(c){i3GEO.idioma.define(c);g_linguagem=c}else{if(typeof(g_linguagem)!=="undefined"){i3GEO.idioma.define(g_linguagem)}else{g_linguagem="pt";i3GEO.idioma.define("pt")}}if(typeof('g_traducao')!=="undefined"){i3GEO.idioma.defineDicionario(g_traducao)}}catch(e){alert("Problemas com idiomas "+e)}})(); | |
353 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}cpJSON=new cpaint();cpJSON.set_response_type("JSON");cpJSON.set_transfer_mode("POST");i3GEO.php={verifica:function(){if(i3GEO.configura.locaplic===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.locaplic não esta definida")}if(i3GEO.configura.sid===undefined){alert("i3GEO.php diz: variavel i3GEO.configura.sid não esta definida")}},insereSHPgrafico:function(funcao,tema,x,y,itens,shadow_height,width,inclinacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHPgrafico&tipo=pizza&tema="+tema+"&x="+x+"&y="+y+"&itens="+itens+"&shadow_height="+shadow_height+"&width="+width+"&inclinacao="+inclinacao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereSHPgrafico",$trad("o1"));cpJSON.call(p,"insereSHPgrafico",retorno,par)},insereSHP:function(funcao,tema,item,valoritem,xy,projecao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=insereSHP&item="+item+"&valor="+valoritem+"&tema="+tema+"&xy="+xy+"&projecao="+projecao+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereSHPgrafico");funcao.call(funcao,retorno)};cpJSON.call(p,"insereSHP",retorno,par)},pegaMensagens:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMensagens&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaMensagem",funcao,par)},areaPixel:function(funcao,g_celula){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=areaPixel&celsize="+g_celula+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"areaPixel",funcao,par)},excluitema:function(funcao,temas){var layer,retorno,p,n,i,par;i3GEO.php.verifica();retorno=function(retorno){i3GEO.janela.fechaAguarde("excluitema");n=temas.length;for(i=0;i<n;i++){if(i3GEO.Interface.ATUAL==="openlayers"){layer=i3geoOL.getLayersByName(temas[i]);if(layer.length>0){i3geoOL.removeLayer(layer[0])}}if(i3GEO.Interface.ATUAL==="googlemaps"){indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(temas[i]);if(indice!==false){i3GeoMap.overlayMapTypes.removeAt(indice)}}if(i3GEO.Interface.ATUAL==="googleearth"){indice=i3GEO.Interface.googleearth.retornaObjetoLayer(temas[i]);i3GeoMap.getFeatures().removeChild(indice)}}funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("excluitema",$trad("o1"));p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php";par="funcao=excluitema&temas="+temas+"&g_sid="+i3GEO.arvoreDeCamadas.SID;cpJSON.call(p,"excluitema",retorno,par)},reordenatemas:function(funcao,lista){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=reordenatemas&lista="+lista+"&g_sid="+i3GEO.arvoreDeCamadas.SID,retorno=function(retorno){i3GEO.janela.fechaAguarde("reordenatemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reordenatemas",$trad("o1"));cpJSON.call(p,"reordenatemas",retorno,par)},criaLegendaHTML:function(funcao,tema,template){i3GEO.php.verifica();if(arguments.length===1){tema="";template="legenda2.htm"}if(arguments.length===2){template="legenda2.htm"}cpJSON.call(i3GEO.configura.locaplic+"/classesphp/mapa_controle.php","criaLegendaHTML",funcao,"funcao=criaLegendaHTML&tema="+tema+"&templateLegenda="+template+"&g_sid="+i3GEO.configura.sid)},inverteStatusClasse:function(funcao,tema,classe){i3GEO.php.verifica();var p=i3GEO.arvoreDeCamadas.LOCAPLIC+"/classesphp/mapa_controle.php",par="funcao=inverteStatusClasse&g_sid="+i3GEO.arvoreDeCamadas.SID+"&tema="+tema+"&classe="+classe,retorno=function(retorno){i3GEO.janela.fechaAguarde("inverteStatusClasse");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("inverteStatusClasse",$trad("o1"));cpJSON.call(p,"inverteStatusClasse",retorno,par)},ligatemas:function(funcao,desligar,ligar,adicionar){i3GEO.php.verifica();if(arguments.length===3){adicionar="nao"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ligatemas&desligar="+desligar+"&ligar="+ligar+"&adicionar="+adicionar+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){funcao.call(funcao,retorno)};cpJSON.call(p,"ligaDesligaTemas",retorno,par)},pegalistademenus:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistademenus&g_sid="+i3GEO.configura.sid+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistademenus",funcao,par)},pegalistadegrupos:function(funcao,id_menu,listasgrupos){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadegrupos&map_file=&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&listasistemas=nao&listasgrupos="+listasgrupos+"&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadegrupos",funcao,par)},pegalistadeSubgrupos:function(funcao,id_menu,id_grupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadeSubgrupos&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadeSubgrupos",funcao,par)},pegalistadetemas:function(funcao,id_menu,id_grupo,id_subgrupo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegalistadetemas&g_sid="+i3GEO.configura.sid+"&idmenu="+id_menu+"&grupo="+id_grupo+"&subgrupo="+id_subgrupo+"&map_file=&idioma="+i3GEO.idioma.ATUAL;cpJSON.call(p,"pegalistadetemas",funcao,par)},listaTemas:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemas&g_sid="+sid+"&tipo="+tipo;cpJSON.call(p,"listaTemas",funcao,par)},listaTemasEditaveis:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemaslocais&g_sid="+sid;cpJSON.call(p,"listatemaslocais",funcao,par)},listaTemasComSel:function(funcao,locaplic,sid){if(arguments.length===1){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=listatemascomsel&g_sid="+sid;cpJSON.call(p,"listaTemasComSel",funcao,par)},listatemasTipo:function(funcao,tipo,locaplic,sid){if(arguments.length===2){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=&funcao=listatemasTipo&tipo="+tipo+"&g_sid="+sid;cpJSON.call(p,"listatemasTipo",funcao,par)},pegaSistemas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaSistemas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},listadrives:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaDrives&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"listaDrives",funcao,par)},listaarquivos:function(funcao,caminho){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaArquivos&diretorio="+caminho;cpJSON.call(p,"listaArquivos",funcao,par)},geo2utm:function(funcao,x,y){i3GEO.php.verifica();if($i("aguardeGifAberto")||x<-180){return}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geo2utm&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"geo2utm",funcao,par)},desativacgi:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=desativacgi&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"desativacgi",funcao,par)},pegaMapas:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pegaMapas&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pegaSistemas",funcao,par)},mudatamanho:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatamanho&altura="+altura+"&largura="+largura+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatamanho");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatamanho",$trad("o1"));cpJSON.call(p,"pegaSistemas",retorno,par)},ativalogo:function(funcao,altura,largura){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=ativalogo&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("ativalogo");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("ativalogo",$trad("o1"));cpJSON.call(p,"ativalogo",retorno,par)},insereAnnotation:function(funcao,pin,xy,texto,position,partials,offsetx,offsety,minfeaturesize,mindistance,force,shadowcolor,shadowsizex,shadowsizey,outlinecolor,cor,sombray,sombrax,sombra,fundo,angulo,tamanho,fonte){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inserefeature&pin="+pin+"&tipo=ANNOTATION&xy="+xy+"&texto="+texto+"&position="+position+"&partials="+partials+"&offsetx="+offsetx+"&offsety="+offsety+"&minfeaturesize="+minfeaturesize+"&mindistance="+mindistance+"&force="+force+"&shadowcolor="+shadowcolor+"&shadowsizex="+shadowsizex+"&shadowsizey="+shadowsizey+"&outlinecolor="+outlinecolor+"&cor="+cor+"&sombray="+sombray+"&sombrax="+sombrax+"&sombra="+sombra+"&fundo="+fundo+"&angulo="+angulo+"&tamanho="+tamanho+"&fonte="+fonte+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("insereAnnotation");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("insereAnnotation",$trad("o1"));cpJSON.call(p,"inserefeature",retorno,par)},identificaunico:function(funcao,xy,tema,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=identificaunico&xy="+xy+"&resolucao=5&tema="+tema+"&item="+item+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"identificaunico",funcao,par)},recuperamapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=recuperamapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("recuperamapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("recuperamapa",$trad("o1"));cpJSON.call(p,"recuperamapa",retorno,par)},criaLegendaImagem:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaLegendaImagem&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"criaLegendaImagem",funcao,par)},referenciadinamica:function(funcao,zoom,tipo){i3GEO.php.verifica();if(arguments.length===2){tipo="dinamico"}var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referenciadinamica&g_sid="+i3GEO.configura.sid+"&zoom="+zoom+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferenciaDinamica",funcao,par)},referencia:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=referencia&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"retornaReferencia",funcao,par)},pan:function(funcao,escala,tipo,x,y){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=pan&escala="+escala+"&tipo="+tipo+"&x="+x+"&y="+y+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"pan",funcao,par)},aproxima:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=aproxima&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"aproxima",funcao,par)},afasta:function(funcao,nivel){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=afasta&nivel="+nivel+"&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"afasta",funcao,par)},zoomponto:function(funcao,x,y,tamanho,simbolo,cor){i3GEO.php.verifica();if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}var retorno=function(retorno){i3GEO.janela.fechaAguarde("zoomponto");if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(x,y)}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.pan2ponto(x,y)}funcao.call(funcao,retorno)},p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=zoomponto&pin=pin&xy="+x+" "+y+"&g_sid="+i3GEO.configura.sid+"&marca="+simbolo+"&tamanho="+tamanho+"&cor="+cor;i3GEO.janela.abreAguarde("zoomponto",$trad("o1"));cpJSON.call(p,"zoomponto",retorno,par)},localizaIP:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=localizaIP&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"localizaIP",funcao,par)},mudaext:function(funcao,tipoimagem,ext,locaplic,sid,atualiza,geo){var retorno;if(arguments.length===3){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;atualiza=true;geo=false}if(geo===undefined){geo=false}if(atualiza===undefined){atualiza=true}if(ext===undefined){alert("extensao nao definida");return}retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":if(atualiza===true){i3GEO.Interface.googlemaps.zoom2extent(ext)}break;case"googleearth":if(atualiza===true){i3GEO.Interface.googleearth.zoom2extent(ext)}break;case"openlayers":i3GEO.Interface.openlayers.zoom2ext(ext);break}try{funcao.call(funcao,retorno)}catch(e){}};var p=locaplic+"/classesphp/mapa_controle.php";var par="funcao=mudaext&tipoimagem="+tipoimagem+"&ext="+ext+"&g_sid="+sid+"&geo="+geo;cpJSON.call(p,"mudaext",retorno,par)},mudaescala:function(funcao,escala){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudaescala&escala="+escala+"&g_sid="+i3GEO.configura.sid+"&tipoimagem="+i3GEO.configura.tipoimagem,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudaescala");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudaescala",$trad("o1"));cpJSON.call(p,"mudaescala",retorno,par)},aplicaResolucao:function(funcao,resolucao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=crialente&resolucao="+resolucao+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"crialente",funcao,par)},geradestaque:function(funcao,tema,ext){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=geradestaque&tema="+tema+"&g_sid="+i3GEO.configura.sid+"&ext="+ext,retorno=function(retorno){i3GEO.janela.fechaAguarde("geradestaque");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("geradestaque",$trad("o1"));cpJSON.call(p,"geradestaque",retorno,par)},selecaopt:function(funcao,tema,xy,tipo,tolerancia){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=selecaopt&tema="+tema+"&tipo="+tipo+"&xy="+xy+"&tolerancia="+tolerancia+"&g_sid="+i3GEO.configura.sid+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoPT",funcao,par)},selecaobox:function(funcao,tema,tipo,box){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=selecaobox&ext="+box+"&g_sid="+i3GEO.configura.sid+"&tipo="+tipo+"&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaobox",funcao,par)},selecaoext:function(funcao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoext&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoext",funcao,par)},selecaoatrib2:function(funcao,tema,filtro,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaoatrib2&tema="+tema+"&filtro="+filtro+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaoatrib2",funcao,par)},selecaotema:function(funcao,temao,tema,tipo){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=selecaotema&temao="+temao+"&tema="+tema+"&tipo="+tipo+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"selecaotema",funcao,par)},sobetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=sobetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("sobetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("sobetema",$trad("o1"));cpJSON.call(p,"sobetema",retorno,par)},descetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=descetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("descetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("descetema",$trad("o1"));cpJSON.call(p,"descetema",retorno,par)},fontetema:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=fontetema&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("fontetema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("fontetema",$trad("o1"));cpJSON.call(p,"fontetema",retorno,par)},zoomtema:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomtema");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomtema&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomtema",$trad("o1"));cpJSON.call(p,"zoomtema",retorno,par)},zoomsel:function(funcao,tema){i3GEO.php.verifica();var retorno,p,par;retorno=function(retorno){switch(i3GEO.Interface.ATUAL){case"googlemaps":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"googleearth":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break;case"openlayers":i3GEO.atualizaParametros(retorno.data.variaveis);i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);i3GEO.janela.fechaAguarde("zoomsel");break}};p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php";par="funcao=zoomsel&tema="+tema+"&g_sid="+i3GEO.configura.sid;i3GEO.janela.abreAguarde("zoomsel",$trad("o1"));cpJSON.call(p,"zoomsel",retorno,par)},limpasel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=limpasel&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("limpasel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("limpasel",$trad("o1"));cpJSON.call(p,"limpasel",retorno,par)},invertestatuslegenda:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=invertestatuslegenda&tema="+tema+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("invertestatuslegenda");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("invertestatuslegenda",$trad("o1"));cpJSON.call(p,"invertestatuslegenda",retorno,par)},aplicaCorClasseTema:function(funcao,idtema,idclasse,rgb){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=alteraclasse&opcao=alteracor&tema="+idtema+"&idclasse="+idclasse+"&cor="+rgb+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("aplicaCorClasseTema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("aplicaCorClasseTema",$trad("o1"));cpJSON.call(p,"aplicaCorClasseTema",retorno,par)},mudatransp:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudatransp&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudatransp");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudatransp",$trad("o1"));cpJSON.call(p,"mudatransp",retorno,par)},mudanome:function(funcao,tema,valor){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=mudanome&tema="+tema+"&valor="+valor+"&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("mudanome");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("mudanome",$trad("o1"));cpJSON.call(p,"mudanome",retorno,par)},adicionaTemaWMS:function(funcao,servico,tema,nome,proj,formato,versao,nomecamada,tiporep,suportasld,formatosinfo,locaplic,sid){if(arguments.length===11){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="g_sid="+sid+"&funcao=adicionatemawms&servico="+servico+"&tema="+tema+"&nome="+nome+"&proj="+proj+"&formato="+formato+"&versao="+versao+"&nomecamada="+nomecamada+"&tiporep="+tiporep+"&suportasld="+suportasld+"&formatosinfo="+formatosinfo;cpJSON.call(p,"adicionatemawms",funcao,par)},adicionaTemaSHP:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaSHP&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaSHP");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaSHP",$trad("o1"));cpJSON.call(p,"adicionaTemaSHP",retorno,par)},adicionaTemaIMG:function(funcao,path){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=adicionaTemaIMG&arq="+path,retorno=function(retorno){i3GEO.janela.fechaAguarde("adicionaTemaIMG");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adicionaTemaIMG",$trad("o1"));cpJSON.call(p,"adicionaTemaIMG",retorno,par)},identifica:function(funcao,x,y,resolucao,locaplic,sid){var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica&opcao=tip&xy="+x+","+y+"&resolucao=5&g_sid="+sid;cpJSON.call(p,"identifica",funcao,par)},identifica2:function(funcao,x,y,resolucao,opcao,locaplic,sid,tema,ext,listaDeTemas){if(arguments.length===4){opcao="tip";locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas="";resolucao=5}if(arguments.length===5){locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid;ext="";listaDeTemas=""}if(listaDeTemas===undefined){listaDeTemas=""}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=identifica2&opcao="+opcao+"&xy="+x+","+y+"&resolucao="+resolucao+"&g_sid="+sid+"&ext="+ext+"&listaDeTemas="+listaDeTemas;if(opcao!=="tip"){par+="&tema="+tema}cpJSON.call(p,"identifica",funcao,par)},reiniciaMapa:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=reiniciaMapa&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("reiniciaMapa");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("reiniciaMapa",$trad("o1"));cpJSON.call(p,"reiniciaMapa",retorno,par)},procurartemas:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemas2:function(funcao,procurar,locaplic){if(arguments.length===2){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemas2&map_file=&procurar="+procurar+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemas");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemas",$trad("o1"));cpJSON.call(p,"procurartemas",retorno,par)}catch(e){}},procurartemasestrela:function(funcao,nivel,fatorestrela,locaplic){if(arguments.length===3){locaplic=i3GEO.configura.locaplic}try{var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=procurartemasestrela&map_file=&nivel="+nivel+"&fatorestrela="+fatorestrela+"&idioma="+i3GEO.idioma.ATUAL,retorno=function(retorno){i3GEO.janela.fechaAguarde("procurartemasestrela");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("procurartemasestrela",$trad("o1"));cpJSON.call(p,"foo",retorno,par)}catch(e){}},adtema:function(funcao,temas,locaplic,sid){if(arguments.length===2){i3GEO.php.verifica();locaplic=i3GEO.configura.locaplic;sid=i3GEO.configura.sid}var p=locaplic+"/classesphp/mapa_controle.php",par="funcao=adtema&temas="+temas+"&g_sid="+sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("adtema");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("adtema",$trad("o1"));cpJSON.call(p,"adtema",retorno,par)},escalagrafica:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=escalagrafica&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"escalagrafica",funcao,par)},googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googlemaps",$trad("o1"));cpJSON.call(p,"googlemaps",retorno,par)},googleearth:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=googleearth&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("googleearth");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("googleearth",$trad("o1"));cpJSON.call(p,"googleearth",retorno,par)},openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("openlayers",$trad("o1"));cpJSON.call(p,"openlayers",retorno,par)},corpo:function(funcao,tipoimagem){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=corpo&tipoimagem="+tipoimagem+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.recalcPar();par+="&mapexten="+i3GEO.parametros.mapexten}cpJSON.call(p,"corpo",funcao,par)},converte2googlemaps:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2googlemaps&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2googlemaps");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2googlemaps",$trad("o1"));cpJSON.call(p,"converte2googlemaps",retorno,par)},converte2openlayers:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=converte2openlayers&g_sid="+i3GEO.configura.sid,retorno=function(retorno){i3GEO.janela.fechaAguarde("converte2openlayers");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("converte2openlayers",$trad("o1"));cpJSON.call(p,"converte2openlayers",retorno,par)},criamapa:function(funcao,parametros){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=criaMapa&"+parametros,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"criaMapa",funcao,par)},inicia:function(funcao,embedLegenda,w,h){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=inicia&embedLegenda="+embedLegenda+"&w="+w+"&h="+h+"&g_sid="+i3GEO.configura.sid+"&interface="+i3GEO.Interface.ATUAL,cp=new cpaint();cp.set_response_type("JSON");if(i3GEO.util.versaoNavegador()==="FF3"){cp.set_async(true)}else{cp.set_async(false)}cp.set_transfer_mode("POST");cp.call(p,"iniciaMapa",funcao,par)},chaveGoogle:function(funcao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=chavegoogle&g_sid="+i3GEO.configura.sid;cpJSON.call(p,"chavegoogle",funcao,par)},listaRSSwsARRAY:function(funcao,tipo){var p=i3GEO.configura.locaplic+"/classesphp/wscliente.php",par="funcao=listaRSSwsARRAY&rss="+["|"]+"&tipo="+tipo;cpJSON.call(p,"listaRSSwsARRAY",funcao,par)},listaLayersWMS:function(funcao,servico,nivel,id_ws,nomelayer){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="funcao=listaLayersWMS&servico="+servico+"&nivel="+nivel+"&id_ws="+id_ws+"&nomelayer="+nomelayer;cpJSON.call(p,"listaLayersWMS",funcao,par)},buscaRapida:function(funcao,locaplic,servico,palavra){var p=locaplic+"/classesphp/mapa_controle.php",par="map_file=&funcao=buscaRapida&palavra="+palavra+"&servico="+servico;cpJSON.call(p,"buscaRapida",funcao,par)},listaItensTema:function(funcao,tema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaitens&tema="+tema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaItensTema",funcao,par)},listaValoresItensTema:function(funcao,tema,itemTema){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaregistros&unico=sim&tema="+tema+"&itemtema="+itemTema+"&ext="+i3GEO.parametros.mapexten;cpJSON.call(p,"listaRegistros",funcao,par)},extRegistros:function(funcao,tema,reg){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=extregistros®istro="+reg+"&tema="+tema;cpJSON.call(p,"listaItensTema",funcao,par)},listaFontesTexto:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listatruetype";cpJSON.call(p,"listaTrueType",funcao,par)},listaEpsg:function(funcao){var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=listaEpsg&map_file=";cpJSON.call(p,"listaEpsg",funcao,par)},criatemaSel:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=criatemasel&tema="+tema+"&nome=Novo tema "+tema,retorno=function(retorno){i3GEO.janela.fechaAguarde("criatemaSel");funcao.call(funcao,retorno)};i3GEO.janela.abreAguarde("criatemaSel",$trad("o1"));cpJSON.call(p,"chavegoogle",retorno,par)},pegaData:function(funcao,tema){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=pegadata&tema="+tema;cpJSON.call(p,"pegadata",funcao,par)},alteraData:function(funcao,tema,data){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php",par="g_sid="+i3GEO.configura.sid+"&funcao=alteradata&tema="+tema+"&novodata="+data;cpJSON.call(p,"alteradata",funcao,par)},dadosPerfilRelevo:function(funcao,opcao,pontos,amostragem,item){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=dadosPerfilRelevo&opcao="+opcao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&pontos="+pontos+"&amostragem="+amostragem+"&item="+item)},funcoesGeometriasWkt:function(funcao,listaWkt,operacao){i3GEO.php.verifica();var p=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?g_sid="+i3GEO.configura.sid+"&funcao=funcoesGeometriasWkt&operacao="+operacao,cp=new cpaint();cp.set_transfer_mode('POST');cp.set_response_type("JSON");cp.call(p,"foo",funcao,"&geometrias="+listaWkt)}}; | |
354 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.configura={grupoLayers:"",oMenuData:{menu:[{nome:$trad("s1"),id:"ajudaMenu"},{nome:$trad("s2"),id:"analise"},{nome:$trad("s3"),id:"janelas"},{nome:$trad("s4"),id:"arquivos"},{nome:$trad("d32"),id:"interface"},{nome:$trad("u15a"),id:"ferramentas"}],submenus:{"ajudaMenu":[{id:"omenudataAjudamenu1",text:$trad("u1"),url:"http://www.softwarepublico.gov.br/spb/ver-comunidade?community_id=1444332",target:"_blank"},{id:"omenudataAjudamenu2",text:$trad("u2"),url:"javascript:i3GEO.ajuda.abreDoc()"},{id:"omenudataAjudamenu3",text:$trad("u4a"),url:"javascript:i3GEO.ajuda.abreDoc('/documentacao/manual-i3geo-4_7-pt.pdf')"},{id:"omenudataAjudamenu4",text:$trad("u4"),url:"http://www.softwarepublico.gov.br/dotlrn/clubs/i3geo/file-storage/index?folder%5fid=22667525",target:"_blank"},{id:"omenudataAjudamenu5",text:$trad("u5a"),url:"http://www.softwarepublico.gov.br",target:"_blank"},{id:"omenudataAjudamenu7",text:$trad("u5b"),url:"javascript:i3GEO.ajuda.abreDoc('/ajuda_usuario.php')"},{id:"omenudataAjudamenu8",text:$trad("u5c"),url:"javascript:i3GEO.ajuda.redesSociais()"}],"analise":[{id:"omenudataAnalise1",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u22")+'</b></span>',url:"#"},{id:"omenudataAnalise2",text:$trad("u7"),url:"javascript:i3GEO.analise.dialogo.gradePol()"},{id:"omenudataAnalise3",text:$trad("u8"),url:"javascript:i3GEO.analise.dialogo.gradePontos()"},{id:"omenudataAnalise4",text:$trad("u9"),url:"javascript:i3GEO.analise.dialogo.gradeHex()"},{id:"omenudataAnalise5",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u23")+'</b></span>',url:"#"},{id:"omenudataAnalise6",text:$trad("u11a"),url:"javascript:i3GEO.analise.dialogo.distanciaptpt()"},{id:"omenudataAnalise7",text:$trad("u12"),url:"javascript:i3GEO.analise.dialogo.nptPol()"},{id:"omenudataAnalise8",text:$trad("u13"),url:"javascript:i3GEO.analise.dialogo.pontoempoligono()"},{id:"omenudataAnalise9",text:$trad("u14"),url:"javascript:i3GEO.analise.dialogo.pontosdistri()"},{id:"omenudataAnalise9a",text:$trad("u28"),url:"javascript:i3GEO.analise.dialogo.centromassa()"},{id:"omenudataAnalise10",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u24")+'</b></span>',url:"#"},{id:"omenudataAnalise11",text:$trad("u25"),url:"javascript:i3GEO.analise.dialogo.dissolve()"},{id:"omenudataAnalise12",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataAnalise13",text:$trad("u6"),url:"javascript:i3GEO.analise.dialogo.analisaGeometrias()"},{id:"omenudataAnalise14",text:$trad("u10"),url:"javascript:i3GEO.analise.dialogo.buffer()"},{id:"omenudataAnalise15",text:$trad("u26"),url:"javascript:i3GEO.analise.dialogo.agrupaElementos()"},{id:"omenudataAnalise16",text:$trad("u11"),url:"javascript:i3GEO.analise.dialogo.centroide()"},{id:"omenudataAnalise17",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataAnalise18",text:$trad("d30"),url:"javascript:i3GEO.analise.dialogo.linhaDoTempo()"}],"janelas":[{id:"omenudataJanelas1",text:$trad("u15"),url:"javascript:i3GEO.barraDeBotoes.reativa(0);i3GEO.barraDeBotoes.reativa(1)"},{id:"omenudataJanelas2",text:$trad("u16"),url:"javascript:i3GEO.ajuda.abreJanela()"},{id:"omenudataJanelas3",text:$trad("u29"),url:"javascript:i3GEO.barraDeBotoes.editor.inicia()"}],"arquivos":[{id:"omenudataArquivos1",text:$trad("u17"),url:"javascript:i3GEO.mapa.dialogo.salvaMapa()"},{id:"omenudataArquivos2",text:$trad("u18"),url:"javascript:i3GEO.mapa.dialogo.carregaMapa()"},{id:"omenudataArquivos4",text:$trad("u20"),url:"javascript:i3GEO.mapa.dialogo.convertews()"},{id:"omenudataArquivos5",text:$trad("u20a"),url:"javascript:i3GEO.mapa.dialogo.convertekml()"}],"interface":[{id:"omenudataInterface0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("d27")+'</b></span>',url:"#"},{id:"omenudataInterface2",text:"OpenLayers",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface10",text:"OpenLayers tablet",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/openlayers_t.htm?'+i3GEO.configura.sid"},{id:"omenudataInterface4",text:"Google Maps",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googlemaps.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface5",text:"Google Earth",url:"javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid"},{id:"omenudataInterface0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("u27")+'</b></span>',url:"#"},{id:"omenudataInterface6",text:$trad("u21"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')"},{id:"omenudataInterface7",text:"Serviços WMS",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')"},{id:"omenudataInterface8",text:"Hiperbólica",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/hiperbolica.html')"},{id:"omenudataInterface9",text:"Download de dados",url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')"},{id:"omenudataInterface11",text:$trad("p20"),url:"javascript:i3GEO.mapa.dialogo.telaRemota()"}],"ferramentas":[{id:"omenudataFerramentas0a",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("g4a")+'</b></span>',url:"#"},{id:"omenudataFerramentas4a",text:$trad("g1a"),url:"javascript:i3GEO.arvoreDeTemas.flutuante()"},{id:"omenudataFerramentas1a",text:$trad("t20"),url:"javascript:i3GEO.mapa.dialogo.opacidade()"},{id:"omenudataFerramentas2a",text:$trad("p21"),url:"javascript:i3GEO.mapa.dialogo.animacao()"},{id:"omenudataFerramentas3a",text:$trad("d24t"),url:"javascript:i3GEO.mapa.dialogo.selecao();"},{id:"omenudataFerramentas0b",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a7")+'</b></span>',url:"#"},{id:"omenudataFerramentas1b",text:$trad("t31"),url:"javascript:i3GEO.tema.dialogo.tabela()"},{id:"omenudataFerramentas2b",text:$trad("t23"),url:"javascript:i3GEO.tema.dialogo.procuraratrib()"},{id:"omenudataFerramentas3b",text:$trad("t25"),url:"javascript:i3GEO.tema.dialogo.toponimia()"},{id:"omenudataFerramentas4b",text:$trad("t27"),url:"javascript:i3GEO.tema.dialogo.etiquetas()"},{id:"omenudataFerramentas5b",text:$trad("t29"),url:"javascript:i3GEO.tema.dialogo.filtro()"},{id:"omenudataFerramentas6b",text:$trad("t33"),url:"javascript:i3GEO.tema.dialogo.editaLegenda()"},{id:"omenudataFerramentas7b",text:$trad("t42"),url:"javascript:i3GEO.tema.dialogo.cortina()"},{id:"omenudataFerramentas8b",text:$trad("t37a"),url:"javascript:i3GEO.tema.dialogo.graficotema()"},{id:"omenudataFerramentas9b",text:$trad("t37b"),url:"javascript:i3GEO.analise.dialogo.graficoInterativo()"},{id:"omenudataFerramentas10b",text:$trad("t49"),url:"javascript:i3GEO.tema.dialogo.tme()"},{id:"omenudataFerramentas0c",text:'<span style=color:gray;text-decoration:underline; ><b>'+$trad("a15")+'</b></span>',url:"#"},{id:"omenudataFerramentas1c",text:$trad("a16"),url:"javascript:i3GEO.arvoreDeTemas.dialogo.conectaservico()"},{id:"omenudataFerramentas0d",text:'<span style=color:gray;text-decoration:underline; ><b>Upload</b></span>',url:"#"},{id:"omenudataFerramentas3d",text:"Vetor (shp,dbf,csv,gpx,kml)",url:"javascript:i3GEO.arvoreDeTemas.dialogo.uploadarquivo()"}]}},tipoimagem:"nenhum",ajustaDocType:true,tipotip:"balao",alturatip:"200px",larguratip:"200px",funcaoTip:"i3GEO.mapa.dialogo.verificaTipDefault()",funcaoIdentifica:"i3GEO.mapa.dialogo.cliqueIdentificaDefault()",diminuixM:0,diminuixN:0,diminuiyM:70,diminuiyN:70,autotamanho:false,map3d:"",embedLegenda:"nao",templateLegenda:"",mashuppar:"",sid:"",locaplic:"",mapaRefDisplay:"block",visual:"default",cursores:{"identifica":{ff:"pointer",ie:"pointer"},"pan":{ff:"/imagens/cursores/pan.png",ie:"/imagens/cursores/pan.cur"},"area":{ff:"crosshair",ie:"crosshair"},"distancia":{ff:"crosshair",ie:"crosshair"},"zoom":{ff:"/imagens/cursores/zoom.png",ie:"/imagens/cursores/zoom.cur"},"contexto":{ff:"/imagens/cursores/contexto.png",ie:"/imagens/cursores/contexto.cur"},"identifica_contexto":{ff:"pointer",ie:"pointer"},"pan_contexto":{ff:"/imagens/cursores/pan_contexto.png",ie:"/imagens/cursores/pan_contexto.cur"},"zoom_contexto":{ff:"/imagens/cursores/zoom_contexto.png",ie:"/imagens/cursores/zoom_contexto.cur"}},listaDePropriedadesDoMapa:{"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p5",url:"javascript:i3GEO.mapa.dialogo.tamanho()"},{text:"p7",url:"javascript:i3GEO.mapa.ativaLogo()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"},{text:"p12",url:"javascript:i3GEO.mapa.dialogo.autoredesenha()"}]},tempoAplicar:4000,tempoMouseParado:1800,iniciaJanelaMensagens:false,mostraRosaDosVentos:"nao",liberaGuias:"nao",funcoesBotoes:{"botoes":[{iddiv:"historicozoom",tipo:"",dica:"",constroiconteudo:'i3GEO.gadgets.mostraHistoricoZoom()'},{iddiv:"zoomtot",tipo:"",dica:$trad("d2"),titulo:$trad("d2t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.extentTotal);return}if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(i3GEO.parametros.extentTotal);return}i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,i3GEO.configura.tipoimagem,i3GEO.parametros.extentTotal);marcadorZoom=""}},{iddiv:"localizar",tipo:"",dica:$trad("o2"),titulo:$trad("o2"),funcaoonclick:function(){if(!$i("janelaBuscaRapida")){var janela=i3GEO.janela.cria("258px","20px","","","","Busca rápida","janelaBuscaRapida",false,"hd","","");$i("janelaBuscaRapida_corpo").style.backgroundColor="white";i3GEO.gadgets.mostraBuscaRapida(janela[2].id)}}},{iddiv:"zoomli",tipo:"dinamico",dica:$trad("d3"),titulo:$trad("d3t"),funcaoonclick:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.mensagemSimples("Pressione a tecla CTRL junto com o botão esquerdo do mouse e arraste para definir a área de zoom","?");g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}var temp;temp="zoom";i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);g_operacao='navega';g_tipoacao='zoomli';i3GEO.barraDeBotoes.ativaIcone("zoomli");marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLzoom);return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}if(i3GEO.eventos.MOUSEDOWN.toString().search("i3GEO.navega.zoomBox.inicia()")<0){i3GEO.eventos.MOUSEDOWN.push("i3GEO.navega.zoomBox.inicia()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}i3GEO.barraDeBotoes.BOTAOPADRAO="zoomli"}},{iddiv:"pan",tipo:"dinamico",dica:$trad("d4"),titulo:$trad("d4t"),funcaoonclick:function(){var temp;g_tipoacao='pan';g_operacao='navega';i3GEO.barraDeBotoes.ativaIcone("pan");i3GEO.barraDeBotoes.BOTAOPADRAO="pan";if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setOptions({draggable:true});i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pan",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic);return}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="pan";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="pan_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}marcadorZoom="";if(i3GEO.Interface.ATUAL==="openlayers"){if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}return}}},{iddiv:"zoomiauto",tipo:"",dica:$trad("d5"),titulo:$trad("d5t"),funcaoonclick:function(){i3GEO.navega.zoomin(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=''}},{iddiv:"zoomoauto",tipo:"",dica:$trad("d6"),titulo:$trad("d6t"),funcaoonclick:function(){i3GEO.navega.zoomout(i3GEO.configura.locaplic,i3GEO.configura.sid);marcadorZoom=""}},{iddiv:"identifica",tipo:"dinamico",dica:$trad("d7"),titulo:$trad("d7t"),funcaoonclick:function(){var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO&&i3GEO.Interface.ATUAL!=="googlemaps"){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identifica");g_tipoacao='identifica';g_operacao='identifica';cliqueIdentifica=function(){if(g_operacao==="identifica"||i3GEO.barraDeBotoes.BOTAOPADRAO==="identifica"){g_operacao="identifica";eval(i3GEO.configura.funcaoIdentifica)}var temp=function(){},i;i3GEO.util.criaPin("i3GEOmarcaIdentifica",i3GEO.configura.locaplic+"/imagens/marcaidentify.png",48,48,temp);i3GEO.util.posicionaImagemNoMapa("i3GEOmarcaIdentifica");i=$i("i3GEOmarcaIdentifica");if(i){i.style.display="block"}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")<0){i3GEO.eventos.MOUSECLIQUE.push("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSECLIQUE.remove("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")>0){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}}},{iddiv:"identificaBalao",tipo:"dinamico",dica:$trad("d7a"),titulo:$trad("d7at"),funcaoonclick:function(){if(i3GEO.arvoreDeCamadas.filtraCamadas("etiquetas","","diferente",i3GEO.arvoreDeCamadas.CAMADAS)===""){alert($trad("d31"));return}var temp;if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}i3GEO.barraDeBotoes.ativaIcone("identificaBalao");g_tipoacao='identifica';g_operacao='identifica';verificaTip=function(){if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}if($i("marcaIdentifica")){return}if(g_operacao==="identifica"){eval(i3GEO.configura.funcaoTip)}else{i3GEO.eventos.MOUSEPARADO.remove("verificaTip()")}};if(i3GEO.eventos.MOUSECLIQUE.toString().search("cliqueIdentifica()")>0){i3GEO.eventos.MOUSECLIQUE.remove("cliqueIdentifica()")}if(i3GEO.eventos.MOUSECLIQUE.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSECLIQUE.push("verificaTip()")}if(i3GEO.eventos.MOUSEPARADO.toString().search("verificaTip()")<0){i3GEO.eventos.MOUSEPARADO.push("verificaTip()")}}},{iddiv:"exten",tipo:"",dica:$trad("d8"),titulo:$trad("d8t"),funcaoonclick:function(){i3GEO.mapa.dialogo.mostraExten()}},{iddiv:"referencia",tipo:"",dica:$trad("d9"),titulo:$trad("d9t"),funcaoonclick:function(){i3GEO.maparef.inicia()}},{iddiv:"wiki",tipo:"",dica:$trad("d11"),titulo:$trad("d11t"),funcaoonclick:function(){i3GEO.navega.dialogo.wiki()}},{iddiv:"metar",tipo:"",dica:$trad("d29"),titulo:$trad("d29"),funcaoonclick:function(){i3GEO.navega.dialogo.metar()}},{iddiv:"buscafotos",tipo:"",dica:"Fotos",titulo:"fotos",funcaoonclick:function(){i3GEO.navega.dialogo.buscaFotos()}},{iddiv:"imprimir",tipo:"",dica:$trad("d12"),titulo:$trad("d12"),funcaoonclick:function(){i3GEO.mapa.dialogo.imprimir()}},{iddiv:"ondeestou",tipo:"",dica:$trad("d13"),funcaoonclick:function(){i3GEO.navega.zoomIP(i3GEO.configura.locaplic,i3GEO.configura.sid)}},{iddiv:"v3d",tipo:"",dica:$trad("d14"),titulo:$trad("d14"),funcaoonclick:function(){i3GEO.mapa.dialogo.t3d()}},{iddiv:"google",tipo:"",dica:$trad("d15"),titulo:$trad("d15t"),funcaoonclick:function(){i3GEO.navega.dialogo.google()}},{iddiv:"scielo",tipo:"",dica:$trad("d16"),titulo:$trad("d16t"),funcaoonclick:function(){scieloAtivo=false;g_operacao="navega";i3GEO.janela.cria("450px","190px",i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm","","","Scielo");atualizascielo=function(){var docel;try{docel=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument;if(docel.getElementById("resultadoscielo")){$i("wdocai").src=i3GEO.configura.locaplic+"/ferramentas/scielo/index.htm"}else{i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){GEvent.removeListener(scieloDragend);GEvent.removeListener(scieloZoomend)}}}catch(e){scieloAtivo=false;i3GEO.eventos.NAVEGAMAPA.remove("atualizascielo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizascielo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizascielo()");if(i3GEO.Interface.ATUAL==="googlemaps"){scieloDragend=GEvent.addListener(i3GeoMap,"dragend",function(){atualizascielo()});scieloZoomend=GEvent.addListener(i3GeoMap,"zoomend",function(){atualizascielo()})}}}},{iddiv:"confluence",tipo:"",dica:$trad("d17"),titulo:$trad("d17t"),funcaoonclick:function(){i3GEO.navega.dialogo.confluence()}},{iddiv:"lentei",tipo:"",dica:$trad("d18"),titulo:$trad("d18t"),funcaoonclick:function(){if(i3GEO.navega.lente.ESTAATIVA==="nao"){i3GEO.navega.lente.inicia()}else{i3GEO.navega.lente.desativa()}}},{iddiv:"encolheFerramentas",tipo:"",dica:$trad("d19"),funcaoonclick:function(){i3GEO.guias.libera()}},{iddiv:"reinicia",tipo:"",dica:$trad("d20"),titulo:$trad("d20t"),funcaoonclick:function(){var temp=function(){var url=(window.location.href.split("?"));window.location.href=url[0]+"?"+i3GEO.configura.sid};i3GEO.php.reiniciaMapa(temp)}},{iddiv:"mede",tipo:"dinamico",dica:$trad("d21"),titulo:$trad("d21t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("mede");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"distancia",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeDistancia.inicia()}},{iddiv:"area",tipo:"dinamico",dica:$trad("d21a"),titulo:$trad("d21at"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("area");if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";i3GEO.util.mudaCursor(i3GEO.configura.cursores,"area",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}g_tipoacao="";g_operacao="";i3GEO.analise.medeArea.inicia()}},{iddiv:"barraedicao",tipo:"",dica:$trad("u29"),titulo:$trad("u29"),funcaoonclick:function(){i3GEO.barraDeBotoes.editor.inicia()}},{iddiv:"inserexy",tipo:"dinamico",dica:$trad("d22"),titulo:$trad("d22t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("inserexy");g_tipoacao="";i3GEO.mapa.dialogo.cliquePonto()}},{iddiv:"inseregrafico",tipo:"dinamico",dica:$trad("d23"),funcaoonclick:function(){g_tipoacao="";i3GEO.mapa.dialogo.cliqueGrafico();i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic)}},{iddiv:"selecao",tipo:"dinamico",dica:$trad("d24"),titulo:$trad("d24t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("selecao");i3GEO.mapa.dialogo.selecao()}},{iddiv:"textofid",tipo:"dinamico",dica:$trad("d25"),titulo:$trad("d25t"),funcaoonclick:function(){i3GEO.barraDeBotoes.ativaIcone("textofid");g_tipoacao="";i3GEO.mapa.dialogo.cliqueTexto()}},{iddiv:"rota",tipo:"",dica:"Rota",titulo:"roteamento",funcaoonclick:function(){if(i3GEO.Interface.ATUAL!=="googlemaps"){alert("Operacao disponivel apenas na interface Google Maps");return}counterClick=1;var parametrosRota=function(overlay,latlng){var temp,janela;if(counterClick===1){counterClick++;alert("Clique o ponto de destino da rota");pontoRota1=latlng;return}if(counterClick===2){pontoRota2=latlng;counterClick=0;GEvent.removeListener(rotaEvento);janela=i3GEO.janela.cria("300px","300px","","center","","Rota");janela[2].style.overflow="auto";janela[2].style.height="300px";directions=new GDirections(i3GeoMap,janela[2]);temp=function(){$i("wdoca_corpo").innerHTML="Não foi possível criar a rota"};GEvent.addListener(directions,"error",temp);directions.load("from: "+pontoRota1.lat()+","+pontoRota1.lng()+" to: "+pontoRota2.lat()+","+pontoRota2.lng())}};rotaEvento=GEvent.addListener(i3GeoMap,"click",parametrosRota);alert("Clique o ponto de origem da rota")}}]}}; | |
355 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.parametros.mapexten;cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{alert("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}}; | |
356 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.desenho={richdraw:"",estilos:{"normal":{fillcolor:'red',linecolor:'black',linewidth:'1',circcolor:'white',textcolor:'gray'},"palido":{fillcolor:'gray',linecolor:'gray',linewidth:'1',circcolor:'gray',textcolor:'gray'},"vermelho":{fillcolor:'gray',linecolor:'red',linewidth:'1',circcolor:'pink',textcolor:'brown'},"verde":{fillcolor:'gray',linecolor:'green',linewidth:'1',circcolor:'DarkGreen',textcolor:'GreenYellow'}},estiloPadrao:"normal",criaContainerRichdraw:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[]};if(i3GEO.Interface.ATUAL==="googleearth"){return}try{var divgeo,renderer;divgeo=i3GEO.desenho.criaDivContainer();divgeo.innerHTML="";try{renderer=new VMLRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer)}catch(erro){renderer=new SVGRenderer();i3GEO.desenho.richdraw=new RichDrawEditor(divgeo,renderer);renderer.svgRoot.style.width=divgeo.style.width;renderer.svgRoot.style.height=divgeo.style.height}i3GEO.desenho.definePadrao(i3GEO.desenho.estiloPadrao);i3GEO.desenho.richdraw.editCommand('mode','line');divgeo.style.display="block";i3GEO.eventos.ativa(divgeo);if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener(divgeo,"mousemove",temp)}}catch(men){alert("Erro ao tentar criar container richdraw "+men)}},criaDivContainer:function(){desenhoUltimaLinha="";desenhoUltimaLinhaPol="";if(!$i("divGeometriasTemp")){var pos,novoel,ne;pos=[0,0];pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));novoel=document.createElement("div");novoel.id="divGeometriasTemp";ne=novoel.style;ne.cursor="crosshair";ne.zIndex=0;if(i3GEO.Interface.TABLET===true){ne.zIndex=5000}ne.position="absolute";ne.width=i3GEO.parametros.w+"px";ne.height=i3GEO.parametros.h+"px";ne.border="0px solid black";ne.display="none";ne.top=pos[1]+"px";ne.left=pos[0]+"px";document.body.appendChild(novoel)}return($i("divGeometriasTemp"))},aplica:function(tipo,objeto,n,texto){var dy,dx,w;if(i3GEO.desenho.richdraw&&$i(i3GEO.Interface.IDCORPO)){if((tipo==="resizeLinha")||(tipo==="resizePoligono")){try{i3GEO.desenho.richdraw.renderer.resize(objeto,0,0,objposicaocursor.imgx,objposicaocursor.imgy)}catch(erro){}}if(tipo==="insereCirculo"){dx=Math.pow(((pontosdistobj.xtela[n])*1)-((pontosdistobj.xtela[n-1])*1),2);dy=Math.pow(((pontosdistobj.ytela[n])*1)-((pontosdistobj.ytela[n-1])*1),2);w=Math.sqrt(dx+dy);i3GEO.desenho.insereCirculo(pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],w)}if(tipo==="insereTexto"){try{i3GEO.desenho.richdraw.renderer.create('text','',i3GEO.desenho.richdraw.textColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n-1],pontosdistobj.yimg[n-1],"","",texto)}catch(men){}}}},insereCirculo:function(x,y,w){try{i3GEO.desenho.richdraw.renderer.create('circ','',i3GEO.desenho.richdraw.circColor,i3GEO.desenho.richdraw.lineWidth,x,y,w,w)}catch(men){}},definePadrao:function(padrao){padrao=i3GEO.desenho.estilos[padrao];i3GEO.desenho.richdraw.editCommand('fillcolor',padrao.fillcolor);i3GEO.desenho.richdraw.editCommand('linecolor',padrao.linecolor);i3GEO.desenho.richdraw.editCommand('linewidth',padrao.linewidth);i3GEO.desenho.richdraw.editCommand('circcolor',padrao.circcolor);i3GEO.desenho.richdraw.editCommand('textcolor',padrao.textcolor)},caixaEstilos:function(){var lista=i3GEO.util.listaChaves(i3GEO.desenho.estilos),n=lista.length,i,caixa,sel;caixa="<select onchange='i3GEO.desenho.definePadrao(this.value)'>";for(i=0;i<n;i+=1){sel="";if(lista[i]===i3GEO.desenho.estiloPadrao){sel="select"}caixa+="<option value='"+lista[i]+"'"+sel+">"+lista[i]+"</option>"}caixa+="</select>";return caixa}}; | |
357 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.Interface={TABLET:false,ALTTABLET:"openlayers_t.htm",OUTPUTFORMAT:"AGG_Q",BARRABOTOESTOP:12,BARRABOTOESLEFT:3,BARRADEZOOMTOP:20,BARRADEZOOMLEFT:10,ATUAL:"openlayers",IDCORPO:"corpoMapa",ATIVAMENUCONTEXTO:false,IDMAPA:"",STATUS:{atualizando:[],trocando:false},atual2gm:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(google){i3GEO.Interface.atual2gm.initemp()}}catch(e){i3GEO.util.scriptTag("http://www.google.com/jsapi?callback=i3GEO.Interface.atual2gm.loadMaps","","",false)}},loadMaps:function(){google.load("maps","3",{callback:"i3GEO.Interface.atual2gm.initemp",other_params:"sensor=false"})},initemp:function(){var temp=function(){$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="googlemaps";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.googlemaps.inicia();i3GEO.janela.fechaAguarde("googleMapsAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("openlayers",i3GEO.configura.locaplic+"/imagens/dobraopenlayers.png")};i3GEO.php.converte2googlemaps(temp)}},atual2ol:{inicia:function(){i3GEO.Interface.STATUS.trocando=true;i3GEO.janela.ESTILOAGUARDE="normal";try{if(OpenLayers){i3GEO.Interface.atual2ol.initemp()}}catch(e){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/openlayers/OpenLayers211.js.php","i3GEO.Interface.atual2ol.initemp()","",false)}},initemp:function(){var temp=function(){OpenLayers.ImgPath="../pacotes/openlayers/img/";$i(i3GEO.Interface.IDCORPO).innerHTML="";i3GEO.Interface.ATUAL="openlayers";i3GEO.Interface.cria(i3GEO.parametros.w,i3GEO.parametros.h);i3GEO.Interface.openlayers.inicia();i3GEO.janela.fechaAguarde("OpenLayersAguarde");i3GEO.arvoreDeCamadas.CAMADAS=[];i3GEO.atualiza();i3GEO.mapa.insereDobraPagina("googlemaps",i3GEO.configura.locaplic+"/imagens/dobragooglemaps.png");i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten)};i3GEO.php.converte2openlayers(temp)}},redesenha:function(){i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()},aplicaOpacidade:function(opacidade){i3GEO.Interface[i3GEO.Interface.ATUAL].aplicaOpacidade(opacidade)},atualizaMapa:function(){switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;default:i3GEO.Interface[i3GEO.Interface.ATUAL].redesenha()}},atualizaTema:function(retorno,tema){i3GEO.Interface[i3GEO.Interface.ATUAL].atualizaTema(retorno,tema)},adicionaKml:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.adicionaKml("foo")}if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.adicionaKml("foo")}},cria:function(w,h){i3GEO.Interface[i3GEO.Interface.ATUAL].cria(w,h)},inicia:function(w,h){var temp=window.location.href.split("?")[0],gadgets=i3GEO.gadgets;if($i("i3GEOcompartilhar")){i3GEO.social.compartilhar("i3GEOcompartilhar",temp,temp,"semtotal")}gadgets.mostraBuscaRapida();gadgets.mostraVersao();gadgets.mostraEmail();i3GEO.guias.cria();if($i("mst")){$i("mst").style.display="block"}i3GEO.navega.autoRedesenho.ativa();i3GEO.util.defineValor("i3geo_escalanum","value",i3GEO.parametros.mapscale);if((i3GEO.parametros.geoip==="nao")&&($i("ondeestou"))){$i("ondeestou").style.display="none"}i3GEO.Interface[i3GEO.Interface.ATUAL].inicia();if($i(i3GEO.login.divnomelogin)&&i3GEO.util.pegaCookie("i3geousuarionome")){$i(i3GEO.login.divnomelogin).innerHTML=i3GEO.util.pegaCookie("i3geousuarionome")}},alteraParametroLayers:function(parametro,valor){i3GEO.Interface[i3GEO.Interface.ATUAL].alteraParametroLayers(parametro,valor)},ativaBotoes:function(){if(i3GEO.Interface.STATUS.trocando===false){if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarra()}else{i3GEO.Interface[i3GEO.Interface.ATUAL].ativaBotoes()}}},openlayers:{FUNDOTEMA:"yellow",TILES:false,BUFFER:0,GADGETS:{PanZoomBar:true,PanZoom:false,LayerSwitcher:true,ScaleLine:true,OverviewMap:false},MINEXTENT:[-0.0005,-0.0005,0.0005,0.0005],MAXEXTENT:[-180,-90,180,90],LAYERSADICIONAIS:[],redesenha:function(){var openlayers=i3GEO.Interface.openlayers;openlayers.criaLayers();openlayers.ordenaLayers();openlayers.recalcPar();i3GEO.janela.fechaAguarde();openlayers.sobeLayersGraficos()},cria:function(w,h){var f,ins,mi=i3GEO.Interface.openlayers.MINEXTENT,ma=i3GEO.Interface.openlayers.MAXEXTENT,i=$i(i3GEO.Interface.IDCORPO),bb=i3GEO.barraDeBotoes;OpenLayers.DOTS_PER_INCH=i3GEO.util.calculaDPI();OpenLayers._getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/openlayers/"};if(i){f=$i("openlayers");if(!f){ins='<div id=openlayers style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("openlayers");f.style.width=w+"px";f.style.height=h+"px"}i3GEO.Interface.IDMAPA="openlayers";if(i3GEO.Interface.TABLET===true){i3geoOL=new OpenLayers.Map({div:"openlayers",theme:null,controls:[new OpenLayers.Control.Attribution(),new OpenLayers.Control.TouchNavigation({dragPanOptions:{interval:100,enableKinetic:true}}),new OpenLayers.Control.ZoomPanel()]})}else{bb.INCLUIBOTAO.zoomli=true;bb.INCLUIBOTAO.pan=true;bb.INCLUIBOTAO.zoomtot=true;i3geoOL=new OpenLayers.Map('openlayers',{controls:[],fractionalZoom:true,minResolution:"auto",minExtent:new OpenLayers.Bounds(mi[0],mi[1],mi[2],mi[3]),maxResolution:"auto",maxExtent:new OpenLayers.Bounds(ma[0],ma[1],ma[2],ma[3]),allOverlays:false})}},inicia:function(){var montaMapa=function(){var pz,temp,layers,i,texto,estilo,layersn,openlayers=i3GEO.Interface.openlayers;i3GEO.util.multiStep([openlayers.registraEventos,openlayers.zoom2ext],[null,[i3GEO.parametros.mapexten]],function(){});if(openlayers.GADGETS.PanZoom===true){pz=new OpenLayers.Control.PanZoom();i3geoOL.addControl(pz);pz.div.style.zIndex=5000}openlayers.criaLayers();temp=$i("listaLayersBase");if(temp){estilo="cursor:pointer;vertical-align:top;padding-top:5px;";if(navm){estilo="border:0px solid white;cursor:pointer;vertical-align:middle;padding-top:0px;"}temp={"propriedades":[]};layers=i3geoOL.getLayersBy("isBaseLayer",true);layersn=layers.length;for(i=0;i<layersn;i++){texto="<input type=radio style='"+estilo+"' onclick='i3GEO.Interface.openlayers.ativaFundo(this.value)' name=i3GEObaseLayer value='"+layers[i].id+"' />"+layers[i].name;temp.propriedades.push({text:texto,url:""})}i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp)}else{if(openlayers.GADGETS.LayerSwitcher===true){i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher())}}if(openlayers.GADGETS.ScaleLine===true){pz=new OpenLayers.Control.ScaleLine();i3geoOL.addControl(pz);pz.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+5+"px"}if(openlayers.GADGETS.OverviewMap===true){i3geoOL.addControl(new OpenLayers.Control.OverviewMap())}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpan=new OpenLayers.Control.Navigation();i3GEO.Interface.openlayers.OLzoom=new OpenLayers.Control.ZoomBox();i3GEO.Interface.openlayers.OLpanel=new OpenLayers.Control.Panel();i3GEO.Interface.openlayers.OLpanel.addControls([i3GEO.Interface.openlayers.OLpan,i3GEO.Interface.openlayers.OLzoom]);i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanel)}if(i3GEO.configura.mapaRefDisplay!=="none"){if(i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")){i3GEO.configura.mapaRefDisplay=i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay")}if(i3GEO.configura.mapaRefDisplay==="block"){i3GEO.maparef.inicia()}}if(i3GEO.Interface.TABLET===false){i3GEO.Interface.openlayers.OLpanel.activateControl(i3GEO.Interface.openlayers.OLpan)}i3GEO.Interface.ativaBotoes();if(openlayers.GADGETS.PanZoomBar===true){i3GEO.Interface.openlayers.OLpanzoombar=new OpenLayers.Control.PanZoomBar();i3geoOL.addControl(i3GEO.Interface.openlayers.OLpanzoombar);i3GEO.Interface.openlayers.OLpanzoombar.div.style.zIndex=5000;i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"}};if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.openlayers.ligaDesliga(this);i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS);"}i3GEO.util.multiStep([i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,i3GEO.util.arvore,i3GEO.gadgets.mostraMenuLista],[null,null,null,[i3GEO.parametros.mensagens],null,null,["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa],null],function(){});i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.openlayers.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.openlayers.adicionaKml(true,i3GEO.parametros.kmlurl)}if($i("mst")){$i("mst").style.visibility="visible"}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}},aplicaOpacidade:function(opacidade){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer&&layer.isBaseLayer===false){layer.setOpacity(opacidade)}}},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.openlayers.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.openlayers.criaArvoreKML()}i3GEO.Interface.openlayers.adicionaNoArvoreKml(url,titulo,ativo,ngeoxml)},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.openlayers.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.openlayers.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},adicionaNoArvoreKml:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.openlayers.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.openlayers.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.openlayers.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+=" <span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.openlayers.ARVORE.draw();i3GEO.Interface.openlayers.ARVORE.collapseAll();node.expand();if(ativo===true){i3GEO.Interface.openlayers.insereLayerKml(id,url)}},insereLayerKml:function(id,url){var temp;eval(id+" = new OpenLayers.Layer.Vector('"+id+"', {displayOutsideMaxExtent:true,displayInLayerSwitcher:false,visibility:true, strategies: [new OpenLayers.Strategy.Fixed()],protocol: new OpenLayers.Protocol.HTTP({url: '"+url+"',format: new OpenLayers.Format.KML({extractStyles: true,extractAttributes: true,maxDepth: 5})})})");eval("i3geoOL.addLayer("+id+");");eval("temp = "+id+".div;");temp.onclick=function(e){var targ="",id,temp,features,n,i,j="",html="";if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id){temp=targ.id.split("_");if(temp[0]==="OpenLayers.Geometry.Point"){id=targ.id;temp=i3geoOL.getLayer(this.id);features=temp.features;n=features.length;for(i=0;i<n;i++){if(features[i].geometry.id===id){for(j in features[i].attributes){html+=j+": "+features[i].attributes[j]}g=features[i].geometry;i3geoOL.addPopup(new OpenLayers.Popup.FramedCloud("kml",new OpenLayers.LonLat(g.x,g.y),null,html,null,true))}}}}}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setVisibility(false);")}else{if(!(i3geoOL.getLayersByName(obj.value)[0])){i3GEO.Interface.openlayers.insereLayerKml(obj.value,url)}else{eval(obj.value+".setVisibility(true);")}}},criaLayers:function(){var configura=i3GEO.configura,url=configura.locaplic+"/classesphp/mapa_openlayers.php?g_sid="+i3GEO.configura.sid+"&TIPOIMAGEM="+configura.tipoimagem,nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,camada,urllayer,opcoes,i,n,temp=$i("i3GEOprogressoDiv"),fundoIsBase=true;if(temp){i3GEO.Interface.STATUS.atualizando=[];temp.style.display="none"}try{temp=i3GEO.Interface.openlayers.LAYERSADICIONAIS;n=temp.length;for(i=0;i<n;i++){if(temp[i].isBaseLayer===true&&temp[i].visibility===true){fundoIsBase=false}}}catch(e){}if(i3geoOL.getLayersByName("Nenhum").length===0&&fundoIsBase===true){layer=new OpenLayers.Layer.Vector("Nenhum",{displayInLayerSwitcher:true,visibility:false,isBaseLayer:true,singleTile:true});i3geoOL.addLayer(layer);if($i(i3geoOL.id+"_events")){$i(i3geoOL.id+"_events").style.backgroundColor="rgb("+i3GEO.parametros.cordefundo+")"}}opcoes={gutter:0,isBaseLayer:false,displayInLayerSwitcher:false,opacity:1,visibility:false,singleTile:!(i3GEO.Interface.openlayers.TILES),ratio:1,buffer:i3GEO.Interface.openlayers.BUFFER,wrapDateLine:true,transitionEffect:"resize",eventListeners:{"loadstart":i3GEO.Interface.openlayers.loadStartLayer,"loadend":i3GEO.Interface.openlayers.loadStopLayer}};for(i=nlayers-1;i>=0;i--){layer="";camada=i3GEO.arvoreDeCamadas.CAMADAS[i];opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES);if(i3geoOL.getLayersByName(camada.name).length===0&&camada.name.toLowerCase()!="copyright"){urllayer=url+"&layer="+camada.name+"&r="+Math.random();try{temp=camada.type===0?opcoes.gutter=20:opcoes.gutter=0;temp=camada.transitioneffect==="nao"?opcoes.transitionEffect="null":opcoes.transitionEffect="resize";if(camada.connectiontype===7&&camada.wmsurl!==""&&camada.usasld.toLowerCase()!="sim"){urllayer=camada.wmsurl+"&r="+Math.random();layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,format:camada.wmsformat,transparent:true},opcoes);if(camada.wmssrs!=""&&layer.url){layer.url=layer.url+"&SRS="+camada.wmssrs+"&CRS="+camada.wmssrs}}else{if(camada.tiles==="nao"||camada.escondido.toLowerCase()==="sim"||camada.connectiontype===10||camada.type===0||camada.type===4||camada.type===8){opcoes.singleTile=true}else{temp=camada.type===3?opcoes.singleTile=false:opcoes.singleTile=!(i3GEO.Interface.openlayers.TILES)}layer=new OpenLayers.Layer.WMS(camada.name,urllayer,{LAYERS:camada.name,map_imagetype:i3GEO.Interface.OUTPUTFORMAT},opcoes)}}catch(e){}if(camada.escondido.toLowerCase()==="sim"){layer.transitionEffect="null"}i3geoOL.addLayer(layer)}else{layer=i3geoOL.getLayersByName(camada.name)[0]}if(layer&&layer!=""){temp=camada.status==0?layer.setVisibility(false):layer.setVisibility(true)}}try{i3geoOL.addLayers(i3GEO.Interface.openlayers.LAYERSADICIONAIS)}catch(e){}if(i3GEO.parametros.copyright!=""&&!$i("i3GEOcopyright")){temp=document.createElement("div");temp.id="i3GEOcopyright";temp.style.display="block";temp.style.top="0px";temp.style.left="0px";temp.style.zIndex=5000;temp.style.position="absolute";temp.innerHTML="<p class=paragrafo >"+i3GEO.parametros.copyright+"</p>";$i(i3GEO.Interface.IDMAPA).appendChild(temp)}},sobeLayersGraficos:function(){var nlayers=i3geoOL.getNumLayers(),layers=i3geoOL.layers,i;for(i=0;i<nlayers;i++){if(layers[i].CLASS_NAME=="OpenLayers.Layer.Vector"&&layers[i].name!="Nenhum"){i3geoOL.raiseLayer(i3geoOL.layers[i],nlayers)}}},inverteModoTile:function(){if(i3GEO.Interface.openlayers.TILES===true){i3GEO.Interface.openlayers.TILES=false}else{i3GEO.Interface.openlayers.TILES=true}i3GEO.Interface.openlayers.removeTodosOsLayers();i3GEO.Interface.openlayers.criaLayers()},removeTodosOsLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,layer,i,camada;for(i=nlayers-1;i>=0;i--){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];layer=i3geoOL.getLayersByName(camada.name)[0];if(layer){i3geoOL.removeLayer(layer,false)}}},alteraParametroLayers:function(parametro,valor){var layers=i3geoOL.layers,nlayers=layers.length,i,url,reg;for(i=0;i<nlayers;i+=1){if(layers[i].url){url=layers[i].url;reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");layers[i].url=url.replace(reg,"");eval("layers[i].mergeNewParams({"+parametro+":valor})");layers[i].redraw()}}},loadStartLayer:function(event){var p=$i("i3GEOprogressoDiv");if($i("ArvoreTituloTema"+event.object.name)){i3GEO.Interface.STATUS.atualizando.push(event.object.name);YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background",i3GEO.Interface.openlayers.FUNDOTEMA);if(p){p.style.display="block";i3GEO.arvoreDeCamadas.progressBar.set('maxValue',i3GEO.Interface.STATUS.atualizando.length);i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')-1)}}},loadStopLayer:function(event){var p=$i("i3GEOprogressoDiv");i3GEO.Interface.STATUS.atualizando.remove(event.object.name);if($i("ArvoreTituloTema"+event.object.name)){YAHOO.util.Dom.setStyle("ArvoreTituloTema"+event.object.name,"background","");if(p){p.style.display="block";if(i3GEO.Interface.STATUS.atualizando.length>0){i3GEO.arvoreDeCamadas.progressBar.set('value',i3GEO.arvoreDeCamadas.progressBar.get('value')+1)}else{i3GEO.arvoreDeCamadas.progressBar.set('value',0);p.style.display="none"}}}},ordenaLayers:function(){var ordem=i3GEO.arvoreDeCamadas.CAMADAS,nordem=ordem.length,layer,layers,i,maiorindice;layers=i3geoOL.layers;maiorindice=i3geoOL.getLayerIndex(layers[(layers.length)-1]);for(i=nordem-1;i>=0;i--){layers=i3geoOL.getLayersByName(ordem[i].name);layer=layers[0];if(layer){i3geoOL.setLayerIndex(layer,maiorindice+i)}}},sobeDesceLayer:function(tema,tipo){var layer=i3geoOL.getLayersByName(tema)[0],indice;if(layer){indice=i3geoOL.getLayerIndex(layer);if(tipo==="sobe"){i3geoOL.setLayerIndex(layer,indice+1)}else{i3geoOL.setLayerIndex(layer,indice-1)}}},ligaDesliga:function(obj){var layers=i3geoOL.getLayersByName(obj.value),desligar="",ligar="",b;if(layers.length>0){{layers[0].setVisibility(obj.checked)}if(obj.checked){ligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value)}b=new Image();b.src=i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=ligatemasbeacon&desligar="+desligar+"&ligar="+ligar+"&adicionar=nao&g_sid="+i3GEO.configura.sid;b.onerror=function(){i3GEO.mapa.legendaHTML.atualiza()}}},ativaFundo:function(id){i3geoOL.setBaseLayer(i3geoOL.getLayer(id));i3GEO.Interface.openlayers.OLpanzoombar.div.style.top=i3GEO.Interface.BARRADEZOOMTOP+"px";i3GEO.Interface.openlayers.OLpanzoombar.div.style.left=i3GEO.Interface.BARRADEZOOMLEFT+"px"},atualizaMapa:function(){var layers=i3geoOL.layers,nlayers=layers.length,i;for(i=0;i<nlayers;i++){if(layers[i].url){layers[i].mergeNewParams({r:Math.random()});layers[i].url=layers[i].url.replace("&&&&&&&&&&&&&&","");layers[i].url=layers[i].url+"&&";if(layers[i].visibility===true){layers[i].redraw()}}}},atualizaTema:function(retorno,tema){var layer=i3geoOL.getLayersByName(tema)[0];if(layer&&layer!=undefined){if(layer.url){layer.mergeNewParams({r:Math.random()});layer.url=layer.url.replace("&&&&&&&&&&&&&&","");layer.url=layer.url+"&&";layer.redraw()}}if(retorno===""){return}i3GEO.Interface.openlayers.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},registraEventos:function(){var modoAtual="";i3GEO.eventos.ativa($i("openlayers"));i3geoOL.events.register("movestart",i3geoOL,function(e){var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});i3geoOL.events.register("moveend",i3geoOL,function(e){var xy;modoAtual="";i3GEO.Interface.openlayers.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});i3geoOL.events.register("mousemove",i3geoOL,function(e){var p,lonlat,d,pos;if(modoAtual==="move"){return}p=e.xy;lonlat=i3geoOL.getLonLatFromPixel(p);if(!lonlat){return}d=i3GEO.calculo.dd2dms(lonlat.lon,lonlat.lat);try{objposicaocursor.ddx=lonlat.lon;objposicaocursor.ddy=lonlat.lat;objposicaocursor.dmsx=d[0];objposicaocursor.dmsy=d[1];objposicaocursor.imgx=p.x;objposicaocursor.imgy=p.y;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));objposicaocursor.telax=p.x+pos[0];objposicaocursor.telay=p.y+pos[1]}catch(e){}})},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},recalcPar:function(){var bounds=i3geoOL.getExtent().toBBOX().split(","),escalaAtual=i3geoOL.getScale();if(i3GEO.parametros.mapscale!==escalaAtual){i3GEO.arvoreDeCamadas.atualizaFarol(escalaAtual)}i3GEO.parametros.mapexten=bounds[0]+" "+bounds[1]+" "+bounds[2]+" "+bounds[3];i3GEO.parametros.mapscale=escalaAtual;i3GEO.parametros.pixelsize=i3geoOL.getResolution();i3GEO.gadgets.atualizaEscalaNumerica(parseInt(escalaAtual,10))},zoom2ext:function(ext){var m,b;m=ext.split(" ");b=new OpenLayers.Bounds(m[0],m[1],m[2],m[3]);i3geoOL.zoomToExtent(b)},pan2ponto:function(x,y){i3geoOL.panTo(new OpenLayers.LonLat(x,y))}},googlemaps:{MAPOPTIONS:{scaleControl:true},OPACIDADE:0.8,TIPOMAPA:"terrain",ZOOMSCALE:[591657550,295828775,147914387,73957193,36978596,18489298,9244649,4622324,2311162,1155581,577790,288895,144447,72223,36111,18055,9027,4513,2256,1128],PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:0,atualizaTema:function(retorno,tema){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(tema);i3GeoMap.overlayMapTypes.removeAt(indice);i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.insereLayer(tema,indice);if(retorno===""){return}i3GEO.Interface.googlemaps.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},removeTodosLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(indice!==false){try{i3GeoMap.overlayMapTypes.removeAt(indice)}catch(e){}}}},redesenha:function(){i3GEO.Interface.googlemaps.posfixo+=1;i3GEO.Interface.googlemaps.removeTodosLayers();i3GEO.Interface.googlemaps.criaLayers()},cria:function(w,h){var i,f,ins;posfixo="&nd=0";i=$i(i3GEO.Interface.IDCORPO);if(i){f=$i("googlemapsdiv");if(!f){ins='<div id=googlemapsdiv style="width:0px;height:0px;text-align:left;background-image:url('+i3GEO.configura.locaplic+'/imagens/i3geo1bw.jpg)"></div>';i.innerHTML=ins}f=$i("googlemapsdiv");if(w){f.style.width=w+"px";f.style.height=h+"px"}}i3GeoMap="";i3GEO.Interface.IDMAPA="googlemapsdiv";if(i3GEO.Interface.TABLET===false){i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=true;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=true;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=true}},ativaZoomBox:function(){i3GeoMap.enableKeyDragZoom({key:'ctrl'})},inicia:function(){var pol,ret,montaMapa;pol=i3GEO.parametros.mapexten;ret=pol.split(" ");montaMapa=function(retorno){var sw,ne,dobra=$i("i3GEOdobraPagina");try{i3GeoMap=new google.maps.Map($i(i3GEO.Interface.IDMAPA),i3GEO.Interface.googlemaps.MAPOPTIONS)}catch(e){alert(e);return}if(dobra){$i(i3GEO.Interface.IDMAPA).appendChild(dobra)}if(!$i("keydragzoom_script")){js=i3GEO.configura.locaplic+"/pacotes/google/keydragzoom.js.php";i3GEO.util.scriptTag(js,"i3GEO.Interface.googlemaps.ativaZoomBox()","keydragzoom_script")}i3GeoMap.setMapTypeId(i3GEO.Interface.googlemaps.TIPOMAPA);sw=new google.maps.LatLng(ret[1],ret[0]);ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne));i3GeoMapOverlay=new google.maps.OverlayView();i3GeoMapOverlay.draw=function(){};i3GEO.Interface.googlemaps.criaLayers();i3GeoMapOverlay.setMap(i3GeoMap);i3GEO.Interface.googlemaps.registraEventos();if(i3GEO.Interface.STATUS.trocando===false){i3GEO.gadgets.mostraInserirKml()}i3GEO.Interface.ativaBotoes();i3GEO.eventos.ativa($i(i3GEO.Interface.IDMAPA));if(i3GEO.Interface.STATUS.trocando===false){i3GEO.coordenadas.mostraCoordenadas();i3GEO.gadgets.mostraEscalaNumerica();i3GEO.gadgets.mostraMenuLista();i3GEO.idioma.mostraSeletor()}i3GEO.gadgets.mostraMenuSuspenso();g_operacao="";g_tipoacao="";if(i3GEO.Interface.STATUS.trocando===true){$i(i3GEO.arvoreDeCamadas.IDHTML).innerHTML=""}if(i3GEO.Interface.STATUS.trocando===false){i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa)}if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googlemaps.ligaDesliga(this)"}i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googlemaps.adicionaListaKml()}if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googlemaps.adicionaKml(true,i3GEO.parametros.kmlurl)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}};i3GEO.php.googlemaps(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(camada.name);if(!indice){if(camada.status!=0){i3GEO.Interface.googlemaps.insereLayer(camada.name,0)}}}},criaImageMap:function(nomeLayer){var i3GEOTileO="",s;s="i3GEOTileO = new google.maps.ImageMapType({ "+"getTileUrl: function(coord, zoom) {"+" var url = '"+i3GEO.configura.locaplic+"/classesphp/mapa_googlemaps.php?g_sid="+i3GEO.configura.sid+"&Z=' + zoom + '&X=' + coord.x + '&Y=' + coord.y + '&layer="+nomeLayer+i3GEO.Interface.googlemaps.PARAMETROSLAYER+'&r='+Math.random()+"';"+" return url+'&nd='+i3GEO.Interface.googlemaps.posfixo; "+"}, "+"tileSize: new google.maps.Size(256, 256),"+"isPng: true,"+"name: '"+nomeLayer+"'"+"});";eval(s);return i3GEOTileO},insereLayer:function(nomeLayer,indice){var i=i3GEO.Interface.googlemaps.criaImageMap(nomeLayer);i3GeoMap.overlayMapTypes.insertAt(indice,i)},registraEventos:function(){var pos,modoAtual="";google.maps.event.addListener(i3GeoMap,"dragstart",function(){g_operacao="";g_tipoacao="";var xy;modoAtual="move";xy=i3GEO.navega.centroDoMapa();i3GEO.navega.marcaCentroDoMapa(xy)});google.maps.event.addListener(i3GeoMap,"dragend",function(){var xy;modoAtual="";i3GEO.Interface.googlemaps.recalcPar();i3GEO.eventos.navegaMapa();i3GEO.util.escondePin();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});google.maps.event.addListener(i3GeoMap,"tilesloaded",function(){i3GEO.Interface.googlemaps.recalcPar()});google.maps.event.addListener(i3GeoMap,"bounds_changed",function(){var xy;i3GEO.Interface.googlemaps.recalcPar();g_operacao="";g_tipoacao="";i3GEO.eventos.navegaMapa();xy=i3GEO.navega.centroDoMapa();i3GEO.coordenadas.mostraCoordenadas(false,"",xy[0],xy[1])});pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));google.maps.event.addListener(i3GeoMap,"mousemove",function(ponto){var teladms,tela;if(modoAtual==="move"){return}ponto=ponto.latLng;teladms=i3GEO.calculo.dd2dms(ponto.lng(),ponto.lat());tela=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(ponto);objposicaocursor={ddx:ponto.lng(),ddy:ponto.lat(),dmsx:teladms[0],dmsy:teladms[1],imgx:tela.x,imgy:tela.y,telax:tela.x+pos[0],telay:tela.y+pos[1]}})},retornaIndiceLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=number}});return i}catch(e){return false}},retornaObjetoLayer:function(nomeLayer){var i=false;try{i3GeoMap.overlayMapTypes.forEach(function(elemento,number){if(elemento.name===nomeLayer){i=elemento}});return i}catch(e){return false}},retornaDivLayer:function(nomeLayer){var i,divmapa=$i("googlemapsdiv"),divimg,n;divimg=divmapa.getElementsByTagName("img");n=divimg.length;if(divimg&&n>0){for(i=0;i<n;i++){if(divimg[i].src.search("&layer="+nomeLayer+"&")>0){return divimg[i].parentNode.parentNode.parentNode}}}return false},ligaDesliga:function(obj){var indice=i3GEO.Interface.googlemaps.retornaIndiceLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="",n,i,lista=[],listatemp;if(obj.checked&&!indice){ligar=obj.value;listatemp=i3GEO.arvoreDeCamadas.listaLigadosDesligados()[0];n=i3GEO.arvoreDeCamadas.CAMADAS.length;for(i=0;i<n;i++){if(i3GEO.util.in_array(i3GEO.arvoreDeCamadas.CAMADAS[i],listatemp)){lista.push(i3GEO.arvoreDeCamadas.CAMADAS[i])}}n=lista.length;indice=0;for(i=0;i<n;i++){if(lista[i]==obj.value){indice=n-1-i}}i3GEO.Interface.googlemaps.insereLayer(obj.value,indice);i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value)}else{if(indice!==false){desligar=obj.value;i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);i3GeoMap.overlayMapTypes.removeAt(indice)}}if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},bbox:function(){var bd,so,ne,bbox;bd=i3GeoMap.getBounds();so=bd.getSouthWest();ne=bd.getNorthEast();bbox=so.lng()+" "+so.lat()+" "+ne.lng()+" "+ne.lat();return(bbox)},ativaBotoes:function(){var imagemxy,x2=0,y2=0;imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){x2=imagemxy[0]+i3GEO.Interface.BARRABOTOESLEFT;y2=imagemxy[1]+i3GEO.Interface.BARRABOTOESTOP}if($i("barraDeBotoes2")||i3GEO.barraDeBotoes.AUTO===true){i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2)}i3GEO.barraDeBotoes.ativaBotoes()},aplicaOpacidade:function(opacidade){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,div;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];if(camada&&camada.name){div=i3GEO.Interface.googlemaps.retornaDivLayer(camada.name);if(div){YAHOO.util.Dom.setStyle(div,"opacity",opacidade)}}}},mudaOpacidade:function(valor){i3GEO.Interface.googlemaps.OPACIDADE=valor;i3GEO.Interface.googlemaps.redesenha()},recalcPar:function(){try{var sw,ne,escalaAtual=i3GEO.parametros.mapscale;sw=i3GeoMap.getBounds().getSouthWest();ne=i3GeoMap.getBounds().getNorthEast();i3GEO.parametros.mapexten=sw.lng()+" "+sw.lat()+" "+ne.lng()+" "+ne.lat();i3GEO.parametros.mapscale=i3GEO.Interface.googlemaps.calcescala();sw=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(0,1));ne=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(1,0));i3GEO.parametros.pixelsize=sw.lng()-ne.lng();if(i3GEO.parametros.pixelsize<0){i3GEO.parametros.pixelsize=i3GEO.parametros.pixelsize*-1}if(i3GEO.parametros.mapscale!==escalaAtual&&escalaAtual!==0){i3GEO.arvoreDeCamadas.atualizaFarol(i3GEO.parametros.mapscale)}}catch(e){i3GEO.parametros.mapexten="0 0 0 0";i3GEO.parametros.mapscale=0}},calcescala:function(){var zoom=i3GeoMap.getZoom();return(i3GEO.Interface.googlemaps.ZOOMSCALE[zoom])},escala2nzoom:function(escala){var n,i;n=i3GEO.Interface.googlemaps.ZOOMSCALE.length;for(i=0;i<n;i++){if(i3GEO.Interface.googlemaps.ZOOMSCALE[i]<escala){return(i)}}},zoom2extent:function(mapexten){var pol=mapexten,ret=pol.split(" "),sw=new google.maps.LatLng(ret[1],ret[0]),ne=new google.maps.LatLng(ret[3],ret[2]);i3GeoMap.fitBounds(new google.maps.LatLngBounds(sw,ne))},pan2ponto:function(x,y){i3GeoMap.panTo(new google.maps.LatLng(y,x))},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=true}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googlemaps.criaArvoreKML()}i3GEO.Interface.googlemaps.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googlemaps.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googlemaps.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googlemaps.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googlemaps.ativaDesativaCamadaKml(this,\""+url+"\")' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";if(navm){estilo="cursor:default;vertical-align:35%;padding-top:0px;"}else{estilo="cursor:default;vertical-align:top;"}html+=" <span style='"+estilo+"'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googlemaps.ARVORE.draw();i3GEO.Interface.googlemaps.ARVORE.collapseAll();node.expand();if(ativo===true){eval(id+" = new google.maps.KmlLayer('"+url+"',{map:i3GeoMap,preserveViewport:true});")}},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googlemaps.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googlemaps.ARVORE.getRoot();titulo="<table><tr><td><b>Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},ativaDesativaCamadaKml:function(obj,url){if(!obj.checked){eval(obj.value+".setMap(null);")}else{eval(obj.value+" = new google.maps.KmlLayer(url,{map:i3GeoMap,preserveViewport:true});")}},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googlemaps.PARAMETROSLAYER=i3GEO.Interface.googlemaps.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googlemaps.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googlemaps.redesenha()}},googleearth:{PARAMETROSLAYER:"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,posfixo:"",GADGETS:{setMouseNavigationEnabled:true,setStatusBarVisibility:true,setOverviewMapVisibility:true,setScaleLegendVisibility:true,setAtmosphereVisibility:true,setGridVisibility:false,getSun:false,LAYER_BORDERS:true,LAYER_BUILDINGS:false,LAYER_ROADS:false,LAYER_TERRAIN:true},POSICAOTELA:[0,0],aguarde:"",ligaDesliga:function(obj){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(obj.value),temp=function(){i3GEO.mapa.legendaHTML.atualiza()},desligar="",ligar="";if(obj.checked){i3GEO.arvoreDeCamadas.alteraPropCamadas("status","2",obj.value);ligar=obj.value}else{i3GEO.arvoreDeCamadas.alteraPropCamadas("status","0",obj.value);desligar=obj.value}layer.setVisibility(obj.checked);if(desligar!==""||ligar!==""){i3GEO.php.ligatemas(temp,desligar,ligar)}},atualizaTema:function(retorno,tema){var layer=i3GEO.Interface.googleearth.retornaObjetoLayer(tema),hr=layer.getLink().getHref();hr=hr.replace("&&&&&","");layer.getLink().setHref(hr+"&");if(retorno===""){return}i3GEO.Interface.googleearth.recalcPar();try{i3GEO.arvoreDeCamadas.atualiza(retorno.data.temas)}catch(e){i3GEO.arvoreDeCamadas.atualiza()}i3GEO.janela.fechaAguarde()},redesenha:function(){i3GEO.Interface.googleearth.posfixo+="&";var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice!==false){try{i3GeoMap.getFeatures().removeChild(indice)}catch(e){}}}i3GEO.Interface.googleearth.criaLayers()},cria:function(w,h){var i,i3GeoMap3d,texto;i3GEO.configura.listaDePropriedadesDoMapa={"propriedades":[{text:"p2",url:"javascript:i3GEO.mapa.dialogo.tipoimagem()"},{text:"p3",url:"javascript:i3GEO.mapa.dialogo.opcoesLegenda()"},{text:"p4",url:"javascript:i3GEO.mapa.dialogo.opcoesEscala()"},{text:"p8",url:"javascript:i3GEO.mapa.dialogo.queryMap()"},{text:"p9",url:"javascript:i3GEO.mapa.dialogo.corFundo()"},{text:"p10",url:"javascript:i3GEO.mapa.dialogo.gradeCoord()"}]};texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setMouseNavigationEnabled(this.checked)'";texto+="> "+$trad("ge1");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setStatusBarVisibility(this.checked)'";texto+="> "+$trad("ge2");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setOverviewMapVisibility(this.checked)'";texto+="> "+$trad("ge3");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setScaleLegendVisibility(this.checked)'";texto+="> "+$trad("ge4");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setAtmosphereVisibility(this.checked)'";texto+="> "+$trad("ge5");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.setGridVisibility===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getOptions().setGridVisibility(this.checked)'";texto+="> "+$trad("ge6");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.getSun===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getSun().setVisibility(this.checked)'";texto+="> "+$trad("ge7");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BORDERS, this.checked)'";texto+="> "+$trad("ge8");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_BUILDINGS, this.checked)'";texto+="> "+$trad("ge9");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_ROADS, this.checked)'";texto+="> "+$trad("ge10");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});texto="<input type=checkbox style='vertical-align:top;cursor:pointer' ";if(i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN===true){texto+="CHECKED "}texto+=" onclick='javascript:i3GeoMap.getLayerRoot().enableLayerById(i3GeoMap.LAYER_TERRAIN, this.checked)'";texto+="> "+$trad("ge11");i3GEO.configura.listaDePropriedadesDoMapa.propriedades.push({text:texto,url:""});i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli=false;i3GEO.barraDeBotoes.INCLUIBOTAO.pan=false;i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot=false;i3GEO.Interface.IDMAPA="i3GeoMap3d";if(i3GEO.arvoreDeCamadas.ATIVATEMA===""){i3GEO.arvoreDeCamadas.ATIVATEMA="i3GEO.Interface.googleearth.ligaDesliga(this)"}i=$i(i3GEO.Interface.IDCORPO);if(i){i3GeoMap3d=document.createElement("div");i3GeoMap3d.style.width=w+"px";i3GeoMap3d.style.height=h+"px";i.style.height=h;i3GeoMap3d.id="i3GeoMap3d";i3GeoMap3d.style.zIndex=0;i.appendChild(i3GeoMap3d)}google.load("earth","1")},inicia:function(){google.earth.createInstance("i3GeoMap3d",i3GEO.Interface.googleearth.iniciaGE,i3GEO.Interface.googleearth.falha)},iniciaGE:function(object){var montaMapa=function(retorno){i3GeoMap=object;i3GeoMap.getWindow().setVisibility(true);i3GEO.Interface.googleearth.zoom2extent(i3GEO.parametros.mapexten);i3GEO.Interface.googleearth.criaLayers();var options=i3GeoMap.getOptions(),layerRoot=i3GeoMap.getLayerRoot();options.setMouseNavigationEnabled(i3GEO.Interface.googleearth.GADGETS.setMouseNavigationEnabled);options.setStatusBarVisibility(i3GEO.Interface.googleearth.GADGETS.setStatusBarVisibility);options.setOverviewMapVisibility(i3GEO.Interface.googleearth.GADGETS.setOverviewMapVisibility);options.setScaleLegendVisibility(i3GEO.Interface.googleearth.GADGETS.setScaleLegendVisibility);options.setAtmosphereVisibility(i3GEO.Interface.googleearth.GADGETS.setAtmosphereVisibility);options.setGridVisibility(i3GEO.Interface.googleearth.GADGETS.setGridVisibility);layerRoot.enableLayerById(i3GeoMap.LAYER_BORDERS,i3GEO.Interface.googleearth.GADGETS.LAYER_BORDERS);layerRoot.enableLayerById(i3GeoMap.LAYER_BUILDINGS,i3GEO.Interface.googleearth.GADGETS.LAYER_BUILDINGS);layerRoot.enableLayerById(i3GeoMap.LAYER_ROADS,i3GEO.Interface.googleearth.GADGETS.LAYER_ROADS);layerRoot.enableLayerById(i3GeoMap.LAYER_TERRAIN,i3GEO.Interface.googleearth.GADGETS.LAYER_TERRAIN);i3GeoMap.getSun().setVisibility(i3GEO.Interface.googleearth.GADGETS.getSun);i3GeoMap.getNavigationControl().setVisibility(i3GeoMap.VISIBILITY_SHOW);i3GEO.Interface.googleearth.POSICAOTELA=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO));i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);i3GEO.gadgets.mostraMenuSuspenso();i3GEO.gadgets.mostraMenuLista();i3GEO.Interface.googleearth.ativaBotoes();i3GEO.gadgets.mostraInserirKml("inserirKml");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===true){i3GEO.Interface.googleearth.adicionaListaKml()}i3GEO.Interface.googleearth.registraEventos();if(i3GEO.parametros.kmlurl!==""){i3GEO.Interface.googleearth.adicionaKml(true,i3GEO.parametros.kmlurl,i3GEO.parametros.kmlurl,false)}if(YAHOO.lang.isFunction(i3GEO.finalizaAPI)){i3GEO.finalizaAPI.call()}else{if(i3GEO.finalizaAPI!=""){eval(i3GEO.finalizaAPI)}}};i3GEO.php.googleearth(montaMapa)},criaLayers:function(){var nlayers=i3GEO.arvoreDeCamadas.CAMADAS.length,i,camada,indice,layer;for(i=0;i<nlayers;i++){camada=i3GEO.arvoreDeCamadas.CAMADAS[i];indice=i3GEO.Interface.googleearth.retornaIndiceLayer(camada.name);layer=i3GEO.Interface.googleearth.retornaObjetoLayer(camada.name);if(indice===false){layer=i3GEO.Interface.googleearth.insereLayer(camada.name)}try{if(camada.status!=0){layer.setVisibility(true)}else{layer.setVisibility(false)}}catch(e){}}},insereLayer:function(nomeLayer){var kmlUrl=i3GEO.configura.locaplic+"/classesphp/mapa_googleearth.php?REQUEST=GetKml&g_sid="+i3GEO.configura.sid+"&layer="+nomeLayer+i3GEO.Interface.googleearth.PARAMETROSLAYER+"&r="+Math.random(),linki3geo=i3GeoMap.createLink(''),nl=i3GeoMap.createNetworkLink('');linki3geo.setHref(kmlUrl+i3GEO.Interface.googleearth.posfixo);nl.setLink(linki3geo);nl.setFlyToView(false);nl.setName(nomeLayer);i3GeoMap.getFeatures().appendChild(nl);return nl},retornaIndiceLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=0,i=0;if(n>0){for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i}}return indice}else{return false}},aplicaOpacidade:function(opacidade){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),i;for(i=0;i<n;i++){i3GeoMap.getFeatures().getChildNodes().item(i).setOpacity(opacidade)}},retornaObjetoLayer:function(nomeLayer){var n=i3GeoMap.getFeatures().getChildNodes().getLength(),indice=false,i;for(i=0;i<n;i++){if(i3GeoMap.getFeatures().getChildNodes().item(i).getName()===nomeLayer){indice=i3GeoMap.getFeatures().getChildNodes().item(i)}}return indice},registraEventos:function(){google.earth.addEventListener(i3GeoMap.getView(),"viewchangeend",function(e){i3GEO.Interface.googleearth.recalcPar()});google.earth.addEventListener(i3GeoMap.getGlobe(),'mousemove',function(event){d=i3GEO.calculo.dd2dms(event.getLongitude(),event.getLatitude());objposicaocursor={ddx:event.getLongitude(),ddy:event.getLatitude(),dmsx:d[0],dmsy:d[1],imgx:event.getClientX(),imgy:event.getClientY(),telax:event.getClientX()+i3GEO.Interface.googleearth.POSICAOTELA[0],telay:event.getClientY()+i3GEO.Interface.googleearth.POSICAOTELA[1]};i3GEO.eventos.mousemoveMapa()});google.earth.addEventListener(i3GeoMap.getGlobe(),'click',function(event){if(i3GEO.Interface.googleearth.aguarde.visibility==="hidden"){i3GEO.eventos.mousecliqueMapa()}else{i3GEO.Interface.googleearth.aguarde.visibility="hidden"}})},recalcPar:function(){var bounds;bounds=i3GeoMap.getView().getViewportGlobeBounds();i3GEO.parametros.mapexten=bounds.getWest()+" "+bounds.getSouth()+" "+bounds.getEast()+" "+bounds.getNorth()},falha:function(){alert("Falhou. Vc precisa do plugin instalado")},ativaBotoes:function(){var cabecalho=function(){i3GEO.barraDeBotoes.ativaIcone("")},minimiza=function(){i3GEO.janela.minimiza("i3GEOF.ferramentasGE")},janela=i3GEO.janela.cria("230px","110px","","","","Ferramentas","i3GEOF.ferramentasGE",false,"hd",cabecalho,minimiza);i3GEO.barraDeBotoes.TEMPLATEBOTAO='<div style="display:inline;background-color:rgb(250,250,250);"><img src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" id="$$"/></div> ';i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","",false,"200","200",janela[2].id);i3GEO.barraDeBotoes.ativaBotoes();i3GEO.Interface.googleearth.aguarde=$i("i3GEOF.ferramentasGE_imagemCabecalho").style;$i("i3GEOF.ferramentasGE_minimizaCabecalho").style.right="0px";$i("i3GEOF.ferramentasGE").lastChild.style.display="none";i3GEO.ajuda.abreJanela()},balao:function(texto,ddx,ddy){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint(''),b;point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);b=i3GeoMap.createHtmlStringBalloon('');b.setContentString("<div style=text-align:left >"+texto+"</div>");b.setFeature(placemark);i3GeoMap.setBalloon(b)},insereMarca:function(description,ddx,ddy,name,snippet){var placemark=i3GeoMap.createPlacemark(''),point=i3GeoMap.createPoint('');placemark.setName(name);point.setLatitude(ddy);point.setLongitude(ddx);placemark.setGeometry(point);if(description!==""){placemark.setDescription(description)}placemark.setSnippet(snippet);i3GeoMap.getFeatures().appendChild(placemark)},insereCirculo:function(centerLng,centerLat,radius,name,snippet){function makeCircle(centerLat,centerLng,radius){var ring=i3GeoMap.createLinearRing(''),steps=25,i,pi2=Math.PI*2,lat,lng;for(i=0;i<steps;i++){lat=centerLat+radius*Math.cos(i/steps*pi2);lng=centerLng+radius*Math.sin(i/steps*pi2);ring.getCoordinates().pushLatLngAlt(lat,lng,0)}return ring}var polygonPlacemark=i3GeoMap.createPlacemark(''),poly=i3GeoMap.createPolygon(''),polyStyle;poly.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);polygonPlacemark.setGeometry(poly);polygonPlacemark.getGeometry().setOuterBoundary(makeCircle(centerLat,centerLng,radius));polygonPlacemark.setName(name);polygonPlacemark.setSnippet(snippet);polygonPlacemark.setStyleSelector(i3GeoMap.createStyle(''));polyStyle=polygonPlacemark.getStyleSelector().getPolyStyle();polyStyle.setFill(0);i3GeoMap.getFeatures().appendChild(polygonPlacemark)},insereLinha:function(xi,yi,xf,yf,name,snippet){var lineStringPlacemark=i3GeoMap.createPlacemark(''),lineString,lineStyle;lineStringPlacemark.setName(name);lineString=i3GeoMap.createLineString('');lineString.setAltitudeMode(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND);lineStringPlacemark.setGeometry(lineString);lineString.getCoordinates().pushLatLngAlt(yi,xi,0);lineString.getCoordinates().pushLatLngAlt(yf,xf,0);lineStringPlacemark.setStyleSelector(i3GeoMap.createStyle(''));lineStringPlacemark.setSnippet(snippet);lineStyle=lineStringPlacemark.getStyleSelector().getLineStyle();lineStyle.setWidth(3);i3GeoMap.getFeatures().appendChild(lineStringPlacemark)},removePlacemark:function(nome){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i,nfeatures=[];for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getName()===nome||features.getChildNodes().item(i).getDescription()===nome||features.getChildNodes().item(i).getSnippet()===nome){nfeatures.push(features.getChildNodes().item(i))}}catch(e){}}n=nfeatures.length;for(i=0;i<n;i++){features.removeChild(nfeatures[i])}},adicionaKml:function(pan,url,titulo,ativo){var ngeoxml,i;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}ngeoxml="geoXml_"+i3GEO.mapa.GEOXML.length;if(arguments.length===1){i=$i("i3geo_urlkml");if(i){url=i.value}else{url=""}titulo=ngeoxml;ativo=false}if(arguments.length===2){titulo=ngeoxml;ativo=true}if(arguments.length===2){ativo=true}if(url===""){return}i3GEO.mapa.GEOXML.push(ngeoxml);linki3geokml=i3GeoMap.createLink('');if(url.split("http").length===1){url=i3GEO.util.protocolo()+"://"+window.location.host+url}linki3geokml.setHref(url);eval(ngeoxml+" = i3GeoMap.createNetworkLink('')");eval(ngeoxml+".setLink(linki3geokml)");if(i3GEO.arvoreDeCamadas.MOSTRALISTAKML===false){i3GEO.arvoreDeCamadas.MOSTRALISTAKML=true;i3GEO.Interface.googleearth.criaArvoreKML()}i3GEO.Interface.googleearth.adicionaNoArvoreGoogle(url,titulo,ativo,ngeoxml)},adicionaListaKml:function(){var monta=function(retorno){var raiz,nraiz,i;raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i++){i3GEO.Interface.googleearth.adicionaKml(false,raiz[i].link,raiz[i].title,false)}};i3GEO.php.listaRSSwsARRAY(monta,"KML")},adicionaNoArvoreGoogle:function(url,nomeOverlay,ativo,id){var node,d,nodekml;if(!$i("arvoreCamadasKml")){i3GEO.Interface.googleearth.criaArvoreKML()}if(arguments.length===2){ativo=true;id=nomeOverlay}if(arguments.length===2){id=nomeOverlay}node=i3GEO.Interface.googleearth.ARVORE.getNodeByProperty("idkml","raiz");html="<input onclick='i3GEO.Interface.googleearth.ativaDesativaCamadaKml(this)' class=inputsb style='cursor:pointer;' type='checkbox' value='"+id+"'";if(ativo===true){html+=" checked "}html+="/>";html+=" <span style='cursor:move'>"+nomeOverlay+"</span>";d={html:html};nodekml=new YAHOO.widget.HTMLNode(d,node,true,true);nodekml.enableHighlight=false;nodekml.isleaf=true;i3GEO.Interface.googleearth.ARVORE.draw();i3GEO.Interface.googleearth.ARVORE.collapseAll();node.expand()},criaArvoreKML:function(){var arvore,a,root,titulo,d,node;arvore=$i("arvoreCamadasKml");if(!arvore){d=document.createElement("div");d.id="arvoreCamadasKml";d.style.top="40px";a=$i(i3GEO.arvoreDeCamadas.IDHTML);if(a){a.parentNode.appendChild(d)}else{return}}i3GEO.Interface.googleearth.ARVORE=new YAHOO.widget.TreeView("arvoreCamadasKml");root=i3GEO.Interface.googleearth.ARVORE.getRoot();titulo="<table><tr><td><b>Google Earth Kml</b></td></tr></table>";d={html:titulo,idkml:"raiz"};node=new YAHOO.widget.HTMLNode(d,root,true,true);node.enableHighlight=false;if(i3GEO.parametros.editor==="sim"){d=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/webservices.html' target=blank >Editar cadastro</a>",idmenu:"",enableHighlight:false,expanded:false},node)}},existeLink:function(url){var existe=false,features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){existe=true}}catch(e){}}return(existe)},ativaDesativaLink:function(url,valor){var features=i3GeoMap.getFeatures(),n=features.getChildNodes().getLength(),i;for(i=0;i<n;i++){try{if(features.getChildNodes().item(i).getLink().getHref()===url){features.getChildNodes().item(i).setVisibility(valor)}}catch(e){}}},ativaDesativaCamadaKml:function(obj){var url=eval(obj.value+".getLink().getHref()"),existe=i3GEO.Interface.googleearth.existeLink(url);if(!obj.checked){i3GEO.Interface.googleearth.ativaDesativaLink(url,false)}else{if(existe===false){eval("i3GeoMap.getFeatures().appendChild("+obj.value+")")}else{i3GEO.Interface.googleearth.ativaDesativaLink(url,true)}}},zoom2extent:function(mapexten){var r=6378700,lng2,lng1,lat1,lat2,ret=mapexten.split(" "),fov=32,camera=i3GeoMap.getView().copyAsCamera(i3GeoMap.ALTITUDE_RELATIVE_TO_GROUND),dy,dx,d,dist,alt;lng2=(ret[0]*1);lng1=(ret[2]*1);lat1=(ret[1]*1);lat2=(ret[3]*1);camera.setLatitude((lat1+lat2)/2.0);camera.setLongitude((lng1+lng2)/2.0);camera.setHeading(0.0);camera.setTilt(0.0);dy=Math.max(lat1,lat2)-Math.min(lat1,lat2);dx=Math.max(lng1,lng2)-Math.min(lng1,lng2);d=Math.max(dy,dx);d=d*Math.PI/180.0;dist=r*Math.tan(d/2);alt=dist/(Math.tan(fov*Math.PI/180.0));camera.setAltitude(alt);i3GeoMap.getView().setAbstractView(camera)},alteraParametroLayers:function(parametro,valor){parametro=parametro.toUpperCase();var reg=new RegExp(parametro+"([=])+([a-zA-Z0-9_]*)");i3GEO.Interface.googleearth.PARAMETROSLAYER=i3GEO.Interface.googleearth.PARAMETROSLAYER.replace(reg,"");i3GEO.Interface.googleearth.PARAMETROSLAYER+="&"+parametro+"="+valor;i3GEO.Interface.googleearth.redesenha()}}}; | |
358 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.mapa={AUTORESIZE:false,GEOXML:[],insereDobraPagina:function(tipo,imagem){var novoel=$i("i3GEOdobraPagina");if(!novoel){novoel=document.createElement("img")}novoel.src=imagem;novoel.id="i3GEOdobraPagina";if(tipo==="googlemaps"){novoel.onclick=function(){i3GEO.Interface.atual2gm.inicia()}}if(tipo==="openlayers"){novoel.onclick=function(){i3GEO.Interface.atual2ol.inicia()}}novoel.style.cursor="pointer";novoel.style.position="absolute";novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.zIndex="50000";novoel.style.left=i3GEO.parametros.w-35+"px";YAHOO.util.Event.addListener(novoel,"click",YAHOO.util.Event.stopPropagation);$i(i3GEO.Interface.IDMAPA).appendChild(novoel)},reposicionaDobraPagina:function(){var novoel=$i("i3GEOdobraPagina");if(!novoel){return}novoel.style.top=i3GEO.parametros.h-35+"px";novoel.style.left=i3GEO.parametros.w-35+"px"},ativaAutoResize:function(){window.onresize=function(){var Dw,Dh,r=false;Dw=YAHOO.util.Dom.getViewportWidth();Dh=YAHOO.util.Dom.getViewportHeight();if(Math.abs(Dw-i3GEO.tamanhodoc[0])>50){r=true}if(Math.abs(Dh-i3GEO.tamanhodoc[1])>50){r=true}if(r===false){return}i3GEO.tamanhodoc=[Dw,Dh];setTimeout(function(){i3GEO.reCalculaTamanho();i3GEO.barraDeBotoes.recria("i3geo_barra2");if(i3GEO.Interface.TABLET===true){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.guiaMovel.reposiciona()}else{i3GEO.guias.ajustaAltura()}i3GEO.mapa.reposicionaDobraPagina()},2000)}},ajustaPosicao:function(elemento){if(arguments.length===0){return}var imagemxi=0,imagemyi=0,dc=$i(elemento),c;if(!dc){return}try{while((dc.offsetParent)&&(dc.offsetParent.id!=="i3geo")){dc=dc.offsetParent;imagemxi+=dc.offsetLeft;imagemyi+=dc.offsetTop}c=$i(i3GEO.Interface.IDCORPO);if(c){c.style.position="absolute";if(navm){$left(i3GEO.Interface.IDCORPO,imagemxi-1)}else{$left(i3GEO.Interface.IDCORPO,imagemxi)}$top(i3GEO.Interface.IDCORPO,imagemyi)}}catch(e){alert("Ocorreu um erro. i3GEO.mapa.ajustaPosicao "+e)}},ativaTema:function(codigo){if(codigo){if(codigo===""){return}if(i3GEO.temaAtivo!==""){i3GEO.util.defineValor("ArvoreTituloTema"+i3GEO.temaAtivo,"style.color","")}i3GEO.temaAtivo=codigo;i3GEO.util.defineValor("ArvoreTituloTema"+codigo,"style.color","brown")}},ativaLogo:function(){if(i3GEO.Interface.ATUAL==="googlemaps"){alert($trad("x21"));return}i3GEO.php.ativalogo(i3GEO.atualiza);var cr=$i("i3GEOcopyright");if(cr){if(cr.style.display==="block"){cr.style.display="none"}else{cr.style.display="block"}}},verifica:function(retorno){try{if(retorno.data){retorno=retorno.data}if(retorno.variaveis){retorno=retorno.variaveis}if((retorno==="erro")||(typeof(retorno)==='undefined')){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();i3GEO.mapa.recupera.inicia()}i3GEO.mapa.recupera.TENTATIVA=0}catch(e){if(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.janela.fechaAguarde();return}if(this.recupera.TENTATIVA===0){alert("Erro no mapa. Sera feita uma tentativa de recuperacao.");i3GEO.mapa.recupera.inicia()}else{alert("Recuperacao impossivel. Sera feita uma tentativa de reiniciar o mapa.");if(this.recupera.TENTATIVA===1){this.recupera.TENTATIVA=2;i3GEO.php.reiniciaMapa(i3GEO.atualiza)}}}},recupera:{TENTATIVA:0,inicia:function(){i3GEO.mapa.ajustaPosicao();i3GEO.janela.fechaAguarde();if(this.recupera.TENTATIVA===0){this.recupera.TENTATIVA++;this.recupera.restaura()}},restaura:function(){i3GEO.php.recuperamapa(i3GEO.atualiza)}},legendaHTML:{incluiBotaoLibera:true,ID:"",cria:function(id){if(arguments.length===0){id=""}i3GEO.mapa.legendaHTML.ID=id;if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.mapa.legendaHTML.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.mapa.legendaHTML.atualiza()")}i3GEO.mapa.legendaHTML.atualiza()},atualiza:function(){var idleg,temp=function(retorno){var ins,elementos,i,temp,re;re=new RegExp("<img src='' />","g");if(i3GEO.mapa.legendaHTML.ID!==""&&$i(i3GEO.mapa.legendaHTML.ID)){if((retorno.data!=="erro")&&(retorno.data!==undefined)){ins="";if(i3GEO.mapa.legendaHTML.incluiBotaoLibera===true){ins+='<div style="cursor: pointer; text-align: left; font-size: 10px; display: block; height: 35px;" onclick="i3GEO.mapa.legendaHTML.libera()"><img id="soltaLeg" src="../imagens/branco.gif" title="clique para liberar" style="margin: 5px; position: relative;"> <p style="position: relative; left: -45px; top: -22px;">Mostra a legenda em uma janela</p></div>'}temp=retorno.data.legenda;temp=temp.replace(re,"");ins+="<div id='corpoLegi' >"+temp+"</div>";$i(i3GEO.mapa.legendaHTML.ID).innerHTML=ins}}if($i("wlegenda")){$i("wlegenda").innerHTML=retorno.data.legenda;elementos=$i("wlegenda").getElementsByTagName("input");for(i=0;i<elementos.length;i+=1){elementos[i].style.display="none"}}};if(i3GEO.mapa.legendaHTML.ID!==""){idleg=$i(i3GEO.mapa.legendaHTML.ID);if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}}idleg=$i("wlegenda");if(idleg&&idleg.style.display==="block"){i3GEO.mapa.legendaHTML.obtem(temp)}},obtem:function(funcao){i3GEO.php.criaLegendaHTML(funcao,"",i3GEO.configura.templateLegenda)},ativaDesativaTema:function(inputbox){var temp=function(){i3GEO.php.corpo(i3GEO.atualiza,i3GEO.configura.tipoimagem);i3GEO.arvoreDeCamadas.atualiza("");i3GEO.janela.fechaAguarde("redesenha")};if(!inputbox.checked){i3GEO.php.ligatemas(temp,inputbox.value,"")}else{i3GEO.php.ligatemas(temp,"",inputbox.value)}},libera:function(){var temp=function(retorno){var novoel,temp,n,i,janela;if(!$i("moveLegi")){novoel=document.createElement("div");novoel.id="moveLegi";novoel.style.display="block";temp='<div class="hd" >Legenda</div>';temp+='<div id="wlegenda" style="display:block;padding:5px 2px 5px 0px;text-align:left;background-color:white;height:300px;width:300px;overflow:auto" ></div>';novoel.innerHTML=temp;document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("moveLegi",{width:"302px",fixedcenter:true,constraintoviewport:false,underlay:"shadow",close:true,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();novoel.onmouseover=function(){if($i("moveLegi").style.display==="block"){YAHOO.util.Dom.setStyle("moveLegi","opacity",1)}};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle("moveLegi","opacity",0.20)}}else{janela=YAHOO.i3GEO.janela.manager.find("moveLegi")}$i("wlegenda").innerHTML=retorno.data.legenda;temp=$i("wlegenda").getElementsByTagName("input");n=temp.length;for(i=0;i<n;i+=1){temp[i].style.display="none"}janela.show()};i3GEO.mapa.legendaHTML.obtem(temp)}},legendaIMAGEM:{obtem:function(funcao){i3GEO.php.criaLegendaImagem(funcao)}},dialogo:{animacao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.animacao()","animacao","animacao")},opacidade:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opacidade()","opacidademapa","opacidademapa")},telaRemota:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.telaremota()","telaremota","telaremota")},t3d:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.t3d()","3d","t3d")},imprimir:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.imprimir()","imprimir","imprimir")},mostraExten:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.mostraExten()","mostraexten","mostraExten")},outputformat:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.outputformat()","outputformat","outputformat")},autoredesenha:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.autoredesenha()","opcoes_autoredesenha","opcoesTempo")},salvaMapa:function(){if(i3GEO.parametros===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.salvaMapa()","salvamapa","salvaMapa")},carregaMapa:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()","carregamapa","carregaMapa")},convertews:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertews()","convertews","converteMapaWS")},convertekml:function(){if(i3GEO.parametros.mapfile===""){alert("Essa opcao nao pode ser ativada. Consulte o administrador do sistema. Mapfile nao esta exposto.");return}i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.convertekml()","convertemapakml","converteMapaKml")},queryMap:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.queryMap()","opcoes_querymap","opcoesQuery")},template:function(){i3GEO.janela.cria("300px","400px",i3GEO.configura.locaplic+"/ferramentas/template/index.htm","","","Template <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=1&idajuda=8' > </a>")},tamanho:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tamanho()","opcoes_tamanho","opcoesTamanho")},tipoimagem:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.tipoimagem()","tipoimagem","tipoimagem")},corFundo:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.corFundo()","opcoes_fundo","opcoesFundo")},opcoesEscala:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesEscala()","opcoes_escala","opcoesEscala")},opcoesLegenda:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.opcoesLegenda()","opcoes_legenda","opcoesLegenda")},gradeCoord:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.gradeCoord()","gradecoord","gradeCoord")},cliqueTexto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueTexto()","inseretxt","inseretxt")},selecao:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.selecao()","selecao","selecao")},cliquePonto:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliquePonto()","inserexy2","inserexy")},cliqueGrafico:function(){i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.cliqueGrafico()","inseregrafico","insereGrafico")},cliqueIdentificaDefault:function(){if(g_tipoacao==="identifica"){i3GEO.eventos.MOUSEPARADO.remove("verificaTip()");if(typeof(i3GEOF.identifica)==='undefined'){var js=i3GEO.configura.locaplic+"/ferramentas/identifica/index.js";i3GEO.util.scriptTag(js,"i3GEOF.identifica.criaJanelaFlutuante()","i3GEOF.identifica_script")}else{i3GEOF.identifica.x=objposicaocursor.ddx;i3GEOF.identifica.y=objposicaocursor.ddy;i3GEOF.identifica.buscaDadosTema(i3GEO.temaAtivo);return}}},verificaTipDefault:function(){var ntemas,etiquetas,j,retorna;ntemas=i3GEO.arvoreDeCamadas.CAMADAS.length;etiquetas=false;for(j=0;j<ntemas;j+=1){if(i3GEO.arvoreDeCamadas.CAMADAS[j].etiquetas!==""){etiquetas=true}}if(etiquetas===false){return}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.aguarde.visibility="visible"}retorna=function(retorno){var pos,temp,n,i,mostra,res,temas,ntemas,titulo,tips,j,ntips,ins,r,ds,nds,s,balloon,configura=i3GEO.configura,tipotip=configura.tipotip;i=$i("i3geo_rosa");if(i){i.style.display="none"}mostra=false;retorno=retorno.data;if(retorno!==""){res="";temas=retorno;if(!temas){return}ntemas=temas.length;for(j=0;j<ntemas;j+=1){titulo=temas[j].nome;if(tipotip==="completo"||tipotip==="balao"){titulo="<span style='text-decoration:underline;text-align:left;font-size:9pt'><b>"+titulo+"</b></span><br>"}else{titulo=""}tips=(temas[j].resultado.tips).split(",");ntips=tips.length;ins="";ds=temas[j].resultado.dados;if(ds!==" "&&ds[0]&&ds[0]!=" "){try{nds=ds.length;for(s=0;s<nds;s+=1){for(r=0;r<ntips;r+=1){try{eval("var alias = ds[s]."+tips[r]+".alias");eval("var valor = ds[s]."+tips[r]+".valor");eval("var link = ds[s]."+tips[r]+".link");eval("var img = ds[s]."+tips[r]+".img");if(tipotip==="completo"||tipotip==="balao"){if(valor!==""&&link===""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" :"+valor+"</span><br>"}if(valor!==""&&link!==""){ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+alias+" : <a style='color:blue;cursor:pointer' target=_blanck href='"+link+"' >"+valor+"</a></span><br>"}if(img!==""){ins+=img+"<br>"}ins+="<nl>";mostra=true}else{ins+="<span class='tiptexto' style='text-align:left;font-size:8pt'>"+valor+"</span><br>";mostra=true}}catch(e){}}}}catch(e){}}if(ins!==""){res+=titulo+ins}}if(!mostra){if($i("tip")){$i("tip").style.display="none"}}else{if(tipotip!=="balao"){n=i3GEO.janela.tip();$i(n).style.textAlign="left";$i(n).innerHTML+=res}else{if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.balao(res,objposicaocursor.ddx,objposicaocursor.ddy);i3GEO.Interface.googleearth.aguarde.visibility="hidden"}else{i3GEO.util.criaPin('marcaIdentifica',configura.locaplic+"/imagens/grabber.gif","12px","12px");i3GEO.janela.TIPS.push('marcaIdentifica');pos=i3GEO.util.posicionaImagemNoMapa("marcaIdentifica");balloon=new Balloon();BalloonConfig(balloon,'GBox');balloon.delayTime=0;res="<div style=text-align:left;overflow:auto;height:"+configura.alturatip+";width:"+configura.larguratip+"; >"+res+"</div>";temp=$i('marcaIdentifica');if(temp){balloon.showTooltip(temp,res,null,null,null,pos[1],pos[0]);balloon.addCloseButton();temp.onclick=function(e){if(!e){e=window.event}document.body.removeChild(balloon.getEventTarget(e));balloon.hideTooltip()}}}}}}if($i(i3GEO.Interface.IDMAPA)){$i(i3GEO.Interface.IDMAPA).title="";temp="identifica";if(i3GEO.Interface.ATIVAMENUCONTEXTO){temp="identifica_contexto"}i3GEO.util.mudaCursor(configura.cursores,temp,i3GEO.Interface.IDMAPA,configura.locaplic)}};i3GEO.php.identifica2(retorna,objposicaocursor.ddx,objposicaocursor.ddy,"5","tip",i3GEO.configura.locaplic,i3GEO.configura.sid,"ligados",i3GEO.parametros.mapexten)}}}; | |
359 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.tema={TEMPORIZADORESID:{},exclui:function(tema){g_operacao="excluitema";try{var p=document.getElementById("idx"+tema).parentNode.parentNode.parentNode;do{p.removeChild(p.childNodes[0])}while(p.childNodes.length>0);p.parentNode.removeChild(p)}catch(e){}i3GEO.php.excluitema(i3GEO.atualiza,[tema]);i3GEO.mapa.ativaTema("");i3GEO.temaAtivo=""},fonte:function(tema){i3GEO.mapa.ativaTema(tema);window.open(i3GEO.configura.locaplic+"/admin/abrefontemapfile.php?tema="+tema)},sobe:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.sobetema(function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}},tema)},desce:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.descetema(function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}},tema)},zoom:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomtema(i3GEO.atualiza,tema)},zoomsel:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.php.zoomsel(i3GEO.atualiza,tema)},limpasel:function(tema){i3GEO.mapa.ativaTema(tema);g_operacao="limpasel";i3GEO.php.limpasel(function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,tema)},tema)},mudatransp:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";var valor="";if($i("tr"+idtema)){valor=$i("tr"+idtema).value}if(valor!==""){i3GEO.php.mudatransp(function(retorno){i3GEO.atualiza(retorno);i3GEO.Interface.atualizaTema(retorno,idtema)},idtema,valor)}else{alert($trad("x16"))}},invertestatuslegenda:function(idtema){alert($trad("x17"));i3GEO.mapa.ativaTema(idtema);g_operacao="transparencia";i3GEO.php.invertestatuslegenda(function(retorno){i3GEO.atualiza(retorno);i3GEO.arvoreDeCamadas.atualiza()},idtema)},alteracorclasse:function(idtema,idclasse,rgb){i3GEO.mapa.ativaTema(idtema);i3GEO.php.aplicaCorClasseTema(temp=function(){i3GEO.atualiza();i3GEO.Interface.atualizaTema("",idtema);i3GEO.arvoreDeCamadas.atualizaLegenda(idtema)},idtema,idclasse,rgb)},mudanome:function(idtema){i3GEO.mapa.ativaTema(idtema);g_operacao="mudanome";var valor="";if($i("nn"+idtema)){valor=$i("nn"+idtema).value}if(valor!==""){i3GEO.php.mudanome(i3GEO.atualiza,idtema,valor)}else{alert($trad("x18"))}},mostralegendajanela:function(idtema,nome,tipoOperacao){if(tipoOperacao==="ativatimer"){mostralegendajanelaTimer=setTimeout("i3GEO.tema.mostralegendajanela('"+idtema+"','"+nome+"','abrejanela')",4000)}if(tipoOperacao==="abrejanela"){try{clearTimeout(mostralegendajanelaTimer)}catch(e){}if(!$i("janelaLegenda"+idtema)){var janela=i3GEO.janela.cria("250px","","","","",nome,"janelaLegenda"+idtema,false);janela[2].style.textAlign="left";janela[2].style.background="white";janela[2].innerHTML=$trad("o1")}i3GEO.php.criaLegendaHTML(function(retorno){$i("janelaLegenda"+idtema+"_corpo").innerHTML=retorno.data.legenda},idtema,"legenda3.htm")}if(tipoOperacao==="desativatimer"){clearTimeout(mostralegendajanelaTimer)}},temporizador:function(idtema,tempo){if(!tempo){tempo=$i("temporizador"+idtema).value}if(tempo!=""&&parseInt(tempo,10)>0){eval('i3GEO.tema.TEMPORIZADORESID.'+idtema+' = {tempo: '+tempo+',idtemporizador: setInterval(function('+idtema+'){if(!$i("arrastar_'+idtema+'")){delete(i3GEO.tema.TEMPORIZADORESID.'+idtema+');return;}i3GEO.Interface.atualizaTema("",idtema);},parseInt('+tempo+',10)*1000)};')}else{try{window.clearInterval(i3GEO.tema.TEMPORIZADORESID[idtema].idtemporizador);delete(i3GEO.tema.TEMPORIZADORESID[idtema])}catch(e){}}},dialogo:{tme:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tme()","tme","tme")},mostraWms:function(tema){i3GEO.janela.mensagemSimples(i3GEO.configura.locaplic+"/ogc.php?tema="+tema,"WMS url")},comentario:function(tema){i3GEO.janela.cria("530px","330px",i3GEO.configura.locaplic+"/ferramentas/comentarios/index.php?tema="+tema+"&g_sid="+i3GEO.configura.sid+"&locaplic="+i3GEO.configura.locaplic,"","","<img src='"+i3GEO.configura.locaplic+"/imagens/player_volta.png' style=cursor:pointer onclick='javascript:history.go(-1)'><span style=position:relative;top:-2px; > "+$trad("x19")+" "+tema+" </span><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>","comentario"+Math.random())},cortina:function(tema){i3GEO.mapa.ativaTema(tema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.cortina()","cortina","cortina")},abreKml:function(tema,tipo){if(arguments.lenght===1){tipo="kml"}if(typeof(i3GEOF.converteKml)==='undefined'){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/convertekml/index.js","i3GEOF.converteKml.criaJanelaFlutuante('"+tema+"','"+tipo+"')","i3GEOF.converteKml_script")}else{i3GEOF.converteKml.criaJanelaFlutuante(tema,tipo)}},salvaMapfile:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.salvamapfile()","salvamapfile","salvamapfile")},graficotema:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.graficotema()","graficotema","graficoTema")},toponimia:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.toponimia()","toponimia","toponimia")},filtro:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.filtro()","filtro","filtro")},procuraratrib:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.procuraratrib()","busca","busca")},tabela:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.tabela()","tabela","tabela")},etiquetas:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.etiquetas()","etiqueta","etiqueta")},editaLegenda:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editaLegenda()","legenda","legenda")},download:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.download()","download","download")},sld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.janela.cria("500px","350px",i3GEO.configura.locaplic+"/classesphp/mapa_controle.php?funcao=tema2sld&tema="+idtema+"&g_sid="+i3GEO.configura.sid,"","","SLD <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=41' > </a>")},aplicarsld:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.aplicarsld()","aplicarsld","aplicarsld")},editorsql:function(idtema){i3GEO.mapa.ativaTema(idtema);i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.editorsql()","editorsql","editorsql")}}}; | |
360 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.analise={dialogo:{graficoInterativo:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.graficoInterativo()","graficointerativo","graficointerativo")},linhaDoTempo:function(){i3GEO.janela.cria("450px","300px",i3GEO.configura.locaplic+"/ferramentas/linhadotempo/index.php","","","Linha do tempo <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=3&idajuda=88' > </a>");atualizaLinhaDoTempo=function(){var doc="";try{if(navn){if($i("wdocai")){doc=$i("wdocai").contentDocument}}else{if(document.frames("wdocai")){doc=document.frames("wdocai").document}}doc.getElementById("tl")?window.parent.wdocai.carregaDados():i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaLinhaDoTempo()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaLinhaDoTempo()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaLinhaDoTempo()")}},perfil:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.perfil()","perfil","perfil")},gradePontos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePontos()","gradepontos","gradeDePontos")},gradePol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradePol()","gradepol","gradeDePoligonos")},gradeHex:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.gradeHex()","gradehex","gradeDeHex")},analisaGeometrias:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.analisaGeometrias()","analisageometrias","analisaGeometrias")},pontosdistri:function(){i3GEO.parametros.r==="nao"?alert($trad("x22")):i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontosdistri()","pontosdistri","pontosDistri")},pontoempoligono:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.pontoempoligono()","pontoempoligono","pontoEmPoligono")},centromassa:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centromassa()","centromassa","centromassa")},nptPol:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.nptPol()","nptpol","nptpol")},buffer:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.buffer()","buffer","buffer")},distanciaptpt:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.distanciaptpt()","distanciaptpt","distanciaptpt")},centroide:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.centroide()","centroide","centroide")},dissolve:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.dissolve()","dissolve","dissolve")},agrupaElementos:function(){i3GEO.util.dialogoFerramenta("i3GEO.analise.dialogo.agrupaElementos()","agrupaelementos","agrupaElementos")}},medeDistancia:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};i3GEO.analise.medeDistancia.criaJanela();if(g_tipoacao!=="mede"){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeDistancia.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeDistancia.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeDistancia.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeDistancia.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeDistancia.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeDistancia.fechaJanela()")}$i("mostradistancia").style.display="block";if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.criaContainerRichdraw();i3GEO.desenho.richdraw.lineColor="black";i3GEO.desenho.richdraw.lineWidth="1px"}g_tipoacao="mede"}else{if(i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.desenho.richdraw.fecha()}var Dom=YAHOO.util.Dom;Dom.setStyle("mostradistancia","display","none");Dom.setStyle("pontosins","display","none")}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostradistancia")){novoel=document.createElement("div");novoel.id="mostradistancia";ins='<div class="hd" style="font-size:11px"> Distância aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'/ajuda_usuario.php?idcategoria=6&idajuda=50" > </a></div>'+'<div class="bd" style="text-align:left;padding:3px;" >'+'<div style="text-align:left;padding:3px;" id="mostradistancia_calculo" ></div>'+'<div style="text-align:left;font-size:10px" >'+'<span style="color:navy;cursor:pointer;text-align:left;" >'+'<table class=lista7 ><tr><td><input style="cursor:pointer" type="checkbox" id="pararraios" checked /></td><td>Raios</td><td> </td>'+'<td>'+'<input style="cursor:pointer" type="checkbox" id="parartextos" checked />'+'</td><td>Textos<td>'+'<td> Estilo:</td><td>'+i3GEO.desenho.caixaEstilos()+'</td>'+'<td> <input id=i3GEObotaoPerfil size="22" type="button" value="perfil"></td>'+'</tr></table></span>'+'</div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostradistancia",{iframe:true,width:"330px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeDistancia.fechaJanela)}else{i3GEO.util.defineValor("mostradistancia_calculo","innerHTML","");janela=YAHOO.i3GEO.janela.manager.find("mostradistancia")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1]);if(navm&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}new YAHOO.widget.Button("i3GEObotaoPerfil",{onclick:{fn:function(){var js=i3GEO.configura.locaplic+"/ferramentas/perfil/index.js";i3GEO.util.scriptTag(js,"i3GEOF.perfil.criaJanelaFlutuante(pontosdistobj)","i3GEOF.perfil_script")}}})},fechaJanela:function(){var janela;i3GEO.Interface.ATUAL!=="googleearth"?i3GEO.desenho.richdraw.fecha():i3GEO.Interface.googleearth.removePlacemark("divGeometriasTemp");i3GEO.util.removeChild("pontosins");if($i("divGeometriasTemp")){i3GEO.desenho.richdraw.fecha()}i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeDistancia.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeDistancia.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeDistancia.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostradistancia");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},clique:function(){var n,d,decimal,dd;if(g_tipoacao==="mede"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1),(pontosdistobj.ximg[n]-1),(pontosdistobj.yimg[n]-1))}}catch(e){}}if(n>0){d=i3GEO.calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);decimal=0;d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;pontosdistobj.dist[n]=d+pontosdistobj.dist[n-1];if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1]),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n]),pontosdistobj.yimg[n])}if($i("pararraios")&&$i("pararraios").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereCirculo","",n)}if(i3GEO.Interface.ATUAL==="googleearth"){dd=Math.sqrt(((Math.pow((pontosdistobj.xpt[n]-pontosdistobj.xpt[n-1]),2))+(Math.pow((pontosdistobj.ypt[n]-pontosdistobj.ypt[n-1]),2))));i3GEO.Interface.googleearth.insereCirculo(pontosdistobj.xpt[n],pontosdistobj.ypt[n],dd,"","divGeometriasTemp")}}if($i("parartextos")&&$i("parartextos").checked===true){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.desenho.aplica("insereTexto","",n,d+" km")}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(d+" km",objposicaocursor.ddx,objposicaocursor.ddy,"","divGeometriasTemp")}}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereLinha(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],pontosdistobj.xpt[n],pontosdistobj.ypt[n],"","divGeometriasTemp")}}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeDistancia.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n,d,r,decimal,da,mostra,texto,calculo=i3GEO.calculo;if(g_tipoacao==="mede"){YAHOO.util.Dom.setStyle("mostradistancia","display","block");n=pontosdistobj.xpt.length;try{if(n>0){d=calculo.distancia(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.direcao(pontosdistobj.xpt[n-1],pontosdistobj.ypt[n-1],objposicaocursor.ddx,objposicaocursor.ddy);r=calculo.dd2dms(r,r);r=r[0];d=d+"";d=d.split(".");decimal=d[1].substr(0,5);d=d[0]+"."+decimal;d=d*1;da=d+pontosdistobj.dist[n-1];da=da+"";da=da.split(".");decimal=da[1].substr(0,5);da=da[0]+"."+decimal;da=da*1;mostra=$i("mostradistancia_calculo");if(mostra){texto=" Dist acum.= "+da+" km <br>atual= "+d+" km <br> "+$trad("x23")+" (DMS)= "+r;texto+="<br>"+$trad("x24")+": "+calculo.metododistancia;mostra.innerHTML=texto}if(i3GEO.Interface.ATUAL!=="googleearth"&&navn){i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}catch(e){}}}},medeArea:{inicia:function(){pontosdistobj={xpt:[],ypt:[],dist:[],distV:[],xtela:[],ytela:[],ximg:[],yimg:[],linhas:[],linhastemp:[]};var x,y,ll1,ll2,d,calculo=i3GEO.calculo,montacontainer=function(){var desenho=i3GEO.desenho;$i("mostraarea_calculo").innerHTML="Clique no mapa para desenhar o poligono. Clique duas vezes para concluir";i3GEO.barraDeBotoes.ativaIcone("area");g_tipoacao="area";desenho.criaContainerRichdraw();desenho.richdraw.lineColor="green";desenho.richdraw.lineWidth="2px"};i3GEO.analise.medeArea.criaJanela();if(g_tipoacao!=="area"){$i("mostraarea_calculo").innerHTML="";if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.analise.medeArea.clique()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.analise.medeArea.clique()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.analise.medeArea.movimento()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.analise.medeArea.movimento()")}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.analise.medeArea.fechaJanela()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.analise.medeArea.fechaJanela()")}if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){x=parseInt(i3GEO.parametros.w/2,10);y=parseInt(i3GEO.parametros.h/2,10);ll1=calculo.tela2dd(x,y,"","");ll2=calculo.tela2dd(x+1,y,"","");d=calculo.distancia(ll1[0],ll1[1],ll2[0],ll2[1]);d=d*1000;g_areapixel=d*d;g_areapixel<0?alert("Nao e possivel calcular a area. Entre em contato com o administrador do sistema."):montacontainer()}}else{i3GEO.desenho.richdraw.fecha()}},criaJanela:function(){var novoel,ins,imagemxy,janela;if(!$i("mostraarea")){novoel=document.createElement("div");novoel.id="mostraarea";ins='<div class="hd" >Área aproximada <a class=ajuda_usuario target=_blank href="'+i3GEO.configura.locaplic+'"/ajuda_usuario.php?idcategoria=6&idajuda=51" > </a></div>'+'<div class="bd" style="text-align:left;padding:3px;font-size:10px" >'+'Estilo: '+i3GEO.desenho.caixaEstilos()+'<br>'+'<div style="text-align:left;padding:3px;font-size:10px" id="mostraarea_calculo" ></div>'+'</div>';novoel.innerHTML=ins;novoel.style.borderColor="gray";document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("mostraarea",{width:"220px",fixedcenter:false,constraintoviewport:true,underlay:"none",close:true,visible:true,draggable:true,modal:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();YAHOO.util.Event.addListener(janela.close,"click",i3GEO.analise.medeArea.fechaJanela)}else{janela=YAHOO.i3GEO.janela.manager.find("mostraarea")}janela.show();imagemxy=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));janela.moveTo(imagemxy[0]+150,imagemxy[1])},fechaJanela:function(){var janela;i3GEO.desenho.richdraw.fecha();i3GEO.util.removeChild("pontosArea",document.body);i3GEO.eventos.MOUSECLIQUE.remove("i3GEO.analise.medeArea.clique()");i3GEO.eventos.MOUSEMOVE.remove("i3GEO.analise.medeArea.movimento()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.analise.medeArea.fechaJanela()");i3GEO.barraDeBotoes.ativaBotoes();janela=YAHOO.i3GEO.janela.manager.find("mostraarea");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},clique:function(){var n,m;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;pontosdistobj.xpt[n]=objposicaocursor.ddx;pontosdistobj.ypt[n]=objposicaocursor.ddy;pontosdistobj.xtela[n]=objposicaocursor.telax;pontosdistobj.ytela[n]=objposicaocursor.telay;pontosdistobj.ximg[n]=objposicaocursor.imgx;pontosdistobj.yimg[n]=objposicaocursor.imgy;pontosdistobj.dist[n]=0;if(n===0){try{if(navn){pontosdistobj.linhastemp=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[0]-1,pontosdistobj.yimg[0]-1)}}catch(e){}}else{if(navm){i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,(pontosdistobj.ximg[n-1])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n-1],(pontosdistobj.ximg[n])-(i3GEO.parametros.w/2),pontosdistobj.yimg[n])}}try{if(navn){pontosdistobj.linhas[n]=i3GEO.desenho.richdraw.renderer.create(i3GEO.desenho.richdraw.mode,i3GEO.desenho.richdraw.fillColor,i3GEO.desenho.richdraw.lineColor,i3GEO.desenho.richdraw.lineWidth,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1,pontosdistobj.ximg[n]-1,pontosdistobj.yimg[n]-1)}}catch(men){}m=i3GEO.calculo.area(pontosdistobj,g_areapixel);i3GEO.util.defineValor("mostraarea_calculo","innerHTML","<br>m2</b>= "+m.toFixed(2)+"<br><b>km2</b>= "+(m/1000000).toFixed(2)+"<br><b>ha</b>= "+(m/10000).toFixed(2));if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["openlayers","googlemaps"])){i3GEO.util.insereMarca.cria(objposicaocursor.imgx,objposicaocursor.imgy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp");i3GEO.desenho.insereCirculo(objposicaocursor.imgx,objposicaocursor.imgy,3)}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.util.insereMarca.cria(objposicaocursor.ddx,objposicaocursor.ddy,i3GEO.analise.medeArea.paraCalculo,"divGeometriasTemp","")}}},paraCalculo:function(){var botaoPan=$i("pan");g_tipoacao="";botaoPan?botaoPan.onclick.call():i3GEO.barraDeBotoes.ativaBotoes()},movimento:function(){var n;if(g_tipoacao==="area"){n=pontosdistobj.xpt.length;if(n>0){i3GEO.desenho.aplica("resizePoligono",pontosdistobj.linhastemp,1);i3GEO.desenho.aplica("resizeLinha",pontosdistobj.linhas[n-1],n)}}}}}; | |
361 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.maparef={fatorZoomDinamico:-3,SELETORTIPO:true,PERMITEFECHAR:true,PERMITEDESLOCAR:true,TRANSICAOSUAVE:false,OPACIDADE:65,TOP:4,RIGHT:20,inicia:function(){var r,pos,novoel,ins,temp,moveX,moveY,escondeRef,janela;if($i("i3geo_winRef")){janela=YAHOO.i3GEO.janela.manager.find("i3geo_winRef");janela.show();janela.bringToTop();return}if(navm){i3GEO.maparef.TRANSICAOSUAVE=false}if(!$i("i3geo_winRef")){novoel=document.createElement("div");novoel.id="i3geo_winRef";novoel.style.display="none";novoel.style.borderColor="gray";ins="";if(this.PERMITEDESLOCAR){ins+='<div class="hd" style="text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">';ins+='<span id=maparefmaismenosZoom style=display:none > ';temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />";temp="javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();";ins+="<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> ";if(this.SELETORTIPO){ins+="<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>";ins+="<option value='fixo' select >fixo</option>";ins+="<option value='mapa' >mapa</option>";ins+="<option value='dinamico' >dinâmico</option>";ins+="</select>"}ins+="</div>"}ins+='<div class="bd" style="border:1px solid black;text-align:left;padding:3px;height: 150px;" id="mapaReferencia" onmouseover="this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy)}" >';ins+='<img style="cursor:pointer;display:none" onload="javascript:this.style.display = \'block\'" id="imagemReferencia" src="" onclick="javascript:i3GEO.maparef.click()">';ins+='</div>';novoel.innerHTML=ins;if(i3GEO.maparef.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100);novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.maparef.OPACIDADE/100)}}document.body.appendChild(novoel)}if($i("i3geo_winRef").style.display!=="block"){$i("i3geo_winRef").style.display="block";this.PERMITEDESLOCAR?temp="shadow":temp="none";janela=new YAHOO.widget.Panel("i3geo_winRef",{height:"177px",width:"156px",fixedcenter:false,constraintoviewport:true,underlay:temp,close:i3GEO.maparef.PERMITEFECHAR,visible:true,draggable:i3GEO.maparef.PERMITEDESLOCAR,modal:false,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);if(i3GEO.maparef.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.render();janela.show();try{janela.header.style.height="20px"}catch(e){};r=$i("i3geo_winRef_c");if(r){r.style.clip="rect(0px, 160px, 185px, 0px)";r.style.position="absolute"}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));$i("mapaReferencia").style.height="150px";$i("i3geo_winRef").style.border="1px solid gray";moveX=pos[0]+i3GEO.parametros.w+153-i3GEO.maparef.RIGHT-300;moveY=pos[1]+i3GEO.maparef.TOP;if(i3GEO.Interface.ATUAL==="googlemaps"){moveY+=30}janela.moveTo(moveX,moveY);escondeRef=function(){YAHOO.util.Event.removeListener(janela.close,"click");$i("imagemReferencia").src="";janela.destroy();i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","none")};YAHOO.util.Event.addListener(janela.close,"click",escondeRef);i3GEO.util.insereCookie("i3GEO.configura.mapaRefDisplay","block");if($i("localizarxygeoProjxg")){var temp=function(){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"localizarxygeoProj")};YAHOO.util.Event.addListener($i("imagemReferencia"),"mousemove",temp)}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.maparef.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.maparef.atualiza()")}this.atualiza(true);$i("i3geo_winRef_h").className="hd2";if(navm){$i("i3geo_winRef_h").style.width="156px"}},atualiza:function(forca){if(arguments.length===0){forca=false}var tiporef,temp,re;temp=$i("refDinamico")?tiporef=$i("refDinamico").value:tiporef="fixo";if($i("mapaReferencia")){temp=$i("maparefmaismenosZoom");if(tiporef==="dinamico"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}if(tiporef==="fixo"){if(i3GEO.parametros.utilizacgi.toLowerCase()!=="sim"){if(i3GEO.parametros.celularef===""||$i("imagemReferencia").src===""||forca===true){i3GEO.php.referencia(i3GEO.maparef.processaImagem)}else{i3GEO.maparef.atualizaBox()}if(temp){temp.style.display="none"}}else{re=new RegExp("&mode=map","g");$i("imagemReferencia").src=$i(i3GEO.Interface.IDMAPA).src.replace(re,'&mode=reference')}}if(tiporef==="mapa"){i3GEO.php.referenciadinamica(i3GEO.maparef.processaImagem,i3GEO.maparef.fatorZoomDinamico,tiporef);if(temp){temp.style.display="inline"}}}else{i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.maparef.atualiza()")}},processaImagem:function(retorno){var m,box,temp,tiporef="fixo";if((retorno.data!=="erro")&&(retorno.data!==undefined)){eval(retorno.data);i3GEO.parametros.celularef=g_celularef;i3GEO.parametros.extentref=extentref;temp=$i("imagemReferencia");if(temp){m=new Image();m.src=refimagem;temp.src=m.src}temp=$i("refDinamico");if(temp){tiporef=temp.value}if(tiporef!=="fixo"){box=$i("boxref");if(box){box.style.display="none"}return}i3GEO.maparef.atualizaBox()}},atualizaBox:function(){var box=i3GEO.maparef.criaBox(),w;i3GEO.calculo.ext2rect("boxref",i3GEO.parametros.extentref,i3GEO.parametros.mapexten,i3GEO.parametros.celularef,$i("mapaReferencia"));w=parseInt(box.style.width,10);if(w>120){box.style.display="none";return}box.style.display="block";box.style.top=parseInt(box.style.top,10)+4+"px";box.style.left=parseInt(box.style.left,10)+4+"px";if(w<3){box.style.width="3px";box.style.height="3px"}},criaBox:function(){var box=$i("boxref");if(!box){novoel=document.createElement("div");novoel.id="boxref";novoel.style.zIndex=10;novoel.style.position='absolute';novoel.style.cursor="move";novoel.style.backgroundColor="RGB(120,220,220)";novoel.style.borderWidth="3px";if(navm){novoel.style.filter='alpha(opacity=40)'}else{novoel.style.opacity=0.4}$i("mapaReferencia").appendChild(novoel);boxrefdd=new YAHOO.util.DD("boxref");novoel.onmouseup=function(){var rect,telaminx,telamaxx,telaminy,m,x,ext;rect=$i("boxref");telaminx=parseInt(rect.style.left,10);telamaxy=parseInt(rect.style.top,10);telamaxx=telaminx+parseInt(rect.style.width,10);telaminy=telamaxy+parseInt(rect.style.height,10);m=i3GEO.calculo.tela2dd(telaminx,telaminy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");x=i3GEO.calculo.tela2dd(telamaxx,telamaxy,i3GEO.parametros.celularef,i3GEO.parametros.extentref,"imagemReferencia");ext=m[0]+" "+m[1]+" "+x[0]+" "+x[1];i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,"",ext)};return novoel}else{return box}},click:function(){if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.pan2ponto(objposicaocursor.ddx,objposicaocursor.ddy);return}try{i3GEO.php.pan(i3GEO.atualiza,i3GEO.parametros.mapscale,"ref",objposicaocursor.refx,objposicaocursor.refy)}catch(e){i3GEO.janela.fechaAguarde("i3GEO.atualiza")}}}; | |
362 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.ajuda={ATIVAJANELA:true,DIVAJUDA:"i3geo_ajuda",DIVLETREIRO:"i3geo_letreiro",MENSAGEMPADRAO:$trad("p1"),TRANSICAOSUAVE:true,OPACIDADE:20,abreDoc:function(url){if(!url){url="/documentacao/index.html"}window.open(i3GEO.configura.locaplic+url)},abreJanela:function(){try{var nx,ny,corpo,texto,janela,temp,largura=262,YU=YAHOO.util,pos=[20,i3GEO.parametros.h/2];if(this.ATIVAJANELA===false){return}temp=$i("contemFerramentas");if(temp){largura=parseInt(temp.style.width,10)-5}if(!$i("janelaMenTexto")){corpo=$i(i3GEO.Interface.IDCORPO);if(corpo){pos=YU.Dom.getXY(corpo)}else{corpo=$i(i3GEO.Interface.IDMAPA);if(corpo){pos=YU.Dom.getXY(corpo)}}nx=pos[0]-largura-3;ny=i3GEO.parametros.h-78;texto='<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>';if(nx<0){nx=10;ny=ny-50}janela=i3GEO.janela.cria(largura-3,"auto","",nx,ny," ","i3geo_janelaMensagens",false,"hd","","",true);janela[2].innerHTML=texto;YU.Event.addListener(janela[0].close,"click",i3GEO.ajuda.fechaJanela);this.ativaCookie()}}catch(e){}},ativaCookie:function(){var i=i3GEO.util.insereCookie;i("g_janelaMen","sim");i("botoesAjuda","sim")},ativaLetreiro:function(mensagem){var l;if($i(i3GEO.ajuda.DIVLETREIRO)){if(arguments.length===0){mensagem=i3GEO.parametros.mensagens}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.ajuda.ativaLetreiro()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.ajuda.ativaLetreiro()")}try{clearTimeout(i3GEO.ajuda.tempoLetreiro)}catch(e){i3GEO.ajuda.tempoLetreiro=""}l=$i(i3GEO.ajuda.DIVLETREIRO);if(l.style.display==="none"){return}l.style.cursor="pointer";if(mensagem===""){l.value="";return}if(l.size===1){l.size=i3GEO.parametros.w/8}BMessage=mensagem+" ---Clique para parar--- ";l.onclick=function(){l.style.display="none"};if(BMessage!==" ---Clique para parar--- "){BQuantas=0;BSize=l.size;BPos=BSize;BSpeed=1;BSpaces="";i3GEO.ajuda.mostraLetreiro()}i3GEO.ajuda.mostraLetreiro(mensagem)}},desativaCookie:function(){i3GEO.util.insereCookie("g_janelaMen","nao")},fechaJanela:function(){i3GEO.ajuda.desativaCookie();i3GEO.util.removeChild("i3geo_janelaMensagens_c",document.body)},mostraJanela:function(texto){var j=$i(this.DIVAJUDA),k=$i("janelaMenTexto"),jm=$i("i3geo_janelaMensagens"),Dom=YAHOO.util.Dom,h=parseInt(Dom.getStyle(jm,"height"),10);if(j){j.innerHTML=texto===""?"-":texto}else{if(h){Dom.setY("i3geo_janelaMensagens",Dom.getY(jm)+h)}if(k){k.innerHTML=texto}if(this.TRANSICAOSUAVE){texto!==""?Dom.setStyle(jm,"opacity","1"):Dom.setStyle(jm,"opacity",(this.OPACIDADE/100))}h=parseInt(Dom.getStyle(jm,"height"),10);if(h){Dom.setY(jm,Dom.getY(jm)-h)}}},mostraLetreiro:function(){for(var count=0;count<BPos;count+=1){BSpaces+=" "}if(BPos<1){$i(i3GEO.ajuda.DIVLETREIRO).value=BMessage.substring(Math.abs(BPos),BMessage.length);if(BPos+BMessage.length<1){BPos=BSize;BQuantas=BQuantas+1}}else{$i(i3GEO.ajuda.DIVLETREIRO).value=BSpaces+BMessage}BPos-=BSpeed;if(BQuantas<2){i3GEO.ajuda.tempoLetreiro=setTimeout(function(){i3GEO.ajuda.mostraLetreiro()},140)}},redesSociais:function(){i3GEO.janela.cria("400px","400px",i3GEO.configura.locaplic+"/ferramentas/redessociais/index.php","","",$trad("u5c"),YAHOO.util.Dom.generateId(null,"redes"))}}; | |
363 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}YAHOO.namespace("i3GEO.janela");YAHOO.i3GEO.janela.manager=new YAHOO.widget.OverlayManager();YAHOO.namespace("janelaDoca.xp");YAHOO.janelaDoca.xp.manager=new YAHOO.widget.OverlayManager();YAHOO.i3GEO.janela.managerAguarde=new YAHOO.widget.OverlayManager();i3GEO.janela={ESTILOBD:"display:block;padding:5px 2px 5px 2px;",ESTILOAGUARDE:"normal",AGUARDEMODAL:false,ANTESCRIA:["i3GEO.janela.prepara()"],ANTESFECHA:[],TRANSICAOSUAVE:true,OPACIDADE:65,OPACIDADEAGUARDE:50,TIPS:[],ULTIMOZINDEX:0,prepara:function(){var iu=i3GEO.util;iu.escondePin();iu.escondeBox()},cria:function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza){if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}var i,wlargurA,ins,novoel,wdocaiframe,temp,fix,underlay,ifr,janela;if(navm&&!chro){this.TRANSICAOSUAVE=false}if(this.ANTESCRIA){for(i=0;i<this.ANTESCRIA.length;i++){eval(this.ANTESCRIA[i])}}if(!classe||classe==""){classe="hd"}if(!id||id===""){id="wdoca"}if(!modal||modal===""){modal=false}ifr=false;if(i3GEO.Interface&&i3GEO.Interface.ATUAL==="googleearth"){i3GEO.janela.TRANSICAOSUAVE=false;ifr=true}fix=false;if(nx===""||nx==="center"){fix=true}if(modal===true){underlay="none"}else{underlay="shadow"}temp=navm?0:2;wlargurA=parseInt(wlargura,10)+temp+"px";ins='<div id="'+id+'_cabecalho" class="'+classe+'" style="background-color:white;">';if(i3GEO.configura!==undefined){ins+="<img id='"+id+"_imagemCabecalho' style='z-index:2;position:absolute;left:3px;top:2px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />"}ins+="<span style='font-size:10px;'>"+texto+"</span>";if(funcaoMinimiza){ins+="<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>"}ins+='</div><div id="'+id+'_corpo" class="bd" style="'+this.ESTILOBD+'">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id=id;novoel.style.display="block";novoel.innerHTML=ins;if(this.TRANSICAOSUAVE){novoel.onmouseover=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",1)};novoel.onmouseout=function(){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.janela.OPACIDADE/100)};YAHOO.util.Dom.setStyle(novoel,"opacity",1)}document.body.appendChild(novoel);wdocaiframe=$i(id+"i");if(wdocaiframe){temp=wdocaiframe.style;temp.width=parseInt(wlargura,10)-12+"px";temp.height=waltura;temp.display="block";wdocaiframe.src=wsrc}else{if(waltura!=="auto"){$i(id+'_corpo').style.height=parseInt(waltura,10)+"px"}$i(id+'_corpo').style.width=parseInt(wlargura,10)+"px"}if(waltura==="auto"){janela=new YAHOO.widget.Panel(id,{iframe:ifr,modal:modal,width:wlargurA,underlay:"none",fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}else{janela=new YAHOO.widget.ResizePanel(id,{hideMode:'offsets',iframe:ifr,underlay:underlay,modal:modal,width:wlargurA,fixedcenter:fix,constraintoviewport:false,visible:true,monitorresize:false,dragOnly:true,keylisteners:null})}if(nx!==""&&nx!=="center"){janela.moveTo(nx,ny+50)}YAHOO.i3GEO.janela.manager.register(janela);if(this.TRANSICAOSUAVE){janela.cfg.setProperty("effect",[{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}])}janela.cfg.setProperty("zIndex",[10000]);janela.render();if(navm&&id!=="i3geo_janelaMensagens"&&i3GEO.Interface.ATUAL==="googleearth"){janela.moveTo(0,0)}if(ifr===true){janela.iframe.style.zIndex=0}temp=$i(id+"_corpo");if(temp){if(navm){temp.style.paddingRight="0px"}temp.style.width=parseInt(temp.style.width,10)-2+"px"}if(funcaoCabecalho){$i(id+'_cabecalho').onclick=funcaoCabecalho}if(funcaoMinimiza){$i(id+"_minimizaCabecalho").onclick=funcaoMinimiza}YAHOO.util.Event.addListener(janela.close,"click",i3GEO.janela.fecha,janela,{id:id},true);return([janela,$i(id+"_cabecalho"),$i(id+"_corpo")])},minimiza:function(id){var temp=$i(id+"_corpo"),n,i,m=YAHOO.i3GEO.janela.manager.find(id);if(temp){if(temp.style.display==="block"){temp.style.display="none";if(m){m.hideIframe}}else{temp.style.display="block";if(m){m.showIframe}}}temp=$i(id+"_resizehandle");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}temp=$i(id+"_c");if(temp){temp=temp.getElementsByTagName("div");n=temp.length;for(i=0;i<n;i++){if(temp[i].className==="underlay"||temp[i].className==="bd"){if(temp[i].style.display==="none"){temp[i].style.display="block"}else{temp[i].style.display="none"}}}}temp=$i(id+"_corpo");if(temp){if(temp.style.display==="none"){temp.style.display="block"}else{temp.style.display="none"}}},fecha:function(event,args){var i,id;i3GEO.util.escondePin();i3GEO.util.escondeBox();if(i3GEO.janela.ANTESFECHA){for(i=0;i<i3GEO.janela.ANTESFECHA.length;i++){eval(i3GEO.janela.ANTESFECHA[i])}}if(i3GEO.janela.id){id=i3GEO.janela.id}else{id=event.id}if(id==undefined){id=args.id}i3GEO.janela.destroi(id)},destroi:function(id){var janela=YAHOO.i3GEO.janela.manager.find(id);i3GEO.util.removeScriptTag(id+"_script");if(janela){YAHOO.i3GEO.janela.manager.remove(janela);janela.destroy()}},alteraTamanho:function(w,h,id){var i;if(arguments.length===3){i=$i(id)}else{i=$i("wdoca")}if(i){i.style.width=w+"px";i.style.height=h+"px"}},abreAguarde:function(id,texto){var pos,temp,janela;if(!id||id==undefined){return}janela=YAHOO.i3GEO.janela.managerAguarde.find(id);pos=[0,0];if($i(i3GEO.Interface.IDCORPO)){pos=YAHOO.util.Dom.getXY($i(i3GEO.Interface.IDCORPO))}else if($i("contemImg")){pos=YAHOO.util.Dom.getXY($i("contemImg"))}if(i3GEO.janela.AGUARDEMODAL==true){texto+="<br><span style='color:navy;cursor:pointer;font-size:9px;' onclick='javascript:if(i3GEO.janela.AGUARDEMODAL == true){i3GEO.janela.AGUARDEMODAL = false;}else{i3GEO.janela.AGUARDEMODAL = true;}'>bloquear/desbloquear</span>"}if(!janela){janela=new YAHOO.widget.Panel(id,{width:"240px",fixedcenter:false,underlay:"none",close:true,draggable:false,modal:i3GEO.janela.AGUARDEMODAL,monitorresize:false});janela.render(document.body);YAHOO.i3GEO.janela.managerAguarde.register(janela)}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="reduzida"){janela.setBody(texto);janela.body.style.padding="5px"}if(i3GEO.janela.ESTILOAGUARDE==="normal"||i3GEO.janela.ESTILOAGUARDE==="minima"){janela.setHeader("<span><img id=aguardeGifAberto src='"+i3GEO.configura.locaplic+"/imagens/aguarde.gif' /></span> <span style=font-size:8px >"+YAHOO.i3GEO.janela.managerAguarde.overlays.length+"</span>")}if(i3GEO.parametros.w>0){janela.moveTo(pos[0]+(i3GEO.parametros.w/2)-120,pos[1])}else{janela.moveTo(pos[0],pos[1])}janela.show();try{janela.header.style.height="20px"}catch(e){}temp=$i(id+"_c");if(temp){temp.style.backgroundColor=""}YAHOO.util.Dom.setStyle(temp,"opacity",i3GEO.janela.OPACIDADEAGUARDE/100)},fechaAguarde:function(id){if(id!=undefined){var janela=YAHOO.i3GEO.janela.managerAguarde.find(id);if(janela){YAHOO.i3GEO.janela.managerAguarde.remove(janela);janela.destroy()}}},ativaAlerta:function(){YAHOO.namespace("i3GEO.janela.dialogInfo");YAHOO.i3GEO.janela.dialogInfo=new YAHOO.widget.SimpleDialog("simpledialog1",{width:"300px",fixedcenter:true,visible:false,draggable:false,zIndex:100000,textAlign:"left",close:true,modal:true,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,buttons:[{text:"fecha",handler:function(){this.hide()},isDefault:true}],icon:YAHOO.widget.SimpleDialog.ICON_WARN,text:""});YAHOO.i3GEO.janela.manager.register(YAHOO.i3GEO.janela.dialogInfo);YAHOO.i3GEO.janela.dialogInfo.setHeader("Alerta");YAHOO.i3GEO.janela.dialogInfo.render(document.body);window.alert=function(texto){YAHOO.i3GEO.janela.dialogInfo.cfg.setProperty("text",texto);YAHOO.i3GEO.janela.dialogInfo.show()}},mensagemSimples:function(texto,cabecalho){var janela;if($i("mensagemSimples1")){janela=YAHOO.i3GEO.janela.manager.find("mensagemSimples1")}else{janela=new YAHOO.widget.SimpleDialog("mensagemSimples1",{width:"300px",fixedcenter:true,visible:true,draggable:true,zIndex:100000,textAlign:"left",close:true,modal:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},constraintoviewport:true,text:""});YAHOO.i3GEO.janela.manager.register(janela);janela.setHeader(cabecalho);janela.render(document.body)}janela.setHeader(cabecalho);janela.cfg.setProperty("text",texto);janela.show()},tip:function(cabecalho){var Nid,i,novoel,res;if(arguments.length===0){cabecalho="fixar"}Nid=YAHOO.util.Dom.generateId();i=$i("i3geo_rosa");if(i){i.style.display="none"}if($i(i3GEO.Interface.IDCORPO)){$i("img").title=""}novoel=document.createElement("div");novoel.id=Nid;novoel.style.position="absolute";novoel.style.zIndex=5000;novoel.style.textAlign="left";novoel.style.background="white";if(navm){novoel.style.filter="alpha(opacity=90)"}else{novoel.style.opacity=".9"}document.body.appendChild(novoel);i3GEO.janela.TIPS.push($i(Nid));res="<div id='"+Nid+"cabecatip' style='text-align:left;background-color:rgb(240,240,240)'>";res+="<span style='color:navy;cursor:pointer;text-align:left' onclick='javascript:$i(\""+Nid+"cabecatip\").innerHTML =\"\";' >"+cabecalho+"</span></div>";novoel.innerHTML="<table style='text-align:left'><tr><td style='text-align:left'>"+res+"</td></tr></table>";ist=novoel.style;ist.top=objposicaocursor.telay-9+"px";ist.left=objposicaocursor.telax-5+"px";ist.display="block";if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.janela.excluiTips('todos')")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.janela.excluiTips('todos')")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.janela.excluiTips('naofixos')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.janela.excluiTips('naofixos')")}return(Nid)},excluiTips:function(tipo){var ot,i;if(arguments.length===0){tipo="todos"}if(i3GEO.janela.TIPS.length>0){ot=i3GEO.janela.TIPS.length-1;if(ot>=0){do{if(tipo==='todos'){if(i3GEO.janela.TIPS[ot]){i=$i(i3GEO.janela.TIPS[ot].id);document.body.removeChild(i)}}if(tipo==='naofixos'){if($i(i3GEO.janela.TIPS[ot])){if($i(i3GEO.janela.TIPS[ot].id+"cabecatip").innerHTML!==""){document.body.removeChild($i(i3GEO.janela.TIPS[ot].id))}}}}while(ot--);if(tipo==="todos"){i3GEO.janela.TIPS=[]}}}},slider:function(funcao,inicial){var scaleFactor,bottomConstraint,topConstraint,janela,novoel,Event,slider="",bg,thumb;janela=i3GEO.janela.cria(230,200,"","","","Opacidade","opacidadeG");novoel=document.createElement("div");novoel.id="slider-bg";novoel.tabindex="-1";novoel.innerHTML='<div style="cursor:default;position:absolute;top:4px" id="slider-thumb"><img src="'+i3GEO.configura.locaplic+'/imagens/thumb-n.gif"></div>';janela[2].appendChild(novoel);Event=YAHOO.util.Event;bg="slider-bg";thumb="slider-thumb";novoel.style.position="relative";novoel.style.background='url('+i3GEO.configura.locaplic+'/imagens/bg-fader.gif) 5px 0 no-repeat';novoel.style.height="28px";novoel.style.width="228px";topConstraint=0;bottomConstraint=200;scaleFactor=1;Event.onDOMReady(function(){slider=YAHOO.widget.Slider.getHorizSlider(bg,thumb,topConstraint,bottomConstraint,20);slider.setValue(parseInt(inicial,10));slider.getRealValue=function(){return Math.round(this.getValue()*scaleFactor)};slider.subscribe("slideEnd",function(offsetFromStart){var actualValue=slider.getRealValue();eval(funcao+"("+actualValue+")")})});Event.on("putval","click",function(e){slider.setValue(100,false)})},comboCabecalhoTemas:function(idDiv,idCombo,ferramenta,tipo){var temp=$i(idDiv);if(temp){temp.innerHTML="";i3GEO.util.comboTemas(temp.id+"Sel",function(retorno){var container=$i(idDiv),c;container.innerHTML=retorno.dados;container.style.left="0px";container.styletextAlign="left";c=$i(idCombo);c.style.width="150px";c.style.border="solid #B4B4B4 1px";c.style.top="6px";c.style.left="2px";c.style.position="relative";c.style.fontSize="10px";c.style.color="#686868";if(i3GEO.temaAtivo!==""){c.value=i3GEO.temaAtivo}if(i3GEOF[ferramenta].tema){c.value=i3GEOF[ferramenta].tema}if(c.value===""){i3GEOF[ferramenta].tema="";$i("i3GEOF."+ferramenta+"_corpo").innerHTML=""}c.onchange=function(){var valor=$i(idCombo).value;if(valor!==""){i3GEO.mapa.ativaTema(valor);i3GEOF[ferramenta].tema=valor;$i("i3GEOF."+ferramenta+"_corpo").innerHTML="";eval("i3GEOF."+ferramenta+".inicia('i3GEOF."+ferramenta+"_corpo');")}}},temp.id,"",false,tipo)}temp="i3GEO.janela.comboCabecalhoTemas('"+idDiv+"','"+idCombo+"','"+ferramenta+"','"+tipo+"')";if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search(temp)<0){i3GEO.eventos.ATUALIZAARVORECAMADAS.push(temp)}}};try{YAHOO.widget.ResizePanel=function(el,userConfig){if(arguments.length>0){YAHOO.widget.ResizePanel.superclass.constructor.call(this,el,userConfig)}};YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE="yui-resizepanel";YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE="resizehandle";YAHOO.extend(YAHOO.widget.ResizePanel,YAHOO.widget.Panel,{init:function(el,userConfig){YAHOO.widget.ResizePanel.superclass.init.call(this,el);this.beforeInitEvent.fire(YAHOO.widget.ResizePanel);var Dom=YAHOO.util.Dom,oInnerElement=this.innerElement,oResizeHandle=document.createElement("DIV"),sResizeHandleId=this.id+"_resizehandle";oResizeHandle.id=sResizeHandleId;oResizeHandle.className=YAHOO.widget.ResizePanel.CSS_RESIZE_HANDLE;Dom.addClass(oInnerElement,YAHOO.widget.ResizePanel.CSS_PANEL_RESIZE);this.resizeHandle=oResizeHandle;function initResizeFunctionality(){var me=this,oHeader=this.header,oBody=this.body,oFooter=this.footer,nStartWidth,nStartHeight,aStartPos=0,nBodyBorderTopWidth,nBodyBorderBottomWidth,nBodyTopPadding,nBodyBottomPadding,nBodyOffset=0;oInnerElement.appendChild(oResizeHandle);this.ddResize=new YAHOO.util.DragDrop(sResizeHandleId,this.id);this.ddResize.setHandleElId(sResizeHandleId);this.ddResize.onMouseDown=function(e){nStartWidth=oInnerElement.offsetWidth;nStartHeight=oInnerElement.offsetHeight;if(YAHOO.env.ua.ie&&document.compatMode==="BackCompat"){nBodyOffset=0}else{nBodyBorderTopWidth=parseInt(Dom.getStyle(oBody,"borderTopWidth"),10);nBodyBorderBottomWidth=parseInt(Dom.getStyle(oBody,"borderBottomWidth"),10);nBodyTopPadding=parseInt(Dom.getStyle(oBody,"paddingTop"),10);nBodyBottomPadding=parseInt(Dom.getStyle(oBody,"paddingBottom"),10);nBodyOffset=nBodyBorderTopWidth+nBodyBorderBottomWidth+nBodyTopPadding+nBodyBottomPadding}me.cfg.setProperty("width",nStartWidth+"px");aStartPos=[Event.getPageX(e),Event.getPageY(e)]};this.ddResize.onDrag=function(e){var aNewPos=[Event.getPageX(e),Event.getPageY(e)],nOffsetX=aNewPos[0]-aStartPos[0],nOffsetY=aNewPos[1]-aStartPos[1],nNewWidth=Math.max(nStartWidth+nOffsetX,10),nNewHeight=Math.max(nStartHeight+nOffsetY,10),nBodyHeight=(nNewHeight-(oFooter.offsetHeight+oHeader.offsetHeight+nBodyOffset));me.cfg.setProperty("width",nNewWidth+"px");oBody.style.width=nNewWidth-4+"px";if(nBodyHeight<0){nBodyHeight=0}oBody.style.height=nBodyHeight+"px";if($i("wdocai")){$i("wdocai").style.height=nBodyHeight+"px";$i("wdocai").style.width=oBody.style.width+"px"}};this.ddResize.onMouseUp=this.ddResize.onDrag.call()}function onBeforeShow(){initResizeFunctionality.call(this);this.unsubscribe("beforeShow",onBeforeShow)}function onBeforeRender(){if(!this.footer){this.setFooter("")}if(this.cfg.getProperty("visible")){initResizeFunctionality.call(this)}else{this.subscribe("beforeShow",onBeforeShow)}this.unsubscribe("beforeRender",onBeforeRender)}this.subscribe("beforeRender",onBeforeRender);if(userConfig){this.cfg.applyConfig(userConfig,true)}this.initEvent.fire(YAHOO.widget.ResizePanel)},toString:function(){return"ResizePanel "+this.id}})}catch(e){} | |
364 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.guias={ATUAL:"temas",ALTURACORPOGUIAS:0,CONFIGURA:{"temas":{icone:"imagens/gisicons/show-layers.png",titulo:$trad("g4a"),id:"guia1",idconteudo:"guia1obj",click:""},"adiciona":{icone:"imagens/gisicons/show-catalog.png",titulo:$trad("g1a"),id:"guia2",idconteudo:"guia2obj",click:function(){var ondeArvore;i3GEO.guias.mostra("adiciona");if(!$i("arvoreAdicionaTema")){try{ondeArvore=objmapa.guiaMenu+"obj"}catch(e){ondeArvore="guia2obj"}}else{ondeArvore="arvoreAdicionaTema"}if(document.getElementById("outrasOpcoesAdiciona")){i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde="outrasOpcoesAdiciona";i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore=false}i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore)}},"legenda":{icone:"imagens/gisicons/show-legend.png",titulo:$trad("g3"),id:"guia4",idconteudo:"guia4obj",click:function(){i3GEO.guias.mostra("legenda");i3GEO.mapa.legendaHTML.cria("guia4obj")}},"mapas":{icone:"imagens/gisicons/show-links.png",titulo:"Links",id:"guia5",idconteudo:"guia5obj",click:function(){var pegaMapas=function(retorno){var ins,mapa,ig1lt,ig1,nome,lkd,link,temp;ins="<br><div id='banners' style='overflow:auto;text-align:left'>";mapa=retorno.data.mapas;ig1lt=mapa.length;ig1=0;if(ig1lt>0){do{temp=mapa[ig1];nome=temp.NOME;if(temp.PUBLICADO){if(temp.PUBLICADO.toLowerCase()==="nao"){nome="<s>"+nome+"</s>"}}lkd=temp.LINK;link=i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS;if(temp.EXTENSAO!==""){link+="&mapext="+temp.EXTENSAO}if(temp.OUTROS!==""){link+="&"+temp.OUTROS}if(lkd!==""){link=lkd}ins+="<div><a href='"+link+"'><img src='"+temp.IMAGEM+"'></a></div><br>";ins+="<div><p style=text-align:center >"+nome+"</p></div><br>";ig1++}while(ig1<ig1lt)}$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML=ins+"</div>"};$i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML="Aguarde...";i3GEO.guias.mostra("mapas");i3GEO.php.pegaMapas(pegaMapas)}}},ORDEM:"",TIPO:"guia",IDGUIAS:"guiasYUI",cria:function(onde){var nguiasreal=0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp,CONFIGURA=i3GEO.guias.CONFIGURA,guias=i3GEO.util.listaChaves(CONFIGURA),nguias=guias.length;if(i3GEO.guias.TIPO==="movel"){i3GEO.guias.IDGUIAS="i3GEOguiaMovelConteudo";for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id);i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo);if(i3GEO.guias.CONFIGURA[guias[ng]].icone!==undefined){i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone)}else{i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png")}i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo);i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng])}}return}try{for(g=0;g<12;g++){tituloguia="";if($i("guia"+g)){tituloguia=$i("guia"+g).innerHTML;re=new RegExp(" ","g");tituloguia=tituloguia.replace(re,'');for(ng=0;ng<nguias;ng++){if(CONFIGURA[guias[ng]].id==="guia"+g){tituloguia=""}}if(tituloguia!==""){i3GEO.guias.CONFIGURA["guia"+g]=[];i3GEO.guias.CONFIGURA["guia"+g].titulo=tituloguia;i3GEO.guias.CONFIGURA["guia"+g].id="guia"+g;i3GEO.guias.CONFIGURA["guia"+g].idconteudo="guia"+g+"obj";if($i('guia'+g).onclick){i3GEO.guias.CONFIGURA["guia"+g].click=$i("guia"+g).onclick}}}}if(i3GEO.guias.ORDEM===""){guias=i3GEO.util.listaChaves(CONFIGURA)}else{guias=i3GEO.guias.ORDEM}nguias=guias.length;if(arguments.length===0){for(ng=0;ng<nguias;ng++){i=$i(i3GEO.guias.CONFIGURA[guias[ng]].id);if(i){onde=i.parentNode}}}else{onde=$i(onde)}if(!onde){return}onde.id=i3GEO.guias.IDGUIAS;onde.className="yui-navset";if(i3GEO.guias.TIPO==="guia"||i3GEO.guias.TIPO==="tablet"){ins='<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">';for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ins+='<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>'}}}ins+="</ul>";onde.innerHTML=ins}if(i3GEO.guias.TIPO==="sanfona"){ins='<dl id=sanfona'+onde.id+' class="accordion" >';if(i3GEO.guias.ORDEM===""){for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){nguiasreal++}}}else{nguiasreal=i3GEO.guias.ORDEM.length}if(navn){altura=i3GEO.parametros.h-(nguiasreal*25)-1}else{altura=i3GEO.parametros.h-(nguiasreal*23)+1}for(ng=0;ng<nguias;ng++){if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){id=i3GEO.guias.CONFIGURA[guias[ng]].idconteudo;temp=$i(id);if(temp){guiaconteudo=temp.innerHTML;temp.innerHTML="";temp.style.display="none";temp.id="";ins+='<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+'<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>'+'<dd clas=close >'+'<div class=bd >'+'<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'}}}ins+="</dl>";onde.innerHTML=ins;onde.style.height=altura+"px";YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura);i3GEO.guias.ALTURACORPOGUIAS=altura}for(g=0;g<nguias;g++){guia=i3GEO.guias.CONFIGURA[guias[g]];id=guia.id;guiaconteudo=$i(id);if(guiaconteudo){if(guia.click===""||guia.click===undefined){eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}')}else{guiaconteudo.onclick=guia.click}YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(id),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(id),YAHOO.util.Event.preventDefault);guiaconteudo.onmouseover=function(){};guiaconteudo.onmouseout=function(){};temp=$i(guia.idconteudo);if(temp){temp.style.overflow="auto";if(i3GEO.guias.TIPO==="guia"){if(i3GEO.guias.ALTURACORPOGUIAS===0){temp.style.height=i3GEO.parametros.h+"px"}else{temp.style.height=i3GEO.guias.ALTURACORPOGUIAS+"px"}}else{temp.style.height=onde.style.height}}}}}catch(e){}if(i3GEO.guias.TIPO!=="tablet"){i3GEO.guias.mostra(i3GEO.guias.ATUAL);i3GEO.guias.ativa(i3GEO.guias.ATUAL)}else{i3GEO.guias.escondeGuias()}},ajustaAltura:function(){var guia,guias,nguias,temp,temps,n,i,g,altura=0;if(i3GEO.guias.ALTURACORPOGUIAS!=0){altura=i3GEO.guias.ALTURACORPOGUIAS}guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){guia=$i(this.CONFIGURA[guias[g]].idconteudo);if(guia){guia.style.overflow="auto";if(this.TIPO==="guia"){guia.style.height=altura+"px"}if(this.TIPO==="sanfona"){guia.style.height=altura+"px";temp=$i("guiasYUI");if(temp){temp.style.height=altura+"px";temps=temp.getElementsByTagName("dd");n=temps.length;for(i=0;i<n;i++){if(temps[i].style.visibility=="visible"){temps[i].style.height=altura+"px"}}}YAHOO.lutsr.accordion.properties.altura=altura}}}},escondeGuias:function(){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){temp=$i(this.CONFIGURA[guias[g]].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"&&temp.style.display==="block"){temp.style.overflow="hidden";attributes={height:{to:0},id:this.CONFIGURA[guias[g]].idconteudo};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){var temp=$i(anim.attributes.id);temp.style.overflow="auto";temp.style.display="none";if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].show()}});anim.animate()}else{temp.style.display="none"}}if($i(this.CONFIGURA[guias[g]].id)&&i3GEO.guias.TIPO!=="movel"){$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}},mostra:function(guia){var guias,nguias,g,temp,attributes,anim;guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display==="block"&&i3GEO.guias.TIPO==="tablet"){i3GEO.guias.escondeGuias();return}if(i3GEO.guias.TIPO!=="movel"){for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none"}if($i(i3GEO.guias.CONFIGURA[guias[g]].id)){$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent"}}}if(i3GEO.guias.CONFIGURA.toString().search(guia)<0){for(g=0;g<nguias;g++){if(i3GEO.guias.CONFIGURA[guias[g]].id===guia){guia=guias[g]}}}if(i3GEO.guias.CONFIGURA[guia]){temp=$i(i3GEO.guias.CONFIGURA[guia].idconteudo);if(temp){if(i3GEO.guias.TIPO==="tablet"){if(i3GEO.barraDeBotoes.BARRAS[0]){i3GEO.barraDeBotoes.BARRAS[0].hide()}temp.style.left=(i3GEO.parametros.w/2)-150+"px";temp.style.height=0;temp.style.display="block";temp.style.zIndex=9000;temp.style.overflow="hidden";attributes={height:{to:i3GEO.parametros.h-10}};anim=new YAHOO.util.Anim(temp,attributes,1,YAHOO.util.Easing.easeNone);anim.onComplete.subscribe(function(){temp.style.overflow="auto";temp.style.display="block"});if(DetectaMobile("DetectAndroid")===true){temp.style.height="";temp.style.overflow="auto"}else{anim.animate()}}else{temp.style.display="block"}if(i3GEO.guias.TIPO!=="movel"){$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white"}i3GEO.guias.ATUAL=guia}}},ativa:function(guia){try{i3GEO.guias.ATUAL=guia;if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click!==""){i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call()}}catch(e){}},libera:function(){if(!$i("conteudojanelaguias")){var i,w,pos,a,l,temp;$i(i3GEO.Interface.IDCORPO).style.left="0px";if($i(this.IDGUIAS)){$i(this.IDGUIAS).style.display="none"}i=$i("contemFerramentas");w=parseInt($i("contemFerramentas").style.width,10);$i("contemFerramentas").style.width="0px";pos="px";a=i3GEO.parametros.h;l=i3GEO.parametros.w+w;i3GEO.parametros.h=a;i3GEO.parametros.w=l;i=$i(i3GEO.Interface.IDCORPO);if(i){i.style.width=l+pos;i.style.height=a+pos}i=$i(i3GEO.Interface.IDMAPA);if(i){i.style.width=l+pos;i.style.height=a+pos;i.style.clip='rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'}i=$i("mst");if(i){i.style.width=l+1+pos}i3GEO.mapa.ajustaPosicao();temp=function(retorno){var novoel,temp,i,g,guias,nguias,janela;novoel=document.createElement("div");novoel.id="janelaguias";novoel.style.display="block";novoel.innerHTML='<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>';temp=$i("i3geo")?$i("i3geo").appendChild(novoel):document.body.appendChild(novoel);janela=new YAHOO.widget.Panel("janelaguias",{width:"270px",fixedcenter:true,constraintoviewport:false,underlay:"none",close:false,visible:true,draggable:true,modal:false,iframe:true});YAHOO.i3GEO.janela.manager.register(janela);janela.render();janela.show();janela.cfg.setProperty("y",0);i=$i(i3GEO.guias.IDGUIAS);$i("conteudojanelaguias_corpo").appendChild(i);i.style.borderLeft="1px solid black";i.style.borderRight="1px solid black";guias=i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA);nguias=guias.length;for(g=0;g<nguias;g++){if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){$i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo));temp=$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style;temp.background="white";temp.border="1px solid black";temp.borderTop="0px solid black";temp.width="270px";temp.left="-1px";temp.height=i3GEO.parametros.h-90+"px"}}i3GEO.atualiza("");i.style.display="block";i.style.left="-1px";i.style.width="270px"};i3GEO.php.mudatamanho(temp,a,l)}else{janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop()}},mostraGuiaFerramenta:function(guia,namespace){var g,Dom=YAHOO.util.Dom;if(!namespace){namespace="guia"}for(g=0;g<12;g++){Dom.setStyle(namespace+g+"obj","display","none")}Dom.setStyle(guia+"obj","display","block")},guiaMovel:{ABERTA:false,config:{larguraPuxador:50,alturaPuxador:319,alturaGuiaMovel:0,larguraGuiaMovel:320,topGuiaMovel:0,guias:{icones:[],ids:[],idsconteudos:[],titulos:[],chaves:[]}},left:0,inicia:function(){var posMapa=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)),centroY=posMapa[1]+(i3GEO.parametros.h/2),config=i3GEO.guias.guiaMovel.config,temp;if(i3GEO.guias.ALTURACORPOGUIAS===0&&config.alturaGuiaMovel===0){i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.parametros.h}else{i3GEO.guias.guiaMovel.config.alturaGuiaMovel=i3GEO.guias.ALTURACORPOGUIAS}config=i3GEO.guias.guiaMovel.config;temp=$i("i3GEOguiaMovel").style;temp.left=(posMapa[0]+i3GEO.parametros.w-config.larguraPuxador)+"px";i3GEO.guias.guiaMovel.left=parseInt(temp.left,10)+"px";if(config.topGuiaMovel===0){temp.top=(centroY-((config.alturaGuiaMovel-42)/2))+"px"}else{temp.top=config.topGuiaMovel+"px"}temp.width=config.larguraPuxador+"px";temp=$i("i3GEOguiaMovelMolde").style;temp.top="0px";temp.left=config.larguraPuxador+"px";temp.width="0px";temp.height=config.alturaGuiaMovel+"px";temp.backgroundColor="white";temp=$i("i3GEOguiaMovelPuxador").style;temp.top=((config.alturaGuiaMovel-config.alturaPuxador)/2)+"px";temp.left="0px";temp.width=config.larguraPuxador+"px";temp.height=config.alturaPuxador+"px";temp=$i("i3GEOguiaMovelIcones").style;temp.left="1px";temp.top="1px";temp.width=(config.larguraGuiaMovel-1)+"px";temp.height="35px";if(navm){temp.height="37px"}temp.zIndex=5;temp.paddingTop="2px";temp=$i("i3GEOguiaMovelConteudo").style;temp.left="1px";temp.top="38px";temp.height=(config.alturaGuiaMovel-39)+"px";if(navm){temp.width=(config.larguraGuiaMovel-1)+"px"}else{temp.width=(config.larguraGuiaMovel-5)+"px"}temp.paddingLeft="4px";YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones","opacity",0.90);YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.10);$i("i3GEOguiaMovelMolde").onmouseover=function(){if($i("i3GEOguiaMovelConteudo").style.display==="block"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}if($i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};$i("i3GEOguiaMovelMolde").onmouseout=function(){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.20);if($i("i3GEOguiaMovelIcones").innerHTML===""){i3GEO.guias.guiaMovel.mostraIcones()}};i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL);if(i3GEO.guias.guiaMovel.ABERTA===true){i3GEO.guias.guiaMovel.abreFecha()}},mostraIcones:function(){if($i("i3GEOguiaMovelIcones").innerHTML!=""){return}var n=i3GEO.guias.guiaMovel.config.guias.icones.length,i,temp=i3GEO.guias.guiaMovel.config.guias,ins="";if(i3GEO.guias.ORDEM!==""){temp.chaves=i3GEO.guias.ORDEM}for(i=0;i<n;i++){if(temp.chaves[i]){ins+="<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;;' /></button>"}}$i("i3GEOguiaMovelIcones").innerHTML=ins;i3GEO.guias.guiaMovel.desativaIcones();if($i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id)){$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.backgroundColor="#cedff2";$i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id).parentNode.style.boxShadow="none"}},desativaIcones:function(){var ims=$i("i3GEOguiaMovelIcones").getElementsByTagName("button"),n=ims.length,i;for(i=0;i<n;i++){ims[i].style.backgroundColor="white";ims[i].style.boxShadow=""}},ativa:function(chave){if(i3GEO.guias.CONFIGURA[chave].click){i3GEO.guias.CONFIGURA[chave].click.call()}i3GEO.guias.escondeGuias();i3GEO.guias.mostra(chave);i3GEO.guias.ATUAL=chave;i3GEO.guias.guiaMovel.desativaIcones();if($i(i3GEO.guias.CONFIGURA[chave].id)){$i(i3GEO.guias.CONFIGURA[chave].id).parentNode.style.backgroundColor="#cedff2";$i(i3GEO.guias.CONFIGURA[chave].id).parentNode.style.boxShadow="none"}},reposiciona:function(){var temp=$i("i3GEOguiaMovel").style.top;i3GEO.guias.guiaMovel.config.alturaGuiaMovel=0;i3GEO.guias.ALTURACORPOGUIAS=0;$i("i3GEOguiaMovelIcones").style.display="none";$i("i3GEOguiaMovelConteudo").style.display="none";$i("i3GEOguiaMovelMolde").style.display="none";i3GEO.guias.escondeGuias();i3GEO.guias.guiaMovel.inicia();$i("i3GEOguiaMovel").style.top=temp},abreFecha:function(){var molde=$i("i3GEOguiaMovelMolde"),guia=$i("i3GEOguiaMovel"),attributes,anim,anim1;if(molde.style.display==="block"){$i("i3GEOguiaMovelIcones").style.display="none";$i("i3GEOguiaMovelConteudo").style.display="none";attributes={left:{to:parseInt(i3GEO.guias.guiaMovel.left,10)},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:0},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim.animate();anim1.animate();anim1.onComplete.subscribe(function(){molde.style.display="none"})}else{molde.style.display="block";attributes={left:{to:parseInt(guia.style.left,10)-i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovel"};anim=new YAHOO.util.Anim(guia,attributes,1,YAHOO.util.Easing.easeNone);attributes={width:{to:i3GEO.guias.guiaMovel.config.larguraGuiaMovel},id:"i3GEOguiaMovelMolde"};anim1=new YAHOO.util.Anim(molde,attributes,1,YAHOO.util.Easing.easeNone);anim.duration=0.5;anim1.duration=0.5;anim1.onComplete.subscribe(function(){$i("i3GEOguiaMovelIcones").style.display="block";$i("i3GEOguiaMovelConteudo").style.display="block";i3GEO.guias.guiaMovel.mostraIcones();YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)});anim.animate();anim1.animate()}}}}; | |
365 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeCamadas={BARRAPROGRESSO:true,MOSTRALISTAKML:false,FILTRO:"",VERIFICAABRANGENCIATEMAS:true,finaliza:"",EXPANDESOLEGENDA:false,PERMITEEXPANDIRTEMAS:true,ARRASTARORDEM:true,ARRASTARLIXEIRA:true,ALTERAOPACIDADE:true,ANIMAMAPA:true,LIGARDESLIGARTODOS:true,FILTRAR:true,ABRELEGENDA:true,EXPANDIDA:false,LEGENDAEXPANDIDA:false,OPCOESICONES:true,OPCOESTEMAS:true,OPCOESLEGENDA:true,AGUARDALEGENDA:false,ICONETEMA:true,FUNCOES:{farolescala:true,excluir:true,sobe:true,desce:true,fonte:true,zoomtema:true,compartilhar:true,opacidade:true,mudanome:true,procurar:true,toponimia:true,etiquetas:true,filtrar:true,tabela:true,grafico:true,editorlegenda:true,destacar:true,cortina:true,sql:true,comentar:true,temporizador:true,wms:true,tme:true},CAMADAS:"",CAMADASINICIAIS:"",ARVORE:null,IDHTML:"listaTemas",SID:null,LOCAPLIC:null,ATIVATEMA:"",cria:function(onde,temas,g_sid,g_locaplic,funcaoTema){if(!YAHOO.lang.isUndefined(funcaoTema)){i3GEO.arvoreDeCamadas.ATIVATEMA=funcaoTema}var novoel;if(i3GEO.arvoreDeCamadas.BARRAPROGRESSO===true&&i3GEO.Interface.ATUAL==="openlayers"){if(!$i("i3GEOprogressoDiv")){novoel=document.createElement("div");novoel.id="i3GEOprogressoDiv";novoel.style.position="absolute";novoel.style.top="0px";novoel.style.zIndex="50000";novoel.style.left=(i3GEO.parametros.w/2)-75+"px";$i(i3GEO.Interface.IDMAPA).appendChild(novoel);i3GEO.arvoreDeCamadas.progressBar=new YAHOO.widget.ProgressBar({height:5,width:150,minValue:1,maxValue:0,value:0}).render("i3GEOprogressoDiv")}}i3GEO.arvoreDeCamadas.SID=typeof(g_sid)!=='undefined'?g_sid:i3GEO.configura.sid;i3GEO.arvoreDeCamadas.LOCAPLIC=typeof(g_locaplic)!=='undefined'?g_locaplic:i3GEO.configura.locaplic;if(onde!==""){i3GEO.arvoreDeCamadas.IDHTML=onde}if(i3GEO.arvoreDeCamadas.IDHTML===""){return}if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}if(YAHOO.lang.isUndefined(temas)||temas===""){temas=i3GEO.arvoreDeCamadas.CAMADAS}i3GEO.arvoreDeCamadas.atualiza(temas);if(i3GEO.arvoreDeCamadas.finaliza!==""){eval(i3GEO.arvoreDeCamadas.finaliza)}},atualiza:function(temas,forca){if(arguments.length===0){temas=i3GEO.arvoreDeCamadas.CAMADAS;i3GEO.arvoreDeCamadas.CAMADAS="";forca=false}var estilo,temp,newVal,root,tempNode,titulo,d,c,ltema,temaNode,i,j,n,nk,k,noGrupo,incluidos=[],grupoNode="",grupoLayers=i3GEO.configura.grupoLayers,textoTema="";temp=$i(i3GEO.arvoreDeCamadas.IDHTML);if(temp){if(forca===true){temp.innerHTML=""}if(temp.innerHTML!==""){if(i3GEO.arvoreDeCamadas.comparaTemas(temas,i3GEO.arvoreDeCamadas.CAMADAS)){i3GEO.arvoreDeCamadas.CAMADAS=temas;return}}}else{return}i3GEO.util.defineValor(i3GEO.arvoreDeCamadas.IDHTML,"innerHTML","");i3GEO.arvoreDeCamadas.CAMADAS=temas;if(i3GEO.arvoreDeCamadas.CAMADASINICIAIS===""){i3GEO.arvoreDeCamadas.CAMADASINICIAIS=temas}(function(){function changeIconMode(){var currentIconMode="";newVal=parseInt(this.value,10);if(newVal!==currentIconMode){currentIconMode=newVal}buildTree()}function buildTree(){i3GEO.arvoreDeCamadas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeCamadas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeCamadas.ARVORE.getRoot();titulo="<table><tr><td><b>"+$trad("a7")+"</b></td><td>";titulo+="</td></tr></table>";tempNode=new YAHOO.widget.HTMLNode({expanded:true,html:titulo,hasIcon:true,enableHighlight:false},root);new YAHOO.widget.HTMLNode({expanded:false,html:i3GEO.arvoreDeCamadas.montaOpcoesArvore(),hasIcon:false,enableHighlight:false},tempNode);estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:vertical-align:top;padding-top:4px;";if(grupoLayers===""){c=temas.length;for(i=0,j=c;i<j;i+=1){ltema=temas[i];try{if((ltema.escondido).toLowerCase()!=="sim"){textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){temaNode=new YAHOO.widget.HTMLNode({expanded:this.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema",enableHighlight:false},tempNode);if(this.PERMITEEXPANDIRTEMAS===true){if(this.EXPANDESOLEGENDA===false){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1)}else{if(ltema.classe!=="NAO"){temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}}}}YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}catch(e){}}}else{nk=temas.length;c=grupoLayers.length;for(i=0;i<c;i+=1){noGrupo="";if(grupoLayers[i].icone&&grupoLayers[i].icone===true){noGrupo+="<p style="+estilo+" ><input class=inputsb style=cursor:pointer onclick='i3GEO.arvoreDeCamadas.ligaDesligaTemas(\""+i3GEO.configura.grupoLayers[i].layers+"\",this.checked)' type=checkbox title='Ligar/desligar temas do grupo' /> "}noGrupo+="<span style="+estilo+";vertical-align:top ><b>"+grupoLayers[i].nome+"</b></span></p>";d=this.EXPANDIDA;if(grupoLayers[i].expandido&&grupoLayers[i].expandido===true){d=true}n=grupoLayers[i].layers.length;for(j=0;j<n;j+=1){for(k=0;k<nk;k+=1){ltema=temas[k];if(ltema.name===grupoLayers[i].layers[j]&<ema.escondido==="nao"){if(noGrupo!==""){grupoNode=new YAHOO.widget.HTMLNode({enableHighlight:false,html:noGrupo,expanded:d},tempNode);noGrupo=""}textoTema=i3GEO.arvoreDeCamadas.montaTextoTema(ltema);if(textoTema!==""){d={enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.EXPANDIDA,html:textoTema,id:ltema.name,tipo:"tema"};if(grupoLayers[i].dinamico&&grupoLayers[i].dinamico===true){temaNode=new YAHOO.widget.HTMLNode(d,grupoNode)}else{temaNode=new YAHOO.widget.HTMLNode(d,tempNode)}temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault);incluidos.push(ltema.name)}}}}}grupoNode=new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,html:"<b>Outros</b>"},tempNode);c=incluidos.length;for(k=0;k<nk;k+=1){ltema=temas[k];n=false;for(j=0;j<c;j+=1){if(incluidos[j]===ltema.name||ltema.escondido.toLowerCase()==="sim"){n=true}}if(n===false){temaNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"},grupoNode,i3GEO.arvoreDeCamadas.EXPANDIDA,true);temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes,1);YAHOO.util.Event.addListener($i("arrastar_"+ltema),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addFocusListener($i("arrastar_"+ltema),YAHOO.util.Event.preventDefault)}}}document.getElementById(i3GEO.arvoreDeCamadas.IDHTML).style.textAlign="left";i3GEO.arvoreDeCamadas.ARVORE.draw();if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true||i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){i3GEO.arvoreDeCamadas.ativaDragDrop()}i3GEO.mapa.ativaTema(i3GEO.temaAtivo);i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas();if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===true&&i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.arvoreDeCamadas.verificaAbrangenciaTemas()")}i3GEO.eventos.executaEventos(i3GEO.eventos.ATUALIZAARVORECAMADAS)},montaOpcoesArvore:function(){var ins="",imb=i3GEO.util.$im("branco.gif"),estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(this.ARRASTARLIXEIRA===true){ins+="<img "+estilo("i3geo_lixeira")+" onclick='i3GEO.arvoreDeCamadas.dialogo.excluir();' id='i3geo_lixeira' title='"+$trad("t2")+"' />"}if(this.FILTRAR===true){ins+="<img "+estilo("i3geo_filtro")+" onclick='i3GEO.arvoreDeCamadas.dialogo.filtro();' id='i3geo_filtro' title='"+$trad("t2a")+"' />"}if(this.ABRELEGENDA===true){ins+="<img "+estilo("soltaleg2")+" onclick='i3GEO.mapa.legendaHTML.libera();' id='soltaleg2' title='"+$trad("t2b")+"' />"}if(this.ALTERAOPACIDADE===true){ins+="<img "+estilo("opacidadeMapa")+" onclick='i3GEO.mapa.dialogo.opacidade();' id='opacidadeMapa' title='"+$trad("t20")+"' />"}if(this.ANIMAMAPA===true&&(i3GEO.Interface.ATUAL==="openlayers"||i3GEO.Interface.ATUAL==="googlemaps")){ins+="<img "+estilo("animaMapa")+" onclick='i3GEO.mapa.dialogo.animacao();' id='animaMapa' title='"+$trad("p21")+"' />"}if(this.LIGARDESLIGARTODOS===true){ins+=" <img "+estilo("olhoAberto")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"ligartodos\");' id='olhoAberto' title='"+$trad("t3a")+"' />";ins+=" <img "+estilo("olhoFechado")+" onclick='i3GEO.arvoreDeCamadas.aplicaTemas(\"desligartodos\");' id='olhoFechado' title='"+$trad("t3b")+"' />"}return ins},ligaDesligaTemas:function(lista,status){var c,n,i,aplica=false;lista=lista.split(",");n=lista.length;for(i=0;i<n;i+=1){c=i3GEO.arvoreDeCamadas.capturaCheckBox(lista[i]);if(c.checked!==status){aplica=true}c.checked=status;if(aplica===true){c.onclick.call()}}},ativaDragDrop:function(){var Dom=YAHOO.util.Dom,Event=YAHOO.util.Event;YAHOO.example.DDList="";YAHOO.example.DDApp={init:function(){var i,ltema;if($i("i3geo_lixeira")&&i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){new YAHOO.util.DDTarget("i3geo_lixeira")}i=i3GEO.arvoreDeCamadas.CAMADAS.length-1;if(i3GEO.arvoreDeCamadas.CAMADAS.length-1>=0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if($i("arrastar_"+ltema.name)){new YAHOO.example.DDList("arrastar_"+ltema.name)}}while(i--)}}};YAHOO.example.DDList=function(id,sGroup,config){YAHOO.example.DDList.superclass.constructor.call(this,id,sGroup,config);this.logger=this.logger||YAHOO;YAHOO.util.Dom.setStyle(this.getDragEl(),"opacity",0.67);this.goingUp=false;this.lastY=0};YAHOO.extend(YAHOO.example.DDList,YAHOO.util.DDProxy,{startDrag:function(x,y){var dragEl,clickEl,Dom=YAHOO.util.Dom;this.logger.log(this.id+" startDrag");dragEl=this.getDragEl();clickEl=this.getEl();Dom.setStyle(clickEl,"visibility","hidden");dragEl.innerHTML=clickEl.innerHTML;Dom.setStyle(dragEl,"color",Dom.getStyle(clickEl,"color"));Dom.setStyle(dragEl,"backgroundColor",Dom.getStyle(clickEl,"backgroundColor"));Dom.setStyle(dragEl,"border","4px solid gray");Dom.setStyle(dragEl,"z-index","5000")},endDrag:function(e){var srcEl,proxy,a,thisid,proxyid;srcEl=this.getEl();proxy=this.getDragEl();Dom.setStyle(proxy,"visibility","");a=new YAHOO.util.Motion(proxy,{points:{to:Dom.getXY(srcEl)}},0.2,YAHOO.util.Easing.easeOut);proxyid=proxy.id;thisid=this.id;a.onComplete.subscribe(function(){var Dom=YAHOO.util.Dom;Dom.setStyle(proxyid,"visibility","hidden");Dom.setStyle(thisid,"visibility","")});a.animate();YAHOO.util.Dom.setStyle('i3geo_lixeira','border','0px solid blue')},onDragDrop:function(e,id){var pt,region,tema,destEl,els,lista,temp,DDM=YAHOO.util.DragDropMgr,Dom=YAHOO.util.Dom;if(DDM.interactionInfo.drop.length===1){pt=DDM.interactionInfo.point;region=DDM.interactionInfo.sourceRegion;if(!region.intersect(pt)){DDM.refreshCache();if(DDM.getDDById(id).id==="i3geo_lixeira"){if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA===true){(new YAHOO.util.Anim("i3geo_lixeira",{opacity:{from:0,to:1}},3,YAHOO.util.Easing.easeOutStrong)).animate();tema=(this.getEl()).id.split("arrastar_")[1];i3GEO.tema.exclui(tema)}}else{if(i3GEO.arvoreDeCamadas.ARRASTARORDEM===true){destEl=Dom.get(id);destEl.appendChild(this.getEl());els=i3GEO.arvoreDeCamadas.listaLigadosDesligados();lista=els[2].join(",");temp=function(retorno){i3GEO.atualiza(retorno);if(i3GEO.Interface.ATUAL==="openlayers"){i3GEO.Interface.openlayers.ordenaLayers()}};i3GEO.php.reordenatemas(temp,lista)}}}}},onDrag:function(e){var y;y=Event.getPageY(e);if(y<this.lastY){this.goingUp=true}else if(y>this.lastY){this.goingUp=false}this.lastY=y;if(i3GEO.guias.TIPO==="movel"){YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde","opacity",0.9)}},onDragOver:function(e,id){var destEl;destEl=YAHOO.util.Dom.get(id);if($i("i3geo_lixeira")&&id==="i3geo_lixeira"){$i("i3geo_lixeira").style.border="1px solid red"}else{destEl.style.textDecoration="underline"}},onDragOut:function(e,id){$i(id).style.textDecoration="none"}});Event.onDOMReady(YAHOO.example.DDApp.init,YAHOO.example.DDApp,true)},montaOpcoes:function(node){var opcoesNode,idtema,ltema,farol,mfarol,tnome="",imb=i3GEO.util.$im("branco.gif"),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;idtema=node.data.id;ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema);if(i3GEO.arvoreDeCamadas.OPCOESICONES===true){if(funcoes.farolescala===true){farol="maisamarelo.png";mfarol="";if(ltema.escala*1<i3GEO.parametros.mapscale*1){farol="maisverde.png";mfarol=$trad("t9")}if(ltema.escala*1>i3GEO.parametros.mapscale*1){farol="maisvermelho.png";mfarol=$trad("t10")}if(ltema.escala===0){farol="maisamarelo.png";mfarol=$trad("t11")}tnome+=" <img id='farol"+ltema.name+"' src='"+i3GEO.util.$im(farol)+"' title='"+mfarol+"' />"}if(funcoes.excluir===true){tnome+=" <img id='idx"+ltema.name+"' class='x' src='"+imb+"' title='"+$trad("t12")+"' onclick='i3GEO.tema.exclui(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t12a")+"','exclui')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.sobe===true){tnome+=" <img class='sobe' src='"+imb+"' title='"+$trad("t13")+"' onclick='i3GEO.tema.sobe(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t14")+"','sobe')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.desce===true){tnome+=" <img class='desce' src='"+imb+"' title='"+$trad("t15")+"' onclick='i3GEO.tema.desce(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t16")+"','desce')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(funcoes.fonte===true){tnome+=" <img class='fonte' src='"+imb+"' title='"+$trad("a9")+"' onclick='i3GEO.tema.fonte(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("a9")+"','fonte')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if((ltema.zoomtema.toLowerCase()==="sim")&&(funcoes.zoomtema===true)){tnome+=" <img class='extent' src='"+imb+"' title='"+$trad("t17")+"' onclick='i3GEO.tema.zoom(\""+ltema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t18")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node);if(funcoes.compartilhar===true&<ema.permitecomentario.toLowerCase()!=="nao"){temp=i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+ltema.name+"&temasa="+ltema.name;tnome=i3GEO.social.compartilhar("",temp,temp,"semtotal");iconesNode=new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)}}if(i3GEO.arvoreDeCamadas.OPCOESTEMAS===true){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("t18a"),idopcoes:ltema.name,identifica:ltema.identifica,enableHighlight:false,expanded:false},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraOpcoes,1)}if(i3GEO.arvoreDeCamadas.OPCOESLEGENDA===true&<ema.classe!=="NAO"){opcoesNode=new YAHOO.widget.HTMLNode({html:$trad("p3"),idlegenda:ltema.name,enableHighlight:false,expanded:i3GEO.arvoreDeCamadas.LEGENDAEXPANDIDA},node);opcoesNode.setDynamicLoad(i3GEO.arvoreDeCamadas.mostraLegenda,1)}node.loadComplete()},mostraOpcoes:function(node){var tnome,idtema=node.data.idopcoes,ltema=i3GEO.arvoreDeCamadas.pegaTema(idtema),funcoes=i3GEO.arvoreDeCamadas.FUNCOES;if(funcoes.opacidade===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+" <a class='tic' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t19")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t20")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=42' > </a>"+$inputText("","","tr"+ltema.name,"","3",ltema.transparency)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudatransp(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.temporizador===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+" <a class='tic' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' href='#' /a>"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t47")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+$trad("t48")+"</span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=101' > </a>"+$inputText("","","temporizador"+ltema.name,"","3",ltema.temporizador)+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.temporizador(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if(funcoes.mudanome===true){if(navm){tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","8","")+" <a class='tic' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' href='#' />"}else{tnome="<span onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t21a")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"+$trad("t21")+" </span> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=5&idajuda=43' > </a>"+$inputText("","","nn"+ltema.name,"","10","")+"<img class='tic' style='position:relative;top:3px;' onclick='i3GEO.tema.mudanome(\""+ltema.name+"\")' src='"+i3GEO.util.$im("branco.gif")+"' />"}new YAHOO.widget.HTMLNode({expanded:false,enableHighlight:false,isLeaf:true,html:tnome},node)}if((ltema.type<3)&&(ltema.connectiontype!==7)){if(funcoes.procurar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t22"),$trad("t23"),'i3GEO.tema.dialogo.procuraratrib(\"'+ltema.name+'\")',node)}if(funcoes.toponimia===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t24"),$trad("t25"),'i3GEO.tema.dialogo.toponimia(\"'+ltema.name+'\")',node)}if(funcoes.etiquetas===true&&(ltema.identifica.toLowerCase()==="sim"||ltema.identifica==="")){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t26"),$trad("t27"),'i3GEO.tema.dialogo.etiquetas(\"'+ltema.name+'\")',node)}if(funcoes.filtrar===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t28"),$trad("t29"),'i3GEO.tema.dialogo.filtro(\"'+ltema.name+'\")',node)}if(funcoes.tabela===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t30"),$trad("t31"),'i3GEO.tema.dialogo.tabela(\"'+ltema.name+'\")',node)}if(i3GEO.parametros.versaoms>4&&funcoes.grafico===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t37"),$trad("t37"),'i3GEO.tema.dialogo.graficotema(\"'+ltema.name+'\")',node)}}if((ltema.type<4||ltema.type===8)&&funcoes.editorlegenda===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t32"),$trad("t33"),'i3GEO.tema.dialogo.editaLegenda(\"'+ltema.name+'\")',node)}if(funcoes.destacar===true&&i3GEO.Interface.ATUAL!=="googlemaps"&&i3GEO.Interface.ATUAL!=="googleearth"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t34"),$trad("t35"),'i3GEO.navega.destacaTema.inicia(\"'+ltema.name+'\")',node)}if(funcoes.sql===true&<ema.editorsql.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t40"),$trad("t41"),'i3GEO.tema.dialogo.editorsql(\"'+ltema.name+'\")',node)}if(funcoes.comentar===true&<ema.permitecomentario.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t45"),$trad("t45"),'i3GEO.tema.dialogo.comentario(\"'+ltema.name+'\")',node)}if(funcoes.wms===true&<ema.permiteogc.toLowerCase()!=="nao"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema("Getcapabilities",'WMS-OGC','i3GEO.tema.dialogo.mostraWms(\"'+ltema.name+'\")',node)}if(i3GEO.login.verificaCookieLogin()&&i3GEO.parametros.editor.toLowerCase()==="sim"){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t44"),"<span style=color:red title='Apenas usuários editores podem ver essa opção' >"+$trad("t44")+"</span>",'i3GEO.tema.dialogo.salvaMapfile(\"'+ltema.name+'\")',node)}if(funcoes.tme===true){i3GEO.arvoreDeCamadas.adicionaOpcaoTema($trad("t49"),$trad("t49"),'i3GEO.tema.dialogo.tme(\"'+ltema.name+'\")',node)}node.loadComplete()},adicionaOpcaoTema:function(dica,titulo,onclick,node){var tnome="<a href='#' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+dica+"','');\" onclick="+onclick+">"+titulo+" </a>";new YAHOO.widget.HTMLNode({html:tnome,enableHighlight:false,isLeaf:true,expanded:false},node)},mostraLegenda:function(node){var retorna,idtema=node.data.idlegenda;retorna=function(retorno){var original={data:""},i,re,tabela,linhas,linha,colunas,incluir,elementos,nelementos,inputs,desativar,nindices;if(retorno.data.legenda){original=retorno;retorno=retorno.data.legenda;if(retorno[0]){if((navn)&&(!retorno[0].imagem)){tabela=retorno}else{i=retorno[0].imagem;re=new RegExp("tiff","g");i=i.replace(re,'png');tabela="<img src='"+i+"' />"}retorno=""}else{linhas=retorno.split("#");if(linhas.length>1){linhas=retorno.split("|");tabela="<table>";linha=linhas.length-1;if(linha>=0){do{colunas=linhas[linha].split("#");re=new RegExp("'","g");tabela+="<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>"}while(linha--)}tabela+="</table><br>"}else{tabela=retorno}}}else{tabela="<img src='"+retorno.data[0].imagem+"' />"}incluir="<div style='text-align:left' id='"+idtema+"verdiv"+"'>"+tabela+"</div>";new YAHOO.widget.HTMLNode({html:incluir,enableHighlight:false,expanded:false},node);node.loadComplete();elementos=document.getElementById(idtema+"verdiv").getElementsByTagName("input");nelementos=elementos.length;inputs=[];i=0;if(nelementos>0){do{if(elementos[i].type==="checkbox"){inputs.push(elementos[i])}i++}while(i<nelementos)}if(original.data.desativar){desativar=original.data.desativar;nindices=desativar.length;i=0;if(nindices>0){do{inputs[desativar[i]].checked=false;i++}while(i<nindices)}}};if(i3GEO.configura.templateLegenda!==""){i3GEO.php.criaLegendaHTML(retorna,idtema,i3GEO.configura.templateLegenda)}else{i3GEO.php.criaLegendaHTML(retorna,idtema)}},atualizaLegenda:function(idtema){var node;if(document.getElementById(idtema+"verdiv")){node=i3GEO.arvoreDeCamadas.ARVORE.getNodeByProperty("idlegenda",idtema);if(node){i3GEO.arvoreDeCamadas.ARVORE.removeChildren(node);this.mostraLegenda(node);if($i("janelaLegenda"+idtema+"_corpo")){i3GEO.tema.mostralegendajanela(idtema,"","abrejanela")}}}},escolheCorClasse:function(leg){var obj,novoel;leg=leg.parentNode.getElementsByTagName("input")[0];if(!$i("tempinputcorclasse")){novoel=document.createElement("input");novoel.id="tempinputcorclasse";novoel.style.display="none";novoel.alt="objeto criado para guardar dados da funcao escolohercorclasse";novoel.onchange="";document.body.appendChild(novoel)}obj=$i("tempinputcorclasse");obj.value="";obj.tema=leg.name;obj.idclasse=leg.value;obj.onchange=function(){var obj=$i("tempinputcorclasse");i3GEO.tema.alteracorclasse(obj.tema,obj.idclasse,obj.value)};i3GEO.util.abreCor("","tempinputcorclasse")},inverteStatusClasse:function(leg){var temp=function(retorno){i3GEO.atualiza();i3GEO.Interface.atualizaTema(retorno,leg.name)};i3GEO.php.inverteStatusClasse(temp,leg.name,leg.value)},montaTextoTema:function(tema){var ck,html,estilo,iu=i3GEO.util;if(tema.status*1===2){ck=' CHECKED '}else{ck=""}if(this.FILTRO!==""){if(this.FILTRO==="desligados"&&ck!==""){return""}if(this.FILTRO==="ligados"&&ck===""){return""}if(this.FILTRO==="selecionados"&&tema.sel.toLowerCase()!=="sim"){return""}if(this.FILTRO==="download"&&tema.download.toLowerCase()!=="sim"){return""}if(this.FILTRO==="wms"&&tema.connectiontype*1!==7){return""}if(this.FILTRO==="raster"&&tema.type*1!==3){return""}if(this.FILTRO==="toponimia"&&tema.type*1!==4){return""}}estilo=navm?"text-align:left;font-size:11px;vertical-align:middle;display:table-cell;":"text-align:left;font-size:11px;vertical-align:top;";html="<p onclick='i3GEO.mapa.ativaTema(\""+tema.name+"\")' id='arrastar_"+tema.name+"' style='"+estilo+"' >";estilo=navm?"cursor:pointer;vertical-align:15%;":"cursor:pointer;";html+="<input class=inputsb style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t3")+"','ligadesliga')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" type='checkbox' name=\"layer\" value='"+tema.name+"' "+ck;if(i3GEO.arvoreDeCamadas.ATIVATEMA!==""){html+="onclick=\""+i3GEO.arvoreDeCamadas.ATIVATEMA+"\""}else{html+="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeCamadas.aplicaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicarCamadas\",this)'"}html+=" />";estilo=navm?"cursor:pointer;vertical-align:35%;padding-top:0px;":"cursor:pointer;vertical-align:20%;";if(tema.iconetema!==""&&i3GEO.arvoreDeCamadas.ICONETEMA===true){html+=" <img style='"+estilo+"' src='"+tema.iconetema+"' />"}if(tema.contextoescala.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("contextoescala.png")+" title='"+$trad("t36")+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t36")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.sel.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("estasel.png")+" title='"+$trad("t4")+"' onclick='i3GEO.tema.limpasel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','limpasel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />";html+=" <img style='"+estilo+"' src="+iu.$im("zoomsel.gif")+" title='"+$trad("t4a")+"' onclick='i3GEO.tema.zoomsel(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t5")+"','zoomsel')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}if(tema.download.toLowerCase()==="sim"){html+=" <img style='"+estilo+"' src="+iu.$im("down1.gif")+" title='download' onclick='i3GEO.tema.dialogo.download(\""+tema.name+"\")' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t6")+"','download')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" />"}estilo=navm?"cursor:move;vertical-align:35%;padding-top:0px;color:black;":"cursor:move;vertical-align:20%;color:black;";if(i3GEO.arvoreDeCamadas.AGUARDALEGENDA){html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onclick=\"i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','abrejanela');\" onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7a")+"','');i3GEO.tema.mostralegendajanela('"+tema.name+"','"+tema.tema+"','ativatimer');\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('');i3GEO.tema.mostralegendajanela('"+tema.name+"','','desativatimer');\" >"+tema.tema+"</span>"}else{html+=" <span id='ArvoreTituloTema"+tema.name+"' style='"+estilo+"' onmouseover=\"javascript:i3GEO.ajuda.mostraJanela('"+$trad("t7")+"','')\" onmouseout=\"javascript:i3GEO.ajuda.mostraJanela('')\" >"+tema.tema+"</span>"}html+="</p>";if(i3GEO.tema.TEMPORIZADORESID[tema.name]==undefined&&tema.temporizador!=""){i3GEO.tema.temporizador(tema.name,tema.temporizador)}return(html)},atualizaFarol:function(mapscale){var farol,l,ltema,escala,iu=i3GEO.util,im=i3GEO.configura.locaplic+"/imagens/",camadas=i3GEO.arvoreDeCamadas.CAMADAS;farol="maisamarelo.png";l=camadas.length-1;if(l>=0){do{ltema=camadas[l];escala=ltema.escala;if(escala*1<mapscale*1){farol="maisverde.png"}if(escala*1>mapscale*1){farol="maisvermelho.png"}if(escala*1===0){farol="maisamarelo.png"}iu.defineValor("farol"+ltema.name,"src",im+farol)}while(l--)}},aplicaTemas:function(tipo){if(arguments.length===0){tipo="normal"}var t="",temp;if(tipo==="normal"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("mantem")}if(tipo==="ligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("marca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}if(tipo==="desligartodos"){t=i3GEO.arvoreDeCamadas.listaLigadosDesligados("desmarca");if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googleearth","openlayers","googlemaps"])){return}}temp=function(){i3GEO.atualiza();i3GEO.janela.fechaAguarde("redesenha")};try{clearTimeout(tempoBotaoAplicar)}catch(erro){}tempoBotaoAplicar="";if(tipo==="normal"){i3GEO.php.ligatemas(temp,t[1].toString(),t[0].toString());return}if(tipo==="ligartodos"){i3GEO.php.ligatemas(temp,"",t[2].toString());return}if(tipo==="desligartodos"){i3GEO.php.ligatemas(temp,t[2].toString(),"")}},listaLigadosDesligados:function(tipo){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return[[],[],[]]}if(arguments.length===0){tipo="manter"}var no,cs,csn,j,c,nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema"),ligados=[],desligados=[],todos=[],n=nos.length,i=0,ATUAL=i3GEO.Interface.ATUAL;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"){c.checked===true?ligados.push(c.value):desligados.push(c.value);todos.push(c.value);if(tipo==="marca"){c.checked=true;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}if(tipo==="desmarca"){c.checked=false;if(i3GEO.util.in_array(ATUAL,["googleearth","openlayers","googlemaps"])){i3GEO.Interface[ATUAL].ligaDesliga(c)}}}}i++}catch(e){i+=1}}while(i<n);return([ligados,desligados,todos])},capturaCheckBox:function(tema){if(!$i(i3GEO.arvoreDeCamadas.IDHTML)){return}var nos,n,i,no,cs,csn,j,c;nos=i3GEO.arvoreDeCamadas.ARVORE.getNodesByProperty("tipo","tema");n=nos.length;i=0;do{try{no=nos[i].getEl();cs=no.getElementsByTagName("input");csn=cs.length;for(j=0;j<csn;j+=1){c=cs[j];if(c.name==="layer"&&c.value===tema){return c}}i+=1}catch(e){i+=1}}while(i<n);return(null)},comparaTemas:function(novo,atual){try{var novon=novo.length,i;if(novon!==atual.length){return(false)}for(i=0;i<novon;i+=1){if(novo[i].name!==atual[i].name){return(false)}if(novo[i].tema!==atual[i].tema){return(false)}if(novo[i].sel!==atual[i].sel){return(false)}if(novo[i].status!==atual[i].status){return(false)}}return(true)}catch(e){return true}},pegaTema:function(idtema,camadas){var i;if(!camadas){camadas=i3GEO.arvoreDeCamadas.CAMADAS}i=camadas.length;while(i>0){i-=1;if(camadas[i].name===idtema){return camadas[i]}}return""},filtraCamadas:function(propriedade,valor,operador,camadas){var resultado=[],i=0,temp,nelementos=camadas.length,ltema;if(nelementos>0){do{ltema=camadas[i];if(ltema.escondido.toLowerCase()!=="sim"){temp=ltema[propriedade];if(operador==="igual"){if(temp==valor){resultado.push(ltema)}}if(operador==="diferente"){if(temp!=valor){resultado.push(ltema)}}if(operador==="menor"){if(temp<valor){resultado.push(ltema)}}}i+=1}while(i<nelementos)}return resultado},alteraPropCamadas:function(propriedade,valor,camada){var i=0,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.name===camada){ltema[propriedade]=valor}i+=1}while(i<nelementos)}},verificaAbrangenciaTemas:function(){if(i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS===false){return}try{var i=0,temp,nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];temp=ltema.exttema;if(temp!==""){if(i3GEO.util.intersectaBox(temp,i3GEO.parametros.mapexten)===false){$i("ArvoreTituloTema"+ltema.name).style.color="gray"}else{$i("ArvoreTituloTema"+ltema.name).style.color="black"}}i+=1}while(i<nelementos)}}catch(e){}},verificaAplicaExtensao:function(){var i=0,temp="",nelementos=i3GEO.arvoreDeCamadas.CAMADAS.length,ltema;try{if(nelementos>0){do{ltema=i3GEO.arvoreDeCamadas.CAMADAS[i];if(ltema.aplicaextensao.toLowerCase()==="sim"){temp=ltema.name}i+=1}while(i<nelementos)}}catch(e){return""}return temp},dialogo:{filtro:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.filtro()","filtroarvore","filtroarvore")},excluir:function(){i3GEO.util.dialogoFerramenta("i3GEO.arvoreDeCamadas.dialogo.excluir()","excluirarvore","excluirarvore")}}}; | |
366 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.navega={TEMPONAVEGAR:600,FATORZOOM:2,timerNavega:null,centroDoMapa:function(){var xy;switch(i3GEO.Interface.ATUAL){case"openlayers":xy=i3geoOL.getCenter();if(xy){return[xy.lon,xy.lat]}else{return false}break;case"googlemaps":xy=i3GeoMap.getCenter();if(xy){return[xy.lng(),xy.lat()]}else{return false}break;default:return false}},marcaCentroDoMapa:function(xy){if(xy!=false){xy=i3GEO.calculo.dd2tela(xy[0]*1,xy[1]*1,$i(i3GEO.Interface.IDMAPA),i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);i3GEO.util.criaPin("i3GeoCentroDoMapa",i3GEO.configura.locaplic+'/imagens/alvo.png','30px','30px');i3GEO.util.posicionaImagemNoMapa("i3GeoCentroDoMapa",xy[0],xy[1])}},zoomin:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomIn();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.aproxima(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomout:function(locaplic,sid){if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomOut();return}if(sid){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}i3GEO.php.afasta(i3GEO.atualiza,i3GEO.navega.FATORZOOM)},zoomponto:function(locaplic,sid,x,y,tamanho,simbolo,cor){if(!simbolo){simbolo="ponto"}if(!tamanho){tamanho=15}if(!cor){cor="255 0 0"}if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.zoomponto(i3GEO.atualiza,"+x+","+y+","+tamanho+",'"+simbolo+"','"+cor+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},zoompontoIMG:function(locaplic,sid,x,y){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.pan(i3GEO.atualiza,'','',x,y)},xy2xy:function(locaplic,sid,xi,yi,xf,yf,ext,tipoimagem){var disty,distx,ex,novoxi,novoxf,novoyf,nex;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}disty=(yi*-1)+yf;distx=(xi*-1)+xf;ex=ext.split(" ");novoxi=(ex[0]*1)-distx;novoxf=(ex[2]*1)-distx;novoyi=(ex[1]*1)-disty;novoyf=(ex[3]*1)-disty;if((distx===0)&&(disty===0)){return false}else{nex=novoxi+" "+novoyi+" "+novoxf+" "+novoyf;i3GEO.navega.zoomExt(i3GEO.configura.locaplic,i3GEO.configura.sid,tipoimagem,nex);return true}},localizaIP:function(locaplic,sid,funcao){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}i3GEO.php.localizaIP(funcao)},zoomIP:function(locaplic,sid){try{if(arguments.length>0){i3GEO.configura.locaplic=locaplic;i3GEO.configura.sid=sid}var mostraIP=function(retorno){if(retorno.data.latitude!==null){i3GEO.navega.zoomponto(locaplic,sid,retorno.data.longitude,retorno.data.latitude)}else{alert("Nao foi possivel identificar a localizacao.")}};i3GEO.navega.localizaIP(locaplic,sid,mostraIP)}catch(e){}},zoomExt:function(locaplic,sid,tipoimagem,ext){if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(tipoimagem===""){tipoimagem="nenhum"}var f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.mudaext(i3GEO.atualiza,'"+tipoimagem+"','"+ext+"');";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},aplicaEscala:function(locaplic,sid,escala){if(i3GEO.Interface.ATUAL==="googlemaps"){i3GeoMap.setZoom(i3GEO.Interface.googlemaps.escala2nzoom(escala))}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.zoomToScale(escala,true)}},panFixo:function(locaplic,sid,direcao,w,h,escala){var x=0,y=0,f;if(locaplic!==""){i3GEO.configura.locaplic=locaplic}if(sid!==""){i3GEO.configura.sid=sid}if(w===""){w=i3GEO.parametros.w}if(h===""){h=i3GEO.parametros.h}if(escala===""){escala=i3GEO.parametros.mapscale}switch(direcao){case"norte":y=h/6;x=w/2;break;case"sul":y=h-(h/6);x=w/2;break;case"leste":x=w-(w/6);y=h/2;break;case"oeste":x=w/6;y=h/2;break;case"nordeste":y=h/6;x=w-(w/6);break;case"sudeste":y=h-(h/6);x=w-(w/6);break;case"noroeste":y=h/6;x=w/6;break;case"sudoeste":y=h-(h/6);x=w/6;break}if(i3GEO.Interface.ATUAL==="openlayers"){i3geoOL.pan(x,y);return}f="i3GEO.navega.timerNavega = null;"+"i3GEO.php.pan(i3GEO.atualiza,"+escala+",'',"+x+","+y+");";try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)},panFixoNorte:function(){i3GEO.navega.panFixo('','','norte','','','')},panFixoSul:function(){i3GEO.navega.panFixo('','','sul','','','')},panFixoOeste:function(){i3GEO.navega.panFixo('','','oeste','','','')},panFixoLeste:function(){i3GEO.navega.panFixo('','','leste','','','')},mostraRosaDosVentos:function(){var novoel,setas,i;try{if(i3GEO.configura.mostraRosaDosVentos==="nao"){return}if(g_tipoacao==="area"){return}}catch(e){}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10||objposicaocursor.imgy>(i3GEO.parametros.h-10)){return}if(!$i("i3geo_rosa")){novoel=document.createElement("div");novoel.id="i3geo_rosa";novoel.style.position="absolute";novoel.style.zIndex=5000;if(navn){novoel.style.opacity=".7"}else{novoel.style.filter="alpha(opacity=70)"}document.body.appendChild(novoel)}setas="<table id='rosaV' >";setas+="<tr onclick=\"javascript:i3GEO.configura.mostraRosaDosVentos='nao'\"><td></td><td></td><td style=cursor:pointer >x</td></tr><tr>";setas+="<td><img class='rosanoroeste' title='noroeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','noroeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanorte' title='norte' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','norte','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosanordeste' title='nordeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','nordeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosaoeste' title='oeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','oeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><table><tr>";setas+="<td><img class='rosamais' title='aproxima' onclick=\"i3GEO.navega.zoomin('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="<td><img class='rosamenos' title='afasta' onclick=\"i3GEO.navega.zoomout('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"')\" src='"+$im("branco.gif")+"' </td>";setas+="</tr></table></td>";setas+="<td><img class='rosaleste' title='leste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','leste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr>";setas+="<tr><td><img class='rosasudoeste' title='sudoeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudoeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasul' title='sul' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sul','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td>";setas+="<td><img class='rosasudeste' title='sudeste' src='"+$im("branco.gif")+"' onclick=\"i3GEO.navega.panFixo('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','sudeste','"+i3GEO.parametros.w+"','"+i3GEO.parametros.h+"','"+i3GEO.parametros.mapscale+"')\" /></td></tr></table>";i=$i("i3geo_rosa");i.innerHTML=setas;i.style.top=objposicaocursor.telay-27+"px";i.style.left=objposicaocursor.telax-27+"px";i.style.display="block";if($i("img")){YAHOO.util.Event.addListener($i("img"),"mousemove",function(){var i=$i("i3geo_rosa");i.style.display="none";YAHOO.util.Event.removeListener(escondeRosa)})}i3GEO.ajuda.mostraJanela('Clique nas pontas da rosa para navegar no mapa. Clique em x para parar de mostrar essa opção.')},autoRedesenho:{INTERVALO:0,ID:"tempoRedesenho",ativa:function(id){if(arguments.length===0){id="tempoRedesenho"}i3GEO.navega.autoRedesenho.ID=id;if(($i(id))&&i3GEO.navega.autoRedesenho.INTERVALO>0){$i(id).style.display="block"}if(i3GEO.navega.autoRedesenho.INTERVALO>0){i3GEO.navega.tempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.redesenha()',i3GEO.navega.autoRedesenho.INTERVALO)}if(($i(id))&&(i3GEO.navega.autoRedesenho.INTERVALO>0)){$i(id).innerHTML=i3GEO.navega.autoRedesenho.INTERVALO/1000;i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},desativa:function(){i3GEO.navega.autoRedesenho.INTERVALO=0;clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);i3GEO.navega.tempoRedesenho="";i3GEO.navega.contaTempoRedesenho="";if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).style.display="none"}},redesenha:function(){clearTimeout(i3GEO.navega.tempoRedesenho);clearTimeout(i3GEO.navega.contaTempoRedesenho);switch(i3GEO.Interface.ATUAL){case"openlayers":i3GEO.Interface.openlayers.atualizaMapa();break;case"googlemaps":i3GEO.Interface.googlemaps.redesenha();break;default:i3GEO.atualiza("")}i3GEO.navega.autoRedesenho.ativa(i3GEO.navega.autoRedesenho.ID)},contagem:function(){if($i(i3GEO.navega.autoRedesenho.ID)){$i(i3GEO.navega.autoRedesenho.ID).innerHTML=parseInt($i(i3GEO.navega.autoRedesenho.ID).innerHTML,10)-1}i3GEO.navega.contaTempoRedesenho=setTimeout('i3GEO.navega.autoRedesenho.contagem()',1000)}},zoomBox:{inicia:function(){if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}if(!$i("i3geoboxZoom")){i3GEO.navega.zoomBox.criaBox()}var i=$i("i3geoboxZoom").style;i.width=0+"px";i.height=0+"px";i.visibility="visible";i.display="block";i.left=objposicaocursor.telax+"px";i.top=objposicaocursor.telay+"px";boxxini=objposicaocursor.telax;boxyini=objposicaocursor.telay;tamanhox=0;tamanhoy=0;if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.zoomBox.desloca()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.zoomBox.desloca()")}if(i3GEO.eventos.MOUSEUP.toString().search("i3GEO.navega.zoomBox.termina()")<0){i3GEO.eventos.MOUSEUP.push("i3GEO.navega.zoomBox.termina()")}},criaBox:function(){if(i3GEO.navega.timerNavega!==null){return}if(!$i("i3geoboxZoom")){var novoel;novoel=document.createElement("div");novoel.style.width="0px";novoel.style.height="0px";novoel.id="i3geoboxZoom";novoel.style.display="none";novoel.style.fontSize="0px";if(navn){novoel.style.opacity=0.25}novoel.style.backgroundColor="gray";novoel.style.position="absolute";novoel.style.border="2px solid #ff0000";if(navm){novoel.style.filter="alpha(opacity=25)"}novoel.onmousemove=function(){var b,wb,hb;b=$i("i3geoboxZoom").style;wb=parseInt(b.width,10);hb=parseInt(b.height,10);if(navm){if(wb>2){b.width=wb-2+"px"}if(hb>2){b.height=hb-2+"px"}}else{b.width=wb-2+"px";b.height=hb-2+"px"}};novoel.onmouseup=function(){i3GEO.navega.zoomBox.termina()};document.body.appendChild(novoel)}},desloca:function(){var bxs,ppx,py;if(i3GEO.navega.timerNavega!==null){return}if(g_tipoacao!=='zoomli'){return}bxs=$i("i3geoboxZoom").style;if(bxs.display!=="block"){return}ppx=objposicaocursor.telax;py=objposicaocursor.telay;if(navm){if((ppx>boxxini)&&((ppx-boxxini-2)>0)){bxs.width=ppx-boxxini-2+"px"}if((py>boxyini)&&((py-boxyini-2)>0)){bxs.height=py-boxyini-2+"px"}if(ppx<boxxini){bxs.left=ppx;bxs.width=boxxini-ppx+2+"px"}if(py<boxyini){bxs.top=py;bxs.height=boxyini-py+2+"px"}}else{if(ppx>boxxini){bxs.width=ppx-boxxini+"px"}if(py>boxyini){bxs.height=py-boxyini+"px"}if(ppx<boxxini){bxs.left=ppx+"px";bxs.width=boxxini-ppx+"px"}if(py<boxyini){bxs.top=py+"px";bxs.height=boxyini-py+"px"}}},termina:function(){var valor,v,x1,y1,x2,y2,f,limpa=function(){};if(g_tipoacao!=='zoomli'){i3GEO.eventos.MOUSEDOWN.remove("i3GEO.navega.zoomBox.inicia()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");return}try{if(i3GEO.navega.timerNavega!==null){return}valor=i3GEO.calculo.rect2ext("i3geoboxZoom",i3GEO.parametros.mapexten,i3GEO.parametros.pixelsize);v=valor[0];x1=valor[1];y1=valor[2];x2=valor[3];y2=valor[4];limpa=function(){var bxs=$i("i3geoboxZoom");if(bxs){bxs.style.display="none";bxs.style.visibility="hidden";bxs.style.width=0+"px";bxs.style.height=0+"px"}};if((x1===x2)||(y1===y2)){limpa.call();return}i3GEO.parametros.mapexten=v;limpa.call();i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.zoomBox.desloca()");i3GEO.eventos.MOUSEUP.remove("i3GEO.navega.zoomBox.termina()");if(i3GEO.Interface.ATUAL==="googlemaps"){i3GEO.Interface.googlemaps.zoom2extent(v);return}f="i3GEO.navega.timerNavega = null;i3GEO.navega.zoomExt('"+i3GEO.configura.locaplic+"','"+i3GEO.configura.sid+"','"+i3GEO.configura.tipoimagem+"','"+v+"')";if(i3GEO.navega.timerNavega!==undefined){clearTimeout(i3GEO.navega.timerNavega)}i3GEO.navega.timerNavega=setTimeout(f,i3GEO.navega.TEMPONAVEGAR)}catch(e){limpa.call();return}}},lente:{POSICAOX:0,POSICAOY:0,ESTAATIVA:"nao",inicia:function(){var novoel,novoimg,temp;if(!$i("lente")){novoel=document.createElement("div");novoel.id='lente';novoel.style.clip='rect(0px,0px,0px,0px)';novoimg=document.createElement("img");novoimg.src="";novoimg.id='lenteimg';novoel.appendChild(novoimg);document.body.appendChild(novoel);novoel=document.createElement("div");novoel.id='boxlente';document.body.appendChild(novoel)}temp=$i('boxlente').style;temp.borderWidth='1';temp.borderColor="red";temp.display="block";$i("lente").style.display="block";i3GEO.navega.lente.ESTAATIVA="sim";i3GEO.navega.lente.atualiza();if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.lente.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.lente.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.lente.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.lente.movimenta()")}},atualiza:function(){var temp=function(retorno){try{var pos,volta,nimg,olente,oboxlente,olenteimg;retorno=retorno.data;if(retorno==="erro"){alert("A lente nao pode ser criada");return}volta=retorno.split(",");nimg=volta[2];olente=$i('lente');oboxlente=$i('boxlente');olenteimg=$i('lenteimg');olenteimg.src=nimg;olenteimg.style.width=volta[0]*1.5+"px";olenteimg.style.height=volta[1]*1.5+"px";olente.style.zIndex=1000;olenteimg.style.zIndex=1000;oboxlente.style.zIndex=1000;pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));olente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";olente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.left=pos[0]+i3GEO.navega.lente.POSICAOX+"px";oboxlente.style.top=pos[1]+i3GEO.navega.lente.POSICAOY+"px";oboxlente.style.display='block';oboxlente.style.visibility='visible';olente.style.display='block';olente.style.visibility='visible';i3GEO.janela.fechaAguarde("ajaxabrelente")}catch(e){i3GEO.janela.fechaAguarde()}};if(i3GEO.navega.lente.ESTAATIVA==="sim"){i3GEO.php.aplicaResolucao(temp,1.5)}else{i3GEO.navega.lente.desativa()}},desativa:function(){$i("lente").style.display="none";$i("boxlente").style.display="none";$i('boxlente').style.borderWidth=0;i3GEO.navega.lente.ESTAATIVA="nao";i3GEO.eventos.MOUSEMOVE.remove("i3GEO.navega.lente.movimenta()");i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.lente.atualiza()")},movimenta:function(){try{if(i3GEO.navega.lente.ESTAATIVA==="sim"){var pos=[0,0],esq,topo,clipt,i;if($i("lente").style.visibility==="visible"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA))}esq=(objposicaocursor.telax-pos[0])*2.25;topo=(objposicaocursor.telay-pos[1])*2.25;clipt="rect("+(topo-120)+"px "+(esq+120)+"px "+(topo+120)+"px "+(esq-120)+"px)";i=$i("lente").style;i.clip=clipt;i.top=pos[1]-(topo-120)+"px";i.left=pos[0]-(esq-120)+"px"}}catch(e){}}},destacaTema:{TAMANHO:75,ESTAATIVO:"nao",TEMA:"",inicia:function(tema){var novoel,novoeli,janela,pos;if(!$i("img_d")){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA));novoel=document.createElement("div");novoel.id="div_d";novoel.style.zIndex=5000;document.body.appendChild(novoel);$i("div_d").innerHTML="<input style='position:relative;top:0px;left:0px'' type=image src='' id='img_d' />";$i("div_d").style.left=parseInt(pos[0],10)+"px";$i("div_d").style.top=parseInt(pos[1],10)+"px";$i("img_d").style.left=0+"px";$i("img_d").style.top=0+"px";$i("img_d").style.width=i3GEO.parametros.w+"px";$i("img_d").style.height=i3GEO.parametros.h+"px";$i("div_d").style.clip='rect(0 75 75 0)';novoeli=document.createElement("div");novoeli.id="div_di";novoel.appendChild(novoeli);$i("div_di").innerHTML="<p style='position:absolute;top:0px;left:0px'>+-</p>"}i3GEO.navega.destacaTema.TEMA=tema;i3GEO.navega.destacaTema.ESTAATIVO="sim";i3GEO.navega.destacaTema.atualiza();janela=i3GEO.janela.cria(160,0,"","center","center","Feche para parar destaque ","ativadesativaDestaque");YAHOO.util.Event.addListener(janela[0].close,"click",i3GEO.navega.destacaTema.desativa);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.navega.destacaTema.atualiza()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.navega.destacaTema.atualiza()")}if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.navega.destacaTema.movimenta()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()")}},atualiza:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="nao"){return}var temp=function(retorno){var m,novoel;retorno=retorno.data;m=new Image();m.src=retorno;$i("div_d").innerHTML="";$i("div_d").style.display="block";novoel=document.createElement("input");novoel.id="img_d";novoel.style.position="relative";novoel.style.top="0px";novoel.style.left="0px";novoel.type="image";novoel.src=m.src;novoel.style.display="block";$i("div_d").appendChild(novoel);i3GEO.janela.fechaAguarde("ajaxdestaca")};i3GEO.php.geradestaque(temp,i3GEO.navega.destacaTema.TEMA,i3GEO.parametros.mapexten)},desativa:function(){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.navega.destacaTema.atualiza()");i3GEO.eventos.MOUSEMOVE.push("i3GEO.navega.destacaTema.movimenta()");i3GEO.navega.destacaTema.ESTAATIVO="nao";document.body.removeChild($i("div_d"))},movimenta:function(){if(i3GEO.navega.destacaTema.ESTAATIVO==="sim"){$i("div_d").style.clip='rect('+(objposicaocursor.imgy-i3GEO.navega.destacaTema.TAMANHO)+" "+(objposicaocursor.imgx-10)+" "+(objposicaocursor.imgy-10)+" "+(objposicaocursor.imgx-i3GEO.navega.destacaTema.TAMANHO)+')'}}},barraDeZoom:{cria:function(){var temp="",estilo;if(navn){temp+='<div style="text-align:center;position:relative;left:9px" >'}estilo="top:4px;";if(navm){estilo="top:4px;left:-2px;"}temp+='<div id="vertMaisZoom" style="'+estilo+'"></div><div id="vertBGDiv" name="vertBGDiv" tabindex="0" x2:role="role:slider" state:valuenow="0" state:valuemin="0" state:valuemax="200" title="Zoom" >';temp+='<div id="vertHandleDivZoom" ><img alt="" class="slider" src="'+i3GEO.util.$im("branco.gif")+'" /></div></div>';if(navm){temp+='<div id=vertMenosZoom style="left:-1px;" ></div>'}else{temp+='<div id=vertMenosZoom ></div>'}if(navn){temp+='</div>'}return temp},ativa:function(){var temp;$i("vertMaisZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Amplia o mapa mantendo o centro atual.')};$i("vertMaisZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=-1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomin';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom<-6){$i("vertBGDiv").onmouseup.call()}};$i("vertMenosZoom").onmouseover=function(){i3GEO.ajuda.mostraJanela('Reduz o mapa mantendo o centro atual.')};$i("vertMenosZoom").onclick=function(){if(!$i("imgtemp")){$i("vertHandleDivZoom").onmousedown.call();g_fatordezoom=0;$i("vertHandleDivZoom").onmousemove.call();g_fatordezoom=1}$i("vertHandleDivZoom").onmousemove.call();i3GEO.barraDeBotoes.BOTAOCLICADO='zoomout';try{clearTimeout(i3GEO.navega.timerNavega)}catch(e){}i3GEO.navega.timerNavega=setTimeout("$i('vertBGDiv').onmouseup.call();",i3GEO.navega.TEMPONAVEGAR);if(g_fatordezoom>6){$i("vertBGDiv").onmouseup.call()}};verticalSlider=YAHOO.widget.Slider.getVertSlider("vertBGDiv","vertHandleDivZoom",0,70);verticalSlider.onChange=function(offsetFromStart){g_fatordezoom=(offsetFromStart-35)/5};verticalSlider.setValue(35,true);if($i("vertBGDiv")){$i("vertBGDiv").onmouseup=function(){verticalSlider.setValue(35,true);if(g_fatordezoom!==0){temp=i3GEO.navega.TEMPONAVEGAR;i3GEO.navega.TEMPONAVEGAR=0;i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,i3geo_ns);i3GEO.navega.TEMPONAVEGAR=temp}g_fatordezoom=0}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousedown=function(){var iclone,corpo;$i("vertHandleDivZoom").onmouseout=function(e){if(!e){e=window.event}if(g_fatordezoom!==0){$i("vertBGDiv").onmouseup.call()}e.onmouseup.returnValue=false;e.onmouseout.returnValue=false};i3GEO.barraDeBotoes.BOTAOCLICADO='slidezoom';if(!$i("imgtemp")){iclone=document.createElement('IMG');iclone.style.position="absolute";iclone.id="imgtemp";iclone.style.border="1px solid blue";$i("img").parentNode.appendChild(iclone);iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}iclone.src=corpo.src;iclone.style.width=i3GEO.parametros.w+"px";iclone.style.height=i3GEO.parametros.h+"px";iclone.style.top=corpo.style.top+"px";iclone.style.left=corpo.style.left+"px";$i("img").style.display="none";iclone.style.display="block"}}}if($i("vertHandleDivZoom")){$i("vertHandleDivZoom").onmousemove=function(){try{var iclone,corpo,nt,nl,velhoh,velhow,nh=0,nw=0,t,l,fatorEscala;iclone=$i("imgtemp");corpo=$i("img");if(!corpo){return}nt=0;nl=0;i3geo_ns=parseInt(i3GEO.parametros.mapscale,10);if((g_fatordezoom>0)&&(g_fatordezoom<7)){g_fatordezoom=g_fatordezoom+1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh/g_fatordezoom;nw=velhow/g_fatordezoom;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t+((velhoh-nh)*0.5);nl=l+((velhow-nw)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if((g_fatordezoom<0)&&(g_fatordezoom>-7)){g_fatordezoom=g_fatordezoom-1;velhoh=i3GEO.parametros.h;velhow=i3GEO.parametros.w;nh=velhoh*g_fatordezoom*-1;nw=velhow*g_fatordezoom*-1;t=parseInt(corpo.style.top,10);l=parseInt(corpo.style.left,10);nt=t-((nh-velhoh)*0.5);nl=l-((nw-velhow)*0.5);fatorEscala=nh/i3GEO.parametros.h;i3geo_ns=parseInt(i3GEO.parametros.mapscale/fatorEscala,10)}if(iclone){iclone.style.width=nw+"px";iclone.style.height=nh+"px";if(iclone.style.pixelTop){iclone.style.pixelTop=nt}else{iclone.style.top=nt+"px"}if(iclone.style.pixelLeft){iclone.style.pixelLeft=nl}else{iclone.style.left=nl+"px"}}if($i("i3geo_escalanum")){$i("i3geo_escalanum").value=i3geo_ns}}catch(e){}}}}},dialogo:{wiki:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.wiki()","wiki","wiki")},metar:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.metar()","metar","metar")},buscaFotos:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.buscaFotos()","buscafotos","buscaFotos")},google:function(coordenadas){i3GEO.navega.dialogo.google.coordenadas=coordenadas;if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")>0){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}i3GEO.util.criaBox();g_operacao="navega";var idgoogle="googlemaps"+Math.random();i3GEO.janela.cria((i3GEO.parametros.w/2)+25+"px",(i3GEO.parametros.h/2)+18+"px",i3GEO.configura.locaplic+"/ferramentas/googlemaps/index.php","","","Google maps <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=7&idajuda=68' > </a>",idgoogle);atualizagoogle=function(){try{parent.frames[idgoogle+"i"].panTogoogle()}catch(e){i3GEO.eventos.NAVEGAMAPA.remove("atualizagoogle()")}};if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizagoogle()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizagoogle()")}},confluence:function(){i3GEO.util.dialogoFerramenta("i3GEO.navega.dialogo.confluence()","confluence","confluence")}}}; | |
367 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={ATUALIZAARVORECAMADAS:[],ATIVATEMA:[],NAVEGAMAPA:[],MOUSEPARADO:["i3GEO.navega.mostraRosaDosVentos()"],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:[],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(this.TIMERPARADO)}catch(e){this.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(this.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEDOWN)},mouseupMapa:function(){i3GEO.eventos.executaEventos(this.MOUSEUP)},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(this.MOUSECLIQUE)},executaEventos:function(eventos){var f=0;try{if(eventos.length>0){f=eventos.length-1;if(f>=0){do{if(eventos[f]!==""){eval(eventos[f])}}while(f--)}}}catch(e){eventos[f]=""}},posicaoMouseMapa:function(e){var teladd,teladms,container="",targ="",pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;if(!e){e=window.event}try{if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.parentNode){container=targ.parentNode.id}}catch(erro){}if(container!=="divGeometriasTemp"&&container!=="mapaReferencia"){if(i3GEO.util.in_array(i3GEO.Interface.ATUAL,["googlemaps","googleearth","openlayers"])){return}}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id===""&&$i(i3GEO.Interface.IDMAPA)){targ=$i(i3GEO.Interface.IDMAPA)}try{if(g_panM!=='undefined'&&g_panM==="sim"){pos=i3GEO.util.pegaPosicaoObjeto(targ.parentNode)}else{pos=i3GEO.util.pegaPosicaoObjeto(targ)}if(g_panM==="sim"){pos[0]=pos[0]-i3GEO.parametros.w;pos[1]=pos[1]-i3GEO.parametros.h}}catch(m){pos=i3GEO.util.pegaPosicaoObjeto(targ)}mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.pixelsize;ex=i3GEO.parametros.mapexten;try{if(targ.id==="imagemReferencia"){c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;r=$i("i3geo_rosa");if(r){r.style.display="none"}}}catch(e){i3GEO.parametros.celularef=0}teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex,targ.id);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout(function(){i3GEO.eventos.mouseParado()},i3GEO.configura.tempoMouseParado)}catch(e){}try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=true;try{objmapaparado="parar"}catch(e){}};docMapa.onmousedown=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousedownMapa()}};docMapa.onclick=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousecliqueMapa()}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa()}}},botaoDireita:function(exy){try{var k=(navm)?event.button:exy.button;if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){var x,y,doc=document;if(arguments.length===0){ixg="ixg";ixm="ixm";ixs="ixs";iyg="iyg";iym="iym";iys="iys";if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}if(g_tipoacao!=="capturaponto"){return}else{try{if(doc){x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById(ixg)){doc.getElementById(ixg).value=x[0]}if(doc.getElementById(ixm)){doc.getElementById(ixm).value=x[1]}if(doc.getElementById(ixs)){doc.getElementById(ixs).value=x[2]}if(doc.getElementById(iyg)){doc.getElementById(iyg).value=y[0]}if(doc.getElementById(iym)){doc.getElementById(iym).value=y[1]}if(doc.getElementById(iys)){doc.getElementById(iys).value=y[2]}}}catch(m){}}}}; | |
368 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.arvoreDeTemas={OPCOESADICIONAIS:{idonde:"",incluiArvore:true,uploaddbf:true,uploadlocal:true,uploadarquivo:true,downloadbase:true,conectarwms:true,conectarwmst:true,conectargeorss:true,conectargeojson:true,nuvemTags:true,nuvemTagsFlash:false,navegacaoDir:false,incluibusca:true,kml:true,qrcode:true,mini:true,estrelas:true,refresh:true,carousel:true,inde:true,uploadgpx:true,comentarios:true,bookmark:true,importarwmc:true,googleearth:true,carregaKml:true,flutuante:true},FATORESTRELA:"10",INCLUISISTEMAS:true,INCLUIWMS:true,INCLUIESTRELAS:true,FILTRADOWNLOAD:false,FILTRAOGC:false,TIPOBOTAO:"checkbox",ATIVATEMA:"",ATIVATEMAIMEDIATO:false,IDSMENUS:[],RETORNAGUIA:"",IDHTML:"arvoreAdicionaTema",LOCAPLIC:null,SID:null,ARVORE:null,DRIVES:null,SISTEMAS:null,MENUS:null,GRUPOS:null,SUBGRUPOS:null,TEMAS:null,flutuante:function(){var janela,temp,cabecalho,minimiza,idold,corpo,altura;cabecalho=function(){};if($i("i3GEOFcatalogo_corpo")){return}minimiza=function(){i3GEO.janela.minimiza("i3GEOFcatalogo")};altura=i3GEO.parametros.w-150;if(altura>500){altura=500}janela=i3GEO.janela.cria("360px",altura+"px","","","",$trad("g1a"),"i3GEOFcatalogo",false,"hd",cabecalho,minimiza);temp=function(){delete(i3GEO.arvoreDeTemas.ARVORE)};YAHOO.util.Event.addListener(janela[0].close,"click",temp,janela[0].panel,{id:janela[0].id},true);corpo=$i("i3GEOFcatalogo_corpo");corpo.style.backgroundColor="white";corpo.innerHTML=$trad("o1");corpo.style.overflow="auto";if($i(i3GEO.arvoreDeTemas.IDHTML)){$i(i3GEO.arvoreDeTemas.IDHTML).innerHTML=""}idold=i3GEO.arvoreDeTemas.IDHTML;delete(i3GEO.arvoreDeTemas.ARVORE);i3GEO.arvoreDeTemas.IDHTML="i3GEOFcatalogo_corpo";i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,"");i3GEO.arvoreDeTemas.IDHTML=idold},listaWMS:function(){var monta=function(retorno){var node,raiz,nraiz,i,html,tempNode;node=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("idwms","raiz");raiz=retorno.data.canais;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){html="<span title='"+raiz[i].description+"'> "+raiz[i].title;if(raiz[i].nacessos>0){html+=" ("+((raiz[i].nacessosok*100)/(raiz[i].nacessos*1))+"%)</span>"}else{html+=" (% de acessos não definido)</span>"}html+="<hr>";tempNode=new YAHOO.widget.HTMLNode({html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0,expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}node.loadComplete()};i3GEO.php.listaRSSwsARRAY(monta,"WMS")},listaLayersWMS:function(node){var monta=function(retorno){var n,cor,i,cabeca,tempNode,ns,j,temp;n=0;try{n=retorno.data.length}catch(m){node.loadComplete();return}cor="rgb(51, 102, 102)";html="";for(i=0;i<n;i+=1){temp=retorno.data[i];cabeca=temp.nome+" - "+temp.titulo;if(cabeca!=="undefined - undefined"){tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:"+cor+"' >"+cabeca,url:node.data.url,nivel:(node.data.nivel*1+1),id_ws:"",layer:temp.nome,enableHighlight:false,expanded:false},node);if(!temp.estilos){tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS,1)}if(temp.estilos){ns=temp.estilos.length;for(j=0;j<ns;j+=1){new YAHOO.widget.HTMLNode({html:i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,temp.nome,temp.estilos[j].nome,temp.estilos[j].titulo,temp.srs.toString(),temp.formatsinfo.toString(),temp.version.toString(),temp.formats.toString(),cor),enableHighlight:false,expanded:false},tempNode);tempNode.isleaf=true}}cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.php.listaLayersWMS(monta,node.data.url,(node.data.nivel*1+1),node.data.id_ws,node.data.layer)},montaTextoTemaWMS:function(servico,layer,estilo,titulo,proj,formatoinfo,versao,formatoimg,cor){var html,temp,adiciona;html="<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";temp=function(){i3GEO.janela.fechaAguarde("ajaxredesenha");i3GEO.atualiza()};adiciona="i3GEO.arvoreDeTemas.checked=false;i3GEO.php.adicionaTemaWMS("+temp+","+"\""+servico+"\","+"\""+layer+"\","+"\""+estilo+"\","+"\""+proj+"\","+"\""+formatoimg+"\","+"\""+versao+"\","+"\""+titulo+"\","+"\"\","+"\"nao\","+"\""+formatoinfo+"\")";html+="onclick='javascript:"+adiciona+"' "+" type='radio' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;padding-left:3px;color:"+cor+";' >"+layer+" - "+titulo+"</td></span>";return(html)},listaMenus:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){var c,m,i,k,jj,j;if(i3GEO.arvoreDeTemas.IDSMENUS.length===0){i3GEO.arvoreDeTemas.MENUS=retorno.data}else{i3GEO.arvoreDeTemas.MENUS=[];c=retorno.data.length;m=i3GEO.arvoreDeTemas.IDSMENUS.length;for(i=0,j=c;i<j;i+=1){for(k=0,jj=m;k<jj;k+=1){if(retorno.data[i].idmenu===i3GEO.arvoreDeTemas.IDSMENUS[k]){i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i])}}}}if(funcao!==""){eval(funcao+"(retorno)")}};i3GEO.php.pegalistademenus(retorno)},listaGrupos:function(g_sid,g_locaplic,id_menu,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.GRUPOS=retorno.data;if(funcao!==""){funcao.call()}};if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD||i3GEO.arvoreDeTemas.FILTRAOGC){i3GEO.php.pegalistadegrupos(retorno,id_menu,"sim")}else{i3GEO.php.pegalistadegrupos(retorno,id_menu,"nao")}},listaSubGrupos:function(g_sid,g_locaplic,id_menu,id_grupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SUBGRUPOS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)},listaTemas:function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.TEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)},listaSistemas:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){i3GEO.arvoreDeTemas.SISTEMAS=retorno.data;if(funcao!==""){funcao.call()}};i3GEO.php.pegaSistemas(retorno)},listaDrives:function(g_sid,g_locaplic,funcao){var retorno=function(retorno){try{i3GEO.arvoreDeTemas.DRIVES=retorno.data[0];if(i3GEO.arvoreDeTemas.DRIVES==""){return}if(funcao!==""){funcao.call()}}catch(e){i3GEO.arvoreDeTemas.DRIVES=""}};i3GEO.php.listadrives(retorno)},listaEstrelas:function(node){var montanos=function(retorno){try{var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}tempNode=new YAHOO.widget.HTMLNode({html:d,expanded:false,isLeaf:true,enableHighlight:false},node)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red'>Nada encontrado<br><br></span>",isLeaf:true,expanded:false,enableHighlight:false},node)}}}node.loadComplete()}catch(e){}};i3GEO.php.procurartemasestrela(montanos,node.data.nivel,i3GEO.arvoreDeTemas.FATORESTRELA*1)},cria:function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes,tipoBotao){if(i3GEO.arvoreDeTemas.ARVORE){return}if(!idhtml){idhtml=""}if(idhtml!==""){i3GEO.arvoreDeTemas.IDHTML=idhtml}if(!funcaoTema){funcaoTema=""}if(funcaoTema!==""){i3GEO.arvoreDeTemas.ATIVATEMA=funcaoTema}if(!objOpcoes){objOpcoes=""}if(objOpcoes!==""){i3GEO.arvoreDeTemas.OPCOESADICIONAIS=objOpcoes}if(!tipoBotao){tipoBotao=""}if(tipoBotao!==""){i3GEO.arvoreDeTemas.TIPOBOTAO=tipoBotao}i3GEO.arvoreDeTemas.LOCAPLIC=g_locaplic;i3GEO.arvoreDeTemas.SID=g_sid;if(i3GEO.arvoreDeTemas.IDHTML===""){return}i3GEO.arvoreDeTemas.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore")},atualiza:function(){i3GEO.arvoreDeTemas.ARVORE=null;i3GEO.arvoreDeTemas.cria(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,i3GEO.arvoreDeTemas.IDHTML)},montaArvore:function(){var tempNode,tempNode1,retorno,root,insp,outrasOpcoes,dados,c,i,j,conteudo,editor;(function(){function changeIconMode(){buildTree()}function buildTree(){i3GEO.arvoreDeTemas.ARVORE=new YAHOO.widget.TreeView(i3GEO.arvoreDeTemas.IDHTML)}buildTree()})();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca===true){insp="<br><br><table><tr>"+"<td><span style='font-size:12px'> "+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' > </a></span></td>"+"<td><input onclick='javascript:this.select();' class='digitar' type='text' id='i3geo_buscatema' size='15' value='' /></td>"+"<td><img class='tic' ";if(navm){insp+="style='top:0px;'"}else{insp+="style='top:4px;'"}insp+=" src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema2(document.getElementById(\"i3geo_buscatema\").value)' /></td>";insp+="</tr></table> ";tempNode=new YAHOO.widget.HTMLNode({html:insp,enableHighlight:false,expanded:false,hasIcon:false},root)}outrasOpcoes=i3GEO.arvoreDeTemas.outrasOpcoesHTML();if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde!==""){document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML=outrasOpcoes}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore===true){tempNode=new YAHOO.widget.HTMLNode({html:outrasOpcoes+" <br>",isLeaf:true,enableHighlight:false,expanded:false,hasIcon:false},root)}if(i3GEO.parametros.editor==="sim"){tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin' target=blank >Sistema de administração</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<a style='color:red' title='opção visível apenas para editores' href='../admin/html/arvore.html' target=blank >Editar árvore</a>",idmenu:"",enableHighlight:false,expanded:false},root);tempNode=new YAHOO.widget.HTMLNode({html:"<span style='color:red;cursor:pointer' title='opção visível apenas para editores' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/menus.html\")' target=blank >Editar menus</span>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.googleearth===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='"+i3GEO.configura.locaplic+"/kml.php?tipoxml=kml' target=blank > <img src='"+i3GEO.configura.locaplic+"/imagens/visual/default/branco.gif' class='abregoogleearth'> "+$trad("a13")+"</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.flutuante===true){tempNode=new YAHOO.widget.HTMLNode({html:"<a href='#' onclick='i3GEO.arvoreDeTemas.flutuante()' >Abrir em janela flutuante</a>",idmenu:"",enableHighlight:false,expanded:false},root)}if(i3GEO.arvoreDeTemas.INCLUIWMS===true){if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar lista' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/webservices.html?tipo=WMS\")' style='width:11px;position:relative;left:3px' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}tempNode=new YAHOO.widget.HTMLNode({html:"<b> OGC-WMS</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' > </a>"+editor,idwms:"raiz",expanded:false,enableHighlight:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS,1)}if(i3GEO.arvoreDeTemas.INCLUIESTRELAS===true){tempNode=new YAHOO.widget.HTMLNode({expanded:false,html:"<b> "+$trad("t46")+"</b> <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=95' > </a>",enableHighlight:false},root);ig=5;do{tempNode1=new YAHOO.widget.HTMLNode({expanded:false,html:"<img src='"+$im("e"+ig+".png")+"' />",enableHighlight:false,nivel:ig},tempNode);tempNode1.setDynamicLoad(i3GEO.arvoreDeTemas.listaEstrelas,1);ig-=1}while(ig>0)}dados=i3GEO.arvoreDeTemas.MENUS;c=dados.length;for(i=0,j=c;i<j;i+=1){if(!dados[i].nomemenu){dados[i].nomemenu=dados[i].idmenu}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar grupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+dados[i].idmenu+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(!dados[i].publicado){dados[i].publicado="sim"}if(dados[i].publicado.toLowerCase()!=="nao"){conteudo="<b> <span title='"+(dados[i].desc)+"'>"+dados[i].nomemenu+"</span>"+editor}else{conteudo="<b> <span title='nao publicado' ><s>"+dados[i].nomemenu+"</s></span>"+editor}tempNode=new YAHOO.widget.HTMLNode({html:conteudo,idmenu:dados[i].idmenu,enableHighlight:false,expanded:false},root);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos,1);if(dados[i].status==="aberto"){tempNode.expand()}}if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){retorno=function(){var sis,iglt,tempNode,ig,nomeSis,sisNode,funcoes,tempf,ig2,abre,nomeFunc;try{sis=i3GEO.arvoreDeTemas.SISTEMAS;iglt=sis.length;tempNode=new YAHOO.widget.HTMLNode({html:"<b>Sistemas</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' > </a>",expanded:false,enableHighlight:false},root)}catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return}ig=0;do{nomeSis=sis[ig].NOME;if(sis[ig].PUBLICADO){if(sis[ig].PUBLICADO.toLowerCase()==="nao"){nomeSis="<s>"+sis[ig].NOME+"</s>"}}sisNode=new YAHOO.widget.HTMLNode({html:nomeSis,expanded:false,enableHighlight:false},tempNode);funcoes=sis[ig].FUNCOES;tempf=funcoes.length;for(ig2=0;ig2<tempf;ig2+=1){abre="i3GEO.janela.cria('"+(funcoes[ig2].W)+"px','"+(funcoes[ig2].H)+"px','"+(funcoes[ig2].ABRIR)+"','','','Sistemas')";nomeFunc="<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";new YAHOO.widget.HTMLNode({html:nomeFunc,expanded:false,enableHighlight:false,isLeaf:true},sisNode)}ig+=1}while(ig<iglt);if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}};i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno)}document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===false){i3GEO.arvoreDeTemas.ARVORE.draw()}else{i3GEO.arvoreDeTemas.adicionaNoNavegacaoDir()}}},adicionaNoNavegacaoDir:function(){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir===true){var temp=function(){var drives,iglt,ig,drive,tempNode;drives=i3GEO.arvoreDeTemas.DRIVES;if(drives==undefined||drives==""||drives.length===0){i3GEO.arvoreDeTemas.ARVORE.draw();return}iglt=drives.length;tempNode=new YAHOO.widget.HTMLNode({html:" "+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' > </a>",enableHighlight:false,expanded:false},i3GEO.arvoreDeTemas.ARVORE.getRoot());ig=0;do{drive=new YAHOO.widget.HTMLNode({html:drives[ig].nome,caminho:drives[ig].caminho,enableHighlight:false,expanded:false},tempNode);drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1);ig+=1}while(ig<iglt);i3GEO.arvoreDeTemas.ARVORE.draw()};i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,temp)}},montaGrupos:function(node){var temp=function(){var grupos,c,raiz,nraiz,mostra,i,d,editor;grupos=i3GEO.arvoreDeTemas.GRUPOS.grupos;c=grupos.length-3;raiz=grupos[c].temasraiz;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra&&raiz[i].nome!=""){tempNode=new YAHOO.widget.HTMLNode({isLeaf:false,enableHighlight:false,expanded:false,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i])},node)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&grupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&grupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar subgrupos' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+grupos[i].id_n1+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&grupos[i].nome!=undefined){if(grupos[i].publicado){if(grupos[i].publicado==="NAO"){grupos[i].nome="<span title='nao publicado' ><s>"+grupos[i].nome+"</s></span>"}}d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:i};if(grupos[i].id_n1){d={html:grupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.enableHighlight=false;tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos,1);tempNode.isLeaf=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,temp)},montaSubGrupos:function(node){var temp=function(){var i,c,mostra,d,tempNode,nraiz,subgrupos,raiz;subgrupos=i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;c=subgrupos.length;raiz=i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;nraiz=raiz.length;for(i=0;i<nraiz;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&raiz[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&raiz[i].ogc==="nao"){mostra=false}if(mostra){tempNode=new YAHOO.widget.HTMLNode({nacessos:raiz[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]),idtema:raiz[i].tid,fonte:raiz[i].link,ogc:raiz[i].ogc,kmz:raiz[i].kmz,permitecomentario:raiz[i].permitecomentario,download:raiz[i].download,expanded:false,enableHighlight:false,isLeaf:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1)}}for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&subgrupos[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&subgrupos[i].ogc==="nao"){mostra=false}if(i3GEO.parametros.editor==="sim"){editor="<img title='Editar temas' onclick='i3GEO.arvoreDeTemas.abrejanelaIframe(\"900\",\"500\",\""+i3GEO.configura.locaplic+"/admin/html/arvore.html?id_menu="+node.data.idmenu+"&id_grupo="+node.data.idgrupo+"&id_subgrupo="+subgrupos[i].id_n2+"\")' style='width:11px;position:relative;left:3px;top:2px;' src='"+i3GEO.configura.locaplic+"/imagens/edit.gif' />"}else{editor=""}if(mostra&&subgrupos[i].nome!=undefined){if(subgrupos[i].publicado){if(subgrupos[i].publicado==="NAO"){subgrupos[i].nome="<span title='nao publicado' ><s>"+subgrupos[i].nome+"</s></span>"}}d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};if(subgrupos[i].id_n2){d={html:subgrupos[i].nome+editor,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2}}tempNode=new YAHOO.widget.HTMLNode(d,node,false,true);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas,1);tempNode.isLeaf=false;tempNode.enableHighlight=false}}node.loadComplete()};i3GEO.arvoreDeTemas.listaSubGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)},montaTemas:function(node){var temp=function(){var i,cor,temas,c,mostra,tempNode;temas=i3GEO.arvoreDeTemas.TEMAS.temas;c=temas.length;cor="rgb(51, 102, 102)";for(i=0;i<c;i+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&temas[i].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&temas[i].ogc==="nao"){mostra=false}if(mostra){if(temas[i].publicado){if(temas[i].publicado==="NAO"){temas[i].nome="<span title='nao publicado' ><s>"+temas[i].nome+"</s></span>"}}tempNode=new YAHOO.widget.HTMLNode({nacessos:temas[i].nacessos,html:i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]),idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz,download:temas[i].download,permitecomentario:temas[i].permitecomentario,bookmark:"sim",expanded:false,isLeaf:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.propTemas,1);cor=(cor==="rgb(51, 102, 102)")?"rgb(47, 70, 50)":"rgb(51, 102, 102)"}}node.loadComplete()};i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)},montaDir:function(node){var montaLista=function(retorno){var ig,conteudo,dirs,tempNode,arquivos;dirs=retorno.data.diretorios;for(ig=0;ig<dirs.length;ig+=1){tempNode=new YAHOO.widget.HTMLNode({html:dirs[ig],caminho:node.data.caminho+"/"+dirs[ig],expanded:false,enableHighlight:false},node);tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir,1)}arquivos=retorno.data.arquivos;for(ig=0;ig<arquivos.length;ig+=1){conteudo=arquivos[ig];if(conteudo.search(".img")>1||conteudo.search(".tif")>1||conteudo.search(".TIF")>1||conteudo.search(".shp")>1||conteudo.search(".SHP")>1){conteudo="<a href='#' title='"+$trad("g2")+"' onclick='i3GEO.util.adicionaSHP(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:conteudo,caminho:node.data.caminho+"/"+conteudo},node)}}node.loadComplete()};i3GEO.php.listaarquivos(montaLista,node.data.caminho)},montaTextoTema:function(cor,tema){var html,estilo="",clique;if(navm){estilo="padding-top:1px;"}html="<td style='"+estilo+"'><span>";if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+="<input title='"+tema.tid+"' style='width:12px;height:12px;cursor:pointer;border:solid 0 white;' "}else{html+="<img title='"+tema.tid+"' src='"+$im("down1.gif")+"'"}if(i3GEO.arvoreDeTemas.ATIVATEMA!==""){clique="onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\""}else{if(i3GEO.arvoreDeTemas.ATIVATEMAIMEDIATO===false){clique="onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeTemas.adicionaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicar\",this)'"}else{clique="onclick='i3GEO.arvoreDeTemas.adicionaTemas([\""+tema.tid+"\"])'"}}html+=clique;if(i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html+=" type='"+i3GEO.arvoreDeTemas.TIPOBOTAO+"' value='"+tema.tid+"' />"}else{html+=" /> "}html+="</td><td title='"+tema.tid+"' onmouseout='javascript:this.style.color=\""+cor+"\";' onmouseover='javascript:this.style.color=\"blue\";' style='cursor:pointer;font-size:11px;text-align:left;color:"+cor+";padding-left:0px;' "+clique+">";html+=tema.nome;html+="</td></span>";return(html)},propTemas:function(node){var html,lkmini,lkmini1,lkgrcode,lkgrcode1,n,ogc;if(node.data.fonte&&node.data.fonte!==""&&node.data.fonte!==" "){tempNode=new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini===true){lkmini=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";lkmini1=i3GEO.arvoreDeTemas.LOCAPLIC+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>"},node)}if(node.data.ogc&&node.data.ogc!=="nao"){if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";if(node.data.kmz.toLowerCase()==="sim"){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>"}new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}ogc=i3GEO.arvoreDeTemas.LOCAPLIC+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='getcapabilities' href='"+ogc+"' target='blank' >WMS - OGC</a>"},node)}if(node.data.download&&node.data.download.toLowerCase()!=="nao"&&i3GEO.arvoreDeTemas.TIPOBOTAO!=="download"){html="<a href='"+i3GEO.configura.locaplic+"/datadownload.htm?"+node.data.idtema+"' target='_blank'>Download</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(node.data.permitecomentario&&node.data.permitecomentario!=="nao"&&i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios===true){html="<a href='#' title='' onclick='i3GEO.tema.dialogo.comentario(\""+node.data.idtema+"\",\"comentario\")' >"+$trad("x19")+"</a>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode===true){lkgrcode=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_html.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface=openlayers_t.htm&temasa="+node.data.idtema+"&layers="+node.data.idtema;lkgrcode1=i3GEO.arvoreDeTemas.LOCAPLIC+"/pacotes/qrcode/php/qr_img.php?d="+i3GEO.arvoreDeTemas.LOCAPLIC+"/ms_criamapa.php?interface=openlayers_t.htm&temasa="+node.data.idtema+"&layers="+node.data.idtema;new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:"<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>"},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas===true){n=parseInt(node.data.nacessos/(i3GEO.arvoreDeTemas.FATORESTRELA*1),10);if(n>=5){n=5}html=(n>0)?"<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>":"<img src='"+i3GEO.util.$im("e0.png")+"'/>";new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.bookmark===true){html=i3GEO.social.bookmark(i3GEO.configura.locaplic+"/ms_criamapa.php?layers="+node.data.idtema);new YAHOO.widget.HTMLNode({isLeaf:true,enableHighlight:false,expanded:false,html:html},node)}node.loadComplete()},outrasOpcoesHTML:function(){var ins="",t=0,imb=i3GEO.util.$im("branco.gif"),OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS,estilo=function(i){return" onmouseout='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOut\";' onmouseover='javascript:this.className = \""+i+" iconeMini iconeGuiaMovelMouseOver\";' class='"+i+" iconeMini iconeGuiaMovelMouseOut' src='"+imb+"' style='cursor:pointer;text-align:left' "};if(OPCOESADICIONAIS.refresh===true){ins+="<td><img "+estilo("refresh")+" onclick='i3GEO.arvoreDeTemas.atualiza()' title='Refresh'/></td>";t+=20}if(OPCOESADICIONAIS.uploadarquivo===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectaservico()' title='"+$trad("a15")+"'/></td>";t+=20;ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadarquivo()' title='"+$trad("a14")+"'/></td>";t+=20}else{if(OPCOESADICIONAIS.uploadgpx===true){ins+="<td><img "+estilo("uploadgpx")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' title='upload GPX'/></td>";t+=20}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<td><img "+estilo("uploaddbf")+" onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' title='"+$trad("a2b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.uploadlocal===true){ins+="<td><img "+estilo("upload")+" onclick='i3GEO.arvoreDeTemas.dialogo.upload()' title='"+$trad("a2")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carregaKml===true){ins+="<td><img "+estilo("carregarKml")+" onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' title='Kml'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwms===true){ins+="<td><img "+estilo("conectarwms")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' title='"+$trad("a4")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<td><img "+estilo("conectarwmst")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' title='"+$trad("a4b")+"'/></td>";t+=20}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<td><img "+estilo("conectargeorss")+" onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' title='"+$trad("a5")+"'/></td>";t+=20}}if(OPCOESADICIONAIS.downloadbase===true){ins+="<td><img "+estilo("download")+" onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' title='"+$trad("a3")+"'/></td>";t+=20}if(OPCOESADICIONAIS.importarwmc===true){ins+="<td><img "+estilo("importarwmc")+" onclick='i3GEO.arvoreDeTemas.dialogo.importarwmc()' title='"+$trad("a3a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTags===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.nuvemTagsFlash===true){ins+="<td><img "+estilo("nuvemtags")+" onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTagsFlash()' title='"+$trad("a5a")+"'/></td>";t+=20}if(OPCOESADICIONAIS.carousel===true){ins+="<td><img "+estilo("carouselTemas")+" onclick='i3GEO.arvoreDeTemas.dialogo.carouselTemas()' title='Miniaturas'/></td>";t+=20}if(OPCOESADICIONAIS.inde===true){ins+="<td><img "+estilo("buscaInde")+" onclick='i3GEO.arvoreDeTemas.dialogo.buscaInde()' title='Pesquisa na INDE'/></td>";t+=20}return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>")},desativaCheckbox:function(){var o,inputs,n,i;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;do{inputs[i].checked=false;i+=1}while(i<n)},listaTemasAtivos:function(){var o,inputs,n,i,lista;o=document.getElementById(i3GEO.arvoreDeTemas.ARVORE.id);inputs=o.getElementsByTagName("input");n=inputs.length;i=0;lista=[];do{if(inputs[i].checked===true){lista.push(inputs[i].value)}i+=1}while(i<n);return(lista)},buscaTema:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var mostra,tempNode,d,conta,ig,ngSgrupo,tempn,sg,ngTema,tempng,st,lk="";if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{ngSgrupo=retorno[ig].subgrupos;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}conta+=1}}}while(ig--)}else{d="<span style='color:red'>Nada encontrado<br><br></span>";tempNode=new YAHOO.widget.HTMLNode(d,nodePalavra,false,true);tempNode.isLeaf=true;tempNode.enableHighlight=false}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({html:"Temas encontrados",id:"temasEncontrados"},root,false,true);tempNode.enableHighlight=false}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({html:palavra},tempNode,false,true);nodePalavra.enableHighlight=false;i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},buscaTema2:function(palavra){if(palavra===""){return}var busca,root,nodePalavra="";resultadoProcurar=function(retorno){var ig,montaTexto=function(ngSgrupo){var tempn,ngTema,tempng,mostra,d,lk="",st,sg;tempn=ngSgrupo.length;for(sg=0;sg<tempn;sg+=1){ngTema=ngSgrupo[sg].temas;tempng=ngTema.length;for(st=0;st<tempng;st+=1){mostra=true;try{if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD&&ngTema[st].download==="nao"){mostra=false}if(i3GEO.arvoreDeTemas.FILTRAOGC&&ngTema[st].ogc==="nao"){mostra=false}}catch(e){}if(mostra){d=i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);if(ngTema[st].link!==" "){lk="<a href='"+ngTema[st].link+"' target='blank'> fonte</a>"}if(ngSgrupo[sg].subgrupo){d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].subgrupo)+") "+lk+"</td>"}else{d+="<td style='text-allign:left'> ("+(ngSgrupo[sg].grupo)+")"+lk+"</td>"}new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,html:d,expanded:false},nodePalavra)}conta+=1}}};if(!retorno.data){alert("Ocorreu um erro")}else{retorno=retorno.data;conta=0;if((retorno!=="erro")&&(typeof(retorno)!=='undefined')){ig=retorno.length-1;if(ig>=0){do{montaTexto([retorno[ig]]);montaTexto(retorno[ig].subgrupos)}while(ig--)}else{new YAHOO.widget.HTMLNode({enableHighlight:false,isLeaf:true,expanded:false,html:"<span style='color:red'>Nada encontrado<br><br></span>"},nodePalavra)}}}nodePalavra.loadComplete()};busca=function(){i3GEO.php.procurartemas2(resultadoProcurar,i3GEO.util.removeAcentos(palavra))};i3GEO.arvoreDeTemas.ARVORE.collapseAll();root=i3GEO.arvoreDeTemas.ARVORE.getRoot();if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){tempNode=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:"Temas encontrados",id:"temasEncontrados"},root)}else{tempNode=i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")}nodePalavra=new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:palavra},tempNode);i3GEO.arvoreDeTemas.ARVORE.draw();tempNode.expand();nodePalavra.setDynamicLoad(busca,1);nodePalavra.expand()},adicionaTemas:function(tsl){var temp;try{clearTimeout(tempoBotaoAplicar)}catch(e){}tempoBotaoAplicar="";i3GEO.mapa.ativaTema("");if(arguments.length!==1){tsl=i3GEO.arvoreDeTemas.listaTemasAtivos()}if(tsl.length===1&&i3GEO.arvoreDeCamadas.pegaTema(tsl[0])!==""){temp=window.confirm("O tema existe no mapa. Adiciona novamente?");if(!temp){return}}if(tsl.length>0){temp=function(retorno){i3GEO.atualiza();if(i3GEO.arvoreDeTemas.RETORNAGUIA!==""){if(i3GEO.arvoreDeTemas.RETORNAGUIA!==i3GEO.guias.ATUAL){i3GEO.guias.escondeGuias();i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA)}}try{if($i("i3GEOidentificalistaTemas")){i3GEOF.identifica.listaTemas();g_tipoacao="identifica"}}catch(r){}};i3GEO.php.adtema(temp,tsl.toString())}},comboMenus:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){i3GEO.configura.locaplic=locaplic;var combo=function(retorno){var ob,ins,ig;ob=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";for(ig=0;ig<ob.length;ig+=1){if(ob[ig].publicado!=="nao"&&ob[ig].publicado!=="NAO"){if(ob[ig].nomemenu){ins+="<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>"}}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistademenus(combo)},comboGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){i3GEO.configura.locaplic=locaplic;i3GEO.arvoreDeTemas.temasRaizGrupos=[];var combo=function(retorno){var ins,ig,obGrupos=retorno.data;ins="<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";for(ig=0;ig<obGrupos.grupos.length;ig+=1){if(obGrupos.grupos[ig].nome){ins+="<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>"}i3GEO.arvoreDeTemas.temasRaizGrupos[obGrupos.grupos[ig].id_n1]=obGrupos.grupos[ig].temasgrupo}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadegrupos(combo,id_menu,"nao")},comboSubGruposMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){if(idGrupo!==""){var combo=function(retorno){var ins,sg,ig;ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(\""+idGrupo+"\",this.value)' ><option value='' >Escolha um sub-grupo:</option>";if(retorno.data.subgrupo){sg=retorno.data.subgrupo;for(ig=0;ig<sg.length;ig+=1){ins+="<option value="+sg[ig].id_n2+" >"+sg[ig].nome+"</option>"}}$i(idDestino).innerHTML=ins+"</select>"};i3GEO.php.pegalistadeSubgrupos(combo,"",idGrupo)}},comboTemasMenu:function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,idSubGrupo,largura,altura,id_menu,temas){var combo=function(retorno){var ins,sg,ig;if(idSubGrupo!=""){ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+","+idSubGrupo+",this.value)' ><option value='' >Escolha um tema:</option>"}else{ins="<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",\"\",this.value)' ><option value='' >Escolha um tema:</option>"}if(typeof(retorno.data)!=='undefined'){retorno=retorno.data.temas}sg=retorno.length;for(ig=0;ig<sg;ig+=1){ins+="<option value="+retorno[ig].tid+" >"+retorno[ig].nome+"</option>"}$i(idDestino).innerHTML=ins+"</select>"};if(typeof(temas)==='undefined'||temas===""){i3GEO.php.pegalistadetemas(combo,id_menu,idGrupo,idSubGrupo)}else{combo(temas)}},dialogo:{uploadarquivo:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFuploadarquivo")};titulo="Upload de arquivo</a>";janela=i3GEO.janela.cria("250px","150px","","","",titulo,"i3GEOFuploadarquivo",false,"hd",cabecalho,minimiza);$i("i3GEOFuploadarquivo_corpo").style.backgroundColor="white";$i("i3GEOFuploadarquivo_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de arquivo</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.uploadlocal===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.upload()' /></td>"+" <td>Shape file</td>"+" </tr>"}if(OPCOESADICIONAIS.uploaddbf===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' /></td>"+" <td>DBF ou CSV</td>"+" </tr>"}if(OPCOESADICIONAIS.uploadgpx===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadgpx()' /></td>"+" <td>GPX</td>"+" </tr>"+" <tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivo onclick='i3GEO.arvoreDeTemas.dialogo.uploadkml()' /></td>"+" <td>KML ou KMZ</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},conectaservico:function(){var janela,ins,titulo,cabecalho,minimiza,OPCOESADICIONAIS=i3GEO.arvoreDeTemas.OPCOESADICIONAIS;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOFconectaservico")};titulo="Conexão com serviços</a>";janela=i3GEO.janela.cria("260px","150px","","","",titulo,"i3GEOFconectaservico",false,"hd",cabecalho,minimiza);$i("i3GEOFconectaservico_corpo").style.backgroundColor="white";$i("i3GEOFconectaservico_corpo").style.overflow="hidden";ins=""+" <p class=paragrafo style='width:90%' ><b>Tipo de conex&aatilde;o</b><br><br>"+" <table class=lista6 style=left:20px;position:relative >";if(OPCOESADICIONAIS.carregaKml===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.carregaKml()' /></td>"+" <td>KML</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwms===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' /></td>"+" <td>WMS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectarwmst===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' /></td>"+" <td>WMS-T</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeorss===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' /></td>"+" <td>GeoRSS</td>"+" </tr>"}if(OPCOESADICIONAIS.conectargeojson===true){ins+="<tr>"+" <td><input type=radio style=cursor:pointer name=i3GEOFtipoArquivoc onclick='i3GEO.arvoreDeTemas.dialogo.conectargeojson()' /></td>"+" <td>GeoJson</td>"+" </tr>"}ins+=" </table>";$i(janela[2].id).innerHTML=ins},carregaKml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carregakml/index.js","i3GEOF.carregakml.criaJanelaFlutuante()","i3GEOF.carregakml_script")},carouselTemas:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/carouseltemas/index.js","i3GEOF.carouseltemas.criaJanelaFlutuante()","i3GEOF.carouseltemas_script")},buscaInde:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/buscainde/index.js","i3GEOF.buscainde.criaJanelaFlutuante()","i3GEOF.buscainde_script")},nuvemTags:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/nuvemtags/index.js","i3GEOF.nuvemtags.criaJanelaFlutuante()","i3GEOF.nuvemtags_script")},nuvemTagsFlash:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/nuvemtagsflash/index.htm","","","Nuvem Flash")},navegacaoDir:function(){i3GEO.janela.cria("550px","350px",i3GEO.configura.locaplic+"/ferramentas/navegacaodir/index.htm","","","Diretórios")},importarwmc:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/importarwmc/index.js","i3GEOF.importarwmc.criaJanelaFlutuante()","i3GEOF.importarwmc_script")},conectarwms:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwms/index.htm","","","Conexão WMS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=28' > </a>")},conectarwmst:function(){var l,a;if(i3GEO.parametros.w){l=i3GEO.parametros.w+150}else{l=400}if(i3GEO.parametros.h){a=i3GEO.parametros.h+200}else{a=350}i3GEO.janela.cria(l/2+"px",a/2+"px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' > </a>")},conectarwfs:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectarwfs/index.htm","","","WFS")},conectargeojson:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/conectargeojson/index.js","i3GEOF.conectargeojson.criaJanelaFlutuante()","i3GEOF.conectargeojson_script")},conectargeorss:function(){i3GEO.janela.cria("400px","300px",i3GEO.configura.locaplic+"/ferramentas/conectargeorss/index.htm","","","Conexão GeoRSS <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=29' > </a>")},upload:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/upload/index.js","i3GEOF.upload.criaJanelaFlutuante()","i3GEOF.upload_script")},uploaddbf:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploaddbf/index.js","i3GEOF.uploaddbf.criaJanelaFlutuante()","i3GEOF.uploaddbf_script")},downloadbase:function(){window.open(i3GEO.configura.locaplic+"/datadownload.htm")},uploadgpx:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadgpx/index.js","i3GEOF.uploadgpx.criaJanelaFlutuante()","i3GEOF.uploadgpx_script")},uploadkml:function(){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/ferramentas/uploadkml/index.js","i3GEOF.uploadkml.criaJanelaFlutuante()","i3GEOF.uploadkml_script")}},abrejanelaIframe:function(w,h,s){var janelaeditor=i3GEO.janela.cria(w,h,s,parseInt(Math.random()*100,10),10,s,"janela"+i3GEO.util.randomRGB(),false);YAHOO.util.Event.addListener(janelaeditor[0].close,"click",i3GEO.arvoreDeTemas.atualiza,janelaeditor[0].panel,{id:janelaeditor[0].id},true)}}; | |
369 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.barraDeBotoes={ATIVA:true,TIPO:"yui",OFFSET:-205,MAXBOTOES:11,AJUDA:true,ORIENTACAO:"vertical",HORIZONTALW:350,TIPOAJUDA:"balao",SOICONES:false,AUTOALTURA:false,TRANSICAOSUAVE:true,OPACIDADE:65,PERMITEFECHAR:true,PERMITEDESLOCAR:true,ATIVAMENUCONTEXTO:false,AUTO:false,LISTABOTOES:i3GEO.configura.funcoesBotoes.botoes,INCLUIBOTAO:{localizar:true,zoomli:true,zoomiauto:false,zoomoauto:false,pan:true,zoomtot:true,identifica:true,identificaBalao:true,mede:true,area:true,imprimir:true,selecao:true,google:true,barraedicao:true,referencia:true,exten:true,inserexy:true,textofid:true,reinicia:true,buscafotos:true,wiki:true,metar:true,lentei:true,confluence:true,inseregrafico:true,v3d:true},ICONEBOTAO:{zoomli:"/imagens/gisicons/eudock/zoom-region.png",zoomiauto:"/imagens/gisicons/eudock/zoom-in.png",zoomoauto:"/imagens/gisicons/eudock/zoom-out.png",pan:"/imagens/gisicons/eudock/pan.png",zoomtot:"/imagens/gisicons/eudock/zoom-extent.png",identifica:"/imagens/gisicons/eudock/identify.png",identificaBalao:"/imagens/gisicons/eudock/tips.png",mede:"/imagens/gisicons/eudock/length-measure.png",area:"/imagens/gisicons/eudock/area-measure.png",imprimir:"/imagens/gisicons/eudock/print.png",reinicia:"/imagens/gisicons/eudock/redraw.png",exten:"/imagens/gisicons/eudock/map-extent-info.png",referencia:"/imagens/gisicons/eudock/map-reference.png",inserexy:"/imagens/gisicons/eudock/point-create.png",textofid:"/imagens/gisicons/eudock/text-add.png",selecao:"/imagens/gisicons/eudock/select.png",google:"/imagens/gisicons/eudock/google-map.png",buscafotos:"/imagens/gisicons/eudock/fotos.png",wiki:"/imagens/gisicons/eudock/wiki.png",metar:"/imagens/gisicons/eudock/metar.png",lentei:"/imagens/gisicons/eudock/lente.png",confluence:"/imagens/gisicons/eudock/confluence.png",inseregrafico:"/imagens/gisicons/eudock/grafico.png",v3d:"/imagens/gisicons/eudock/v3d.png",barraedicao:"/imagens/gisicons/eudock/editopen.png",localizar:"/imagens/gisicons/eudock/search.png"},TEMPLATEBOTAO:"",BOTAOPADRAO:"pan",COMPORTAMENTO:"padrao",BARRAS:[],BOTAOCLICADO:"",ativaPadrao:function(){if(i3GEO.barraDeBotoes.ATIVA===true){try{var botao=i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO);if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}}},ativaIcone:function(icone){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.Interface.ATUAL==="openlayers"){try{i3GEO.Interface.openlayers.OLzoom.deactivate()}catch(e){}}var estilo,temp,ist,cor,ko;this.BOTAOCLICADO=icone;ko=this.LISTABOTOES.length-1;if(this.COMPORTAMENTO==="padrao"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(this.LISTABOTOES[ko].tipo==="dinamico"&&temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white';if(this.SOICONES===true){ist.borderLeftColor='rgb(50,50,50)';ist.borderBottomColor='rgb(50,50,50)'}}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='white';estilo.borderWidth="1px"}}}if(this.COMPORTAMENTO==="destacado"){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;ist.borderWidth="1px";ist.borderColor='white'}}while(ko--)}if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}}}if(i3GEO.util.in_array(this.COMPORTAMENTO,["laranja","vermelho","cinza"])){if(ko>=0){do{temp=$i(this.LISTABOTOES[ko].iddiv);if(temp){ist=temp.style;if(this.SOICONES===false){ist.borderWidth="1px";ist.borderColor='white';ist.backgroundColor='white'}else{ist.backgroundColor=''}}}while(ko--)}switch(this.COMPORTAMENTO){case"laranja":cor="orange";break;case"vermelho":cor="red";break;case"cinza":cor="gray";break;default:cor="yellow"};if($i(icone)){estilo=$i(icone).style;if(this.SOICONES===false){estilo.borderColor='black';estilo.borderWidth="1px"}estilo.backgroundColor=cor}}},ativaBotoes:function(padrao){var l,b,temp;if(arguments.length===0){padrao=this.BOTAOPADRAO}this.BOTAOCLICADO=padrao;l=this.LISTABOTOES;b=l.length-1;if(b>=0){do{temp=$i(l[b].iddiv);if(temp){if(l[b].conteudo){temp.innerHTML=l[b].conteudo}if(l[b].dica){eval('$i("'+l[b].iddiv+'").onmouseover = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"'+l[b].dica+'",e);}');eval('$i("'+l[b].iddiv+'").onmouseout = function(e){i3GEO.barraDeBotoes.mostraJanela(this,"",e);};')}if(l[b].funcaoonclick){temp.onclick=l[b].funcaoonclick;if(l[b].iddiv==padrao){l[b].funcaoonclick()}}if(l[b].constroiconteudo){eval(l[b].constroiconteudo)}}YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.preventDefault);YAHOO.util.Event.addListener($i(l[b].iddiv),"click",YAHOO.util.Event.stopPropagation);YAHOO.util.Event.addFocusListener($i(l[b].iddiv),YAHOO.util.Event.preventDefault)}while(b--)}if(padrao===""){this.ativaIcone("")}},execBotao:function(id,x,y,posX,posY){if(i3GEO.barraDeBotoes.ATIVA===false){return}var temp,botao=i3GEO.barraDeBotoes.defBotao(id);i3GEO.barraDeBotoes.BOTAOCLICADO=id;if(botao===false){return}try{if(botao.tipo==="dinamico"&&x){i3GEO.util.criaPin("i3geoMarcaIcone",i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png","10px","10px");temp=$i("i3geoMarcaIcone");if(temp){temp.style.display="block";temp.style.top=posY+43+"px";temp.style.left=posX+18+"px"}}if(botao.funcaoonclick){botao.funcaoonclick.call()}}catch(e){}},defBotao:function(iddiv){var l=i3GEO.barraDeBotoes.LISTABOTOES,b=l.length-1;if(b>=0){do{temp=l[b].iddiv;if(l[b].iddiv===iddiv){return l[b]}}while(b--)}return false},inicializaBarraOP:function(){if(i3GEO.barraDeBotoes.ATIVA===false){return}i3GEO.barraDeBotoes.AJUDA=false;euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/";var botao,dica,titulo,i,dock=new euDock(),temp="dockBg-r.png",chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,preload;preload=new Image();preload.src=i3GEO.configura.locaplic+"/imagens/gisicons/eudock/sobe1.png";dock.setObjectAlign(i3GEO.Interface.IDCORPO,euDOWN,(parseInt(document.body.style.height,10))*-1+i3GEO.barraDeBotoes.OFFSET,euUP);if(i3GEO.barraDeBotoes.MAXBOTOES>=chaves.length){temp="dockBg-r2.png"}dock.setBar({left:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-l.png"}},horizontal:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/dockBg-c-o.png"}},right:{euImage:{image:i3GEO.configura.locaplic+"/pacotes/eudock/barImages/"+temp}}});dock.setIconsOffset(7);if(i3GEO.barraDeBotoes.MAXBOTOES>0){n=i3GEO.barraDeBotoes.MAXBOTOES}for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX,posY){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX,posY)},idBotao:chaves[i],dica:dica,titulo:titulo})}}$i(euEnv.euDockArray.euDock_0.bar.elementsArray.left.id).onclick=function(){i3GEO.ajuda.ATIVAJANELA=true;i3GEO.ajuda.abreJanela()};$i(euEnv.euDockArray.euDock_0.bar.elementsArray.right.id).onclick=function(){var dica,titulo,chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO),n=chaves.length,nb=euEnv.euDockArray.euDock_0.iconsArray.length,i;if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}if(nb!==i3GEO.barraDeBotoes.MAXBOTOES){i3GEO.barraDeBotoes.recria()}if(i3GEO.barraDeBotoes.MAXBOTOES>0&&n>nb){for(i=nb;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]&&i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){botao=i3GEO.barraDeBotoes.defBotao(chaves[i]);if(botao===false){dica="";titulo=""}else{if(botao.dica){dica=botao.dica}else{dica=""}if(botao.titulo!=undefined){titulo=botao.titulo}else{titulo=""}}dock.addIcon(new Array({euImage:{image:i3GEO.configura.locaplic+i3GEO.barraDeBotoes.ICONEBOTAO[chaves[i]]}}),{mouseInsideClick:function(x,y,id,posX){i3GEO.barraDeBotoes.execBotao(euEnv.euDockArray[id].idBotao,x,y,posX)},idBotao:chaves[i],dica:dica,titulo:titulo})}}}};if(!$i("euDockMensagem")){temp=document.createElement("div");temp.style.top="38px";temp.style.color="gray";temp.style.textAlign="center";temp.style.fontSize="10px";temp.innerHTML="";temp.id="euDockMensagem";euEnv.euDockArray.euDock_0.div.appendChild(temp)}},inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.configura.map3d===""){i3GEO.barraDeBotoes.INCLUIBOTAO.v3d=false}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){i3GEO.barraDeBotoes.inicializaBarraOP()}else{if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===false){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}if(this.TEMPLATEBOTAO===""&&i3GEO.Interface.TABLET===true){this.TEMPLATEBOTAO="<div style='display:inline;background-color:rgb(250,250,250);'><img style='margin:4px;border:0px solid white;' src='"+i3GEO.configura.locaplic+"/imagens/branco.gif' id='$$'/></div>"}var ticone,tipo,mostra,i,temp,e,wj,recuo,novoel,alturadisponivel,n,chaves,elementos="",numerobotoes=0,nelementos=0,Dom=YAHOO.util.Dom,branco=i3GEO.configura.locaplic+'/imagens/branco.gif';if(navm){i3GEO.barraDeBotoes.TRANSICAOSUAVE=false}if(this.AUTO===true){if(idconteudo==="barraDeBotoes1"){novoel=document.createElement("div");novoel.id="barraDeBotoes1";temp='<table style="width:100%"><tr><td style="background-color:rgb(250,250,250);"><div ID="historicozoom" ></div></td></tr><tr><td style=height:5px ></td></tr></table>'+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="zoom" alt="zoom" src="'+branco+'" id="zoomli"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="desloca" alt="desloca" src="'+branco+'" id="pan"/>'+"</div>"+"<div style='display:inline;background-color:rgb(250,250,250);'>"+'<img title="geral" alt="geral" src="'+branco+'" id="zoomtot"/>'+"</div>";novoel.innerHTML=temp;document.body.appendChild(novoel)}if(idconteudo==="barraDeBotoes2"){temp="";chaves=i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO);n=chaves.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]]===true){temp+=i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i])}}if(typeof(onde)==='undefined'){novoel=document.createElement("div");novoel.id="barraDeBotoes2";novoel.innerHTML="<table style='width:100%'>"+"<tr><td style='background-color:rgb(250,250,250);'><img title='' alt='sobe' src='"+branco+"' id='sobeferramentas'/></td></tr>"+"</table>"+temp+"<table style='width:100%;'><tr><td style='background-color:rgb(250,250,250);'><img title='desce' alt='' src='"+branco+"' id='desceferramentas'/></td></tr></table>";document.body.appendChild(novoel)}else{$i(onde).innerHTML=temp;return}}}else{if(idconteudo==="barraDeBotoes2"&&onde!==undefined){$i(onde).innerHTML=$i(idconteudo)}}wj="36px";recuo="0px";novoel=document.createElement("div");novoel.id=idconteudonovo;novoel.style.display="block";if(this.SOICONES===false){novoel.style.border="1px solid gray";novoel.style.background="white"}else{novoel.style.border="0px solid white"}if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){Dom.setStyle(novoel,"opacity",this.OPACIDADE/100)}temp="";if(barraZoom===true){temp+=i3GEO.navega.barraDeZoom.cria()}temp+='<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:0px;" ></div>';novoel.innerHTML=temp;novoel.onmouseover=function(){YAHOO.util.Dom.setStyle("i3geo_rosa","display","none");if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",1)}if(i3GEO.Interface.TABLET===true){}};novoel.onmouseout=function(){if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){YAHOO.util.Dom.setStyle(novoel,"opacity",i3GEO.barraDeBotoes.OPACIDADE/100)}if(i3GEO.Interface.TABLET===true){}};document.body.appendChild(novoel);if(this.ATIVAMENUCONTEXTO){i3GEO.util.mudaCursor(i3GEO.configura.cursores,"contexto",idconteudonovo,i3GEO.configura.locaplic)}ticone=28;alturadisponivel=i3GEO.parametros.h-i3GEO.Interface.BARRABOTOESTOP-ticone-38-38;if(this.AUTOALTURA===true){alturadisponivel+=28}numerobotoes=parseInt(alturadisponivel/ticone,10);if($i(idconteudo)){$i(idconteudonovo+"_").innerHTML=$i(idconteudo).innerHTML;$i(idconteudo).innerHTML="";elementos=$i(idconteudonovo+"_").getElementsByTagName("img");nelementos=elementos.length;if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){numerobotoes=100}if(this.AUTOALTURA===true||(numerobotoes<nelementos)){if(elementos[0].id==="sobeferramentas"){try{elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;i=0;do{elementos[i].style.display="none";i=i+1}while(i<nelementos);i=0;do{if(elementos[i]!=undefined){elementos[i].style.display="inline"}i=i+1}while(i<numerobotoes-1)}catch(men){}}}if(elementos.length<=numerobotoes){Dom.setStyle(["sobeferramentas","desceferramentas"],"display","none")}}YAHOO.namespace("i3GEO.janela.botoes");if(i3GEO.barraDeBotoes.ORIENTACAO==="horizontal"){YAHOO.i3GEO.janela.botoes=new YAHOO.widget.Panel(idconteudonovo,{zIndex:20000,height:40,width:i3GEO.barraDeBotoes.HORIZONTALW,fixedcenter:false,constraintoviewport:false,underlay:"none",close:i3GEO.barraDeBotoes.PERMITEFECHAR,visible:true,draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR,modal:false,iframe:false})}else{if(this.AUTOALTURA===false||barraZoom===true||(elementos.length>numerobotoes)){YAHOO.i3GEO.janela.botoes=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})}else{YAHOO.i3GEO.janela.botoes=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})}}if(this.SOICONES===true){Dom.setStyle(["i3geo_barra2","i3geo_barra1"],"borderWidth","0 0 0 0")}YAHOO.i3GEO.janela.botoes.render();YAHOO.i3GEO.janela.botoes.moveTo(x,y);if($i("sobeferramentas")){$i("sobeferramentas").onclick=function(){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");nelementos=elementos.length;if(elementos[0].style.display==="inline"&&elementos[0].id===""){return}if(nelementos>0){mostra=elementos[0];i=0;do{if(elementos[i].style){if(elementos[i].style.display==="inline"&&elementos[i].id===""){break}if(elementos[i].style.display==="none"&&elementos[i].id===""){mostra=elementos[i]}}i=i+1}while(i<nelementos);mostra.style.display="inline";i=nelementos+1;mostra=elementos[i];do{if(elementos[i]){if(elementos[i].style){if(elementos[i].style.display==="inline"){mostra=elementos[i];break}}}i=i-1}while(i>=0);mostra.style.display="none"}}}if($i("desceferramentas")){$i("desceferramentas").onclick=function(){tipo="inline";if($i(idconteudonovo+"_")){elementos=$i(idconteudonovo+"_").getElementsByTagName("div");if(elementos[elementos.length-1].style.display===tipo){return}nelementos=elementos.length;if(nelementos>0){i=0;do{e=elementos[i];if(e.style){if((e.style.display==="block")||(e.style.display==="inline")||(e.style.display==="")){if(e.id===""){e.style.display="none";break}}}i=i+1}while(i<nelementos);i=nelementos-1;var mostra=elementos[i];do{e=elementos[i];if(e.style){if(e.style.display===tipo){break}if(e.style.display==="none"){mostra=e}}i=i-1}while(i>=0);mostra.style.display=tipo}}}}this.BARRAS.push(YAHOO.i3GEO.janela.botoes);YAHOO.i3GEO.janela.botoes.show();if(i3GEO.Interface.TABLET===true){YAHOO.i3GEO.janela.botoes.moveTo((i3GEO.parametros.w/2)-(i3GEO.barraDeBotoes.HORIZONTALW/2),"")}if(this.ATIVAMENUCONTEXTO){this.ativaMenuContexto(idconteudonovo)}Dom.replaceClass(idconteudonovo+"_h","hd2")}},ativaMenuContexto:function(idbarra){if(i3GEO.barraDeBotoes.ATIVA===false){return}var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender;function executar(a,b,c){eval(c)}oFieldContextMenuItemData=[{text:" <span class='container-close'></span>"},{text:"Fechar barra",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.fecha('"+idbarra+"')"}},{text:"Barra normal",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=false;i3GEO.barraDeBotoes.PERMITEFECHAR=true;i3GEO.barraDeBotoes.PERMITEDESLOCAR=true;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Barra fixa",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.AUTOALTURA=true;i3GEO.barraDeBotoes.PERMITEFECHAR=false;i3GEO.barraDeBotoes.PERMITEDESLOCAR=false;i3GEO.barraDeBotoes.recria('"+idbarra+"')"}},{text:"Remove transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=false;"}},{text:"Ativa transição",onclick:{fn:executar,obj:"i3GEO.barraDeBotoes.TRANSICAOSUAVE=true;"}}];oFieldContextMenu=new YAHOO.widget.ContextMenu("contexto_"+idbarra,{trigger:idbarra,itemdata:oFieldContextMenuItemData,lazyload:true});onFieldMenuRender=function(){var id="contexto_"+idbarra;$i(id).style.zIndex=50000};oFieldContextMenu.subscribe("render",onFieldMenuRender)},reativa:function(indice){if(i3GEO.barraDeBotoes.ATIVA===false){return}var abre=function(){var i,n=i3GEO.barraDeBotoes.BARRAS.length;for(i=0;i<n;i+=1){if(i3GEO.barraDeBotoes.BARRAS[i]){i3GEO.barraDeBotoes.BARRAS[i].show()}}};try{if(arguments.length===1){i3GEO.barraDeBotoes.BARRAS[indice].show()}else{abre.call()}}catch(e){abre.call()}},recria:function(id){if(i3GEO.barraDeBotoes.ATIVA===false){return}if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){euEnv.euDockArray=[];euEnv.Kost.num=0;if($i("euDock_0_bar")){document.body.removeChild($i("euDock_0_bar").parentNode)}i3GEO.barraDeBotoes.inicializaBarra();if($i("i3geoMarcaIcone")){$i("i3geoMarcaIcone").style.display="none"}return}var i,n,temp,novoel,barraZoom,x,y,BARRAS=i3GEO.barraDeBotoes.BARRAS,iu=i3GEO.util;i3GEO.barraDeBotoes.BARRAS=[];n=BARRAS.length;for(i=0;i<n;i+=1){if(BARRAS[i]&&BARRAS[i].id===id){iu.removeChild("contexto_"+id);if(!$i("barraTemporaria"+i)){novoel=document.createElement("div");novoel.id="barraTemporaria"+i;document.body.appendChild(novoel)}novoel=$i("barraTemporaria"+i);novoel.innerHTML=$i(BARRAS[i].id+"_").innerHTML;barraZoom=false;temp=$i("vertMaisZoom");if(temp){temp=navm?temp.parentNode:temp.parentNode.parentNode;if(temp.id===id){barraZoom=true}}x=parseInt($i(BARRAS[i].id+"_c").style.left,10);y=parseInt($i(BARRAS[i].id+"_c").style.top,10);if(i3GEO.barraDeBotoes.PERMITEFECHAR===true){y=y-10}BARRAS[i].destroy();i3GEO.barraDeBotoes.inicializaBarra(novoel.id,BARRAS[i].id,barraZoom,x,y)}}i3GEO.barraDeBotoes.ativaBotoes()},fecha:function(id){var i,n=this.BARRAS.length;for(i=0;i<n;i+=1){if(this.BARRAS[i]&&this.BARRAS[i].id===id){$i(id+"_c").style.visibility="hidden"}}},mostraJanela:function(objeto,mensagem,evt){if(mensagem===""){try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}return}var divmensagem=$i("divMensagemBarraDeBotoes"),balloonAjuda,pos=YAHOO.util.Dom.getXY(objeto);if(this.AJUDA===false||$i("janelaMenTexto")){i3GEO.ajuda.mostraJanela(mensagem);i3GEO.barraDeBotoes.escondeJanelaAjuda();return}if(i3GEO.Interface.ATUAL==="googleearth"){objeto.title=mensagem;return}if(!divmensagem&&this.TIPOAJUDA!=="balao"){divmensagem=document.createElement("div");divmensagem.id="divMensagemBarraDeBotoes";divmensagem.style.border="0px solid rgb(120 120 120)";divmensagem.style.position="absolute";divmensagem.style.zIndex=20000;if($i("i3geo")){$i("i3geo").appendChild(divmensagem)}else{document.body.appendChild(divmensagem)}if(this.TIPOAJUDA==="horizontal"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("left.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}if(this.TIPOAJUDA==="vertical"){divmensagem.innerHTML="<table style='z-index:20000' ><tr><td id='imgMensagemBarraDeBotoes' style='background:none;padding-top:2px;padding-right:3px;vertical-align:top'><img src='"+$im("top.png")+"' ></td><td style='text-align:left;border-left:1px solid rgb(210,210,210)'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'></div></td></tr></table>"}}if(mensagem!==""){if(this.TIPOAJUDA!=="balao"){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none");if(this.TIPOAJUDA==="horizontal"){divmensagem.style.left=parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)+pos[0]+10+"px";divmensagem.style.top=pos[1]-2+(parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)/2)+"px"}if(this.TIPOAJUDA==="vertical"){divmensagem.style.left=(parseInt(YAHOO.util.Dom.getStyle(objeto,"width"),10)/2)+pos[0]-5+"px";divmensagem.style.top=pos[1]+5+parseInt(YAHOO.util.Dom.getStyle(objeto,"height"),10)+"px"}try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout("i3GEO.barraDeBotoes.mostraJanelaAjuda('"+mensagem+"');",5000)}else{hideAllTooltips();balloonAjuda=new Balloon();BalloonConfig(balloonAjuda,'GBubble');balloonAjuda.delayTime=0;balloonAjuda.stem=false;balloonAjuda.stemHeight=0;balloonAjuda.vOffset=-24;balloonAjuda.images=i3GEO.configura.locaplic+'/pacotes/balloon-tooltips/htdocs/images/GBubblec';mensagem="<table style='z-index:20000' ><tr><td style='text-align:left;'><span style='text-align:right;cursor:pointer;color:blue;' onclick='javascript:i3GEO.util.insereCookie(\"botoesAjuda\",\"nao\");i3GEO.barraDeBotoes.AJUDA = false;'>fecha</span><br><div style='vertical-align:middle;text-align:left;width:250px;border: 0px solid black;border-left:1px;' id='divMensagemBarraDeBotoesCorpo'>"+mensagem+"</div></td></tr></table>";try{clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeMostraAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup();balloonIsVisible=false;if(i3GEO.barraDeBotoes.TIPO==="olhodepeixe"){balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0],pos[1]-40)}else{balloonAjuda.showTooltip(objeto,mensagem,null,null,null,pos[0]+12,pos[1])}try{clearTimeout(timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){balloonAjuda.cleanup()},4000)},4000)}}},mostraJanelaAjuda:function(mensagem){$i("divMensagemBarraDeBotoesCorpo").innerHTML=mensagem;YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","block");try{clearTimeout(i3GEO.barraDeBotoes.timeMostraAjudaBotoes)}catch(e){}i3GEO.barraDeBotoes.timeAjudaBotoes=setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda()},3000)},escondeJanelaAjuda:function(){try{if(i3GEO.barraDeBotoes.timeAjudaBotoes){clearTimeout(i3GEO.barraDeBotoes.timeAjudaBotoes)}}catch(e){}if($i("divMensagemBarraDeBotoes")){YAHOO.util.Dom.setStyle("divMensagemBarraDeBotoes","display","none")}},editor:{inicia:function(){i3GEO.barraDeBotoes.editor.carregaJs("janelaEditorVetorial")},carregaJs:function(idjanela){if(!i3GEO.editorOL){i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/mashups/openlayers.js","i3GEO.barraDeBotoes.editor.ativaPainel('"+idjanela+"')","openlayers.js",true)}else{if(!i3GEO.editorOL.layergrafico){i3GEO.editorOL.criaLayerGrafico();i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico])}if(!i3GEO.editorOL.backup){i3GEO.editorOL.backup=new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false})}i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}},criaJanela:function(){if($i("i3GEOjanelaEditor")){return"i3GEOjanelaEditor"}var janela,divid,titulo,cabecalho,minimiza;cabecalho=function(){};minimiza=function(){i3GEO.janela.minimiza("i3GEOjanelaEditor")};titulo="Editor vetorial";janela=i3GEO.janela.cria("300px","200px","","","",titulo,"i3GEOjanelaEditor",false,"hd",cabecalho,minimiza);divid=janela[2].id;$i("i3GEOjanelaEditor_corpo").style.backgroundColor="white";$i("i3GEOjanelaEditor_corpo").style.textAlign="left";return divid},ativaPainel:function(idjanela){OpenLayers.ImgPath=i3GEO.configura.locaplic+"/pacotes/openlayers/img/";i3GEO.editorOL.fundo="";i3GEO.editorOL.mapa=i3geoOL;i3GEO.editorOL.maxext="";i3GEO.editorOL.controles=[];i3GEO.editorOL.botoes={'pan':false,'zoombox':false,'zoomtot':false,'legenda':false,'distancia':false,'area':false,'identifica':true,'linha':true,'ponto':true,'poligono':true,'texto':true,'corta':true,'edita':true,'listag':true,'selecao':true,'apaga':true,'procura':false,'propriedades':true,'salva':true,'ajuda':true,'fecha':true,'tools':true,'undo':true,'frente':true};var sketchSymbolizers={"Point":{fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}",strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",label:"${texto}",pointRadius:"${pointRadius}",graphicName:"${graphicName}",fontSize:"${fontSize}",fontColor:"rgb(${fontColor})",fontFamily:"Arial",fontWeight:"normal",labelAlign:"lb",labelXOffset:"3",labelYOffset:"3"},"Line":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})"},"Polygon":{strokeWidth:"${strokeWidth}",strokeOpacity:"${opacidade}",strokeColor:"rgb(${strokeColor})",fillColor:"rgb(${fillColor})",fillOpacity:"${opacidade}"}},style=new OpenLayers.Style(),styleMap1=new OpenLayers.StyleMap({"default":style});style.addRules([new OpenLayers.Rule({symbolizer:sketchSymbolizers})]);i3GEO.editorOL.layergrafico=new OpenLayers.Layer.Vector("Edição",{styleMap:styleMap1,displayInLayerSwitcher:false,visibility:true});i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]);i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes)}}}; | |
370 | 370 | function RichDrawEditor(elem,renderer){this.container=elem;this.gridX=10;this.gridY=10;this.mouseDownX=0;this.mouseDownY=0;this.mode='';this.fillColor='';this.lineColor='';this.lineWidth='';this.circColor='';this.textColor='';this.selected=null;this.selectedBounds={x:0,y:0,width:0,height:0};this.onselect=function(){};this.onunselect=function(){};this.renderer=renderer;this.renderer.init(this.container);this.fecha=function(){elem.innerHTML="";elem.style.display="none"}}RichDrawEditor.prototype.clearWorkspace=function(){this.container.innerHTML=''};RichDrawEditor.prototype.deleteSelection=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.renderer.remove(this.selected);this.selected=null}};RichDrawEditor.prototype.select=function(elem){if(elem==this.selected)return;this.selected=elem;this.renderer.showTracker(this.selected);this.onselect(this)};RichDrawEditor.prototype.unselect=function(){if(this.selected){this.renderer.remove(this.container.ownerDocument.getElementById('tracker'));this.selected=null;this.onunselect(this)}};RichDrawEditor.prototype.getSelectedElement=function(){return this.selected};RichDrawEditor.prototype.setGrid=function(horizontal,vertical){this.gridX=horizontal;this.gridY=vertical};RichDrawEditor.prototype.editCommand=function(cmd,value){if(cmd=='mode'){this.mode=value}else if(this.selected==null){if(cmd=='fillcolor'){this.fillColor=value}else if(cmd=='linecolor'){this.lineColor=value}else if(cmd=='textcolor'){this.textColor=value}else if(cmd=='circcolor'){this.circColor=value}else if(cmd=='linewidth'){this.lineWidth=parseInt(value)+'px'}}else{this.renderer.editCommand(this.selected,cmd,value)}};RichDrawEditor.prototype.queryCommand=function(cmd){if(cmd=='mode'){return this.mode}else if(this.selected==null){if(cmd=='fillcolor'){return this.fillColor}else if(cmd=='linecolor'){return this.lineColor}else if(cmd=='textcolor'){return this.textColor}else if(cmd=='circcolor'){return this.circColor}else if(cmd=='linewidth'){return this.lineWidth}}else{return this.renderer.queryCommand(this.selected,cmd)}};RichDrawEditor.prototype.onSelectStart=function(event){return false};RichDrawEditor.prototype.onClick=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousemove",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseDown=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;if(this.mode!='select'){this.unselect();this.mouseDownX=snappedX;this.mouseDownY=snappedY;this.selected=this.renderer.create(this.mode,this.fillColor,this.lineColor,this.lineWidth,this.mouseDownX,this.mouseDownY,1,1);this.selected.id='shape:'+createUUID();Event.observe(this.selected,"mousedown",this.onHitListener);Event.observe(this.container,"mousemove",this.onDrawListener)}else{if(this.mouseDownX!=snappedX||this.mouseDownY!=snappedY)this.unselect()}return false};RichDrawEditor.prototype.onMouseUp=function(event){Event.stopObserving(this.container,"mouseup",this.onDrawListener);Event.stopObserving(this.container,"mouseup",this.onDragListener);if(this.mode!='select'){this.selected=null}};RichDrawEditor.prototype.onDrag=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.move(this.selected,this.selectedBounds.x+deltaX,this.selectedBounds.y+deltaY);this.renderer.showTracker(this.selected)};RichDrawEditor.prototype.onResize=function(event){var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;var deltaX=snappedX-this.mouseDownX;var deltaY=snappedY-this.mouseDownY;this.renderer.track(handle,deltaX,deltaY);show_tracker()};RichDrawEditor.prototype.onDraw=function(event){if(this.selected==null)return;var offset=Position.cumulativeOffset(this.container);var snappedX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;var snappedY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;this.renderer.resize(this.selected,this.mouseDownX,this.mouseDownY,snappedX,snappedY)};RichDrawEditor.prototype.onHit=function(event){if(this.mode=='select'){this.select(Event.element(event));this.selectedBounds=this.renderer.bounds(this.selected);var offset=Position.cumulativeOffset(this.container);this.mouseDownX=Math.round((Event.pointerX(event)-offset[0])/this.gridX)*this.gridX;this.mouseDownY=Math.round((Event.pointerY(event)-offset[1])/this.gridY)*this.gridY;Event.observe(this.container,"mousemove",this.onDragListener)}};function createUUID(){return[4,2,2,2,6].map(function(length){var uuidpart="";for(var i=0;i<length;i++){var uuidchar=parseInt((Math.random()*256)).toString(16);if(uuidchar.length==1)uuidchar="0"+uuidchar;uuidpart+=uuidchar}return uuidpart}).join('-')}function AbstractRenderer(){};AbstractRenderer.prototype.init=function(elem){};AbstractRenderer.prototype.bounds=function(shape){return{x:0,y:0,width:0,height:0}};AbstractRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){};AbstractRenderer.prototype.remove=function(shape){};AbstractRenderer.prototype.move=function(shape,left,top){};AbstractRenderer.prototype.track=function(shape){};AbstractRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){};AbstractRenderer.prototype.editCommand=function(shape,cmd,value){};AbstractRenderer.prototype.queryCommand=function(shape,cmd){};AbstractRenderer.prototype.showTracker=function(shape){};AbstractRenderer.prototype.getMarkup=function(){return null}; |
371 | 371 | function SVGRenderer(){this.base=AbstractRenderer;this.svgRoot=null}SVGRenderer.prototype=new AbstractRenderer;SVGRenderer.prototype.init=function(elem){this.container=elem;this.container.style.MozUserSelect='none';var svgNamespace='http://www.w3.org/2000/svg';this.svgRoot=this.container.ownerDocument.createElementNS(svgNamespace,"svg");this.container.appendChild(this.svgRoot)};SVGRenderer.prototype.bounds=function(shape){var rect=new Object();var box=shape.getBBox();rect['x']=box.x;rect['y']=box.y;rect['width']=box.width;rect['height']=box.height;return rect};SVGRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var svgNamespace='http://www.w3.org/2000/svg';var svg;if(shape=='rect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='ellipse'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',(left+width/2)+'px');svg.setAttributeNS(null,'cy',(top+height/2)+'px');svg.setAttributeNS(null,'rx',(width/2)+'px');svg.setAttributeNS(null,'ry',(height/2)+'px')}else if(shape=='circ'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'ellipse');svg.setAttributeNS(null,'cx',left+'px');svg.setAttributeNS(null,'cy',top+'px');svg.setAttributeNS(null,'rx',width+'px');svg.setAttributeNS(null,'ry',width+'px')}else if(shape=='roundrect'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'rect');svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'rx','20px');svg.setAttributeNS(null,'ry','20px');svg.setAttributeNS(null,'width',width+'px');svg.setAttributeNS(null,'height',height+'px')}else if(shape=='line'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'line');svg.setAttributeNS(null,'x1',left+'px');svg.setAttributeNS(null,'y1',top+'px');svg.setAttributeNS(null,'x2',width+'px');svg.setAttributeNS(null,'y2',height+'px')}else if(shape=='text'){svg=this.container.ownerDocument.createElementNS(svgNamespace,'text');var n=this.container.ownerDocument.createTextNode(texto);svg.appendChild(n);svg.setAttributeNS(null,'x',left+'px');svg.setAttributeNS(null,'y',top+'px');svg.setAttributeNS(null,'font-size','12px')}svg.style.position='absolute';if(fillColor.length==0)fillColor='none';svg.setAttributeNS(null,'fill',fillColor);if(lineColor.length==0)lineColor='none';svg.setAttributeNS(null,'stroke',lineColor);svg.setAttributeNS(null,'stroke-width',lineWidth);this.svgRoot.appendChild(svg);return svg};SVGRenderer.prototype.remove=function(shape){shape.parentNode.removeChild(shape)};SVGRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){var deltaX=shape.getBBox().width;var deltaY=shape.getBBox().height;shape.setAttributeNS(null,'x1',left);shape.setAttributeNS(null,'y1',top);shape.setAttributeNS(null,'x2',left+deltaX);shape.setAttributeNS(null,'y2',top+deltaY)}else if(shape.tagName=='ellipse'){shape.setAttributeNS(null,'cx',left+(shape.getBBox().width/2));shape.setAttributeNS(null,'cy',top+(shape.getBBox().height/2))}else{shape.setAttributeNS(null,'x',left);shape.setAttributeNS(null,'y',top)}};SVGRenderer.prototype.track=function(shape){};SVGRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){var deltaX=toX-fromX;var deltaY=toY-fromY;if(shape.tagName=='line'){shape.setAttributeNS(null,'x2',toX);shape.setAttributeNS(null,'y2',toY)}else if(shape.tagName=='ellipse'){if(deltaX<0){shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(-deltaX/2)+'px')}else{shape.setAttributeNS(null,'cx',(fromX+deltaX/2)+'px');shape.setAttributeNS(null,'rx',(deltaX/2)+'px')}if(deltaY<0){shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(-deltaY/2)+'px')}else{shape.setAttributeNS(null,'cy',(fromY+deltaY/2)+'px');shape.setAttributeNS(null,'ry',(deltaY/2)+'px')}}else{if(deltaX<0){shape.setAttributeNS(null,'x',toX+'px');shape.setAttributeNS(null,'width',-deltaX+'px')}else{shape.setAttributeNS(null,'width',deltaX+'px')}if(deltaY<0){shape.setAttributeNS(null,'y',toY+'px');shape.setAttributeNS(null,'height',-deltaY+'px')}else{shape.setAttributeNS(null,'height',deltaY+'px')}}};SVGRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!='')shape.setAttributeNS(null,'fill',value);else shape.setAttributeNS(null,'fill','none')}else if(cmd=='linecolor'){if(value!='')shape.setAttributeNS(null,'stroke',value);else shape.setAttributeNS(null,'stroke','none')}else if(cmd=='linewidth'){shape.setAttributeNS(null,'stroke-width',parseInt(value)+'px')}}};SVGRenderer.prototype.queryCommand=function(shape,cmd){var result='';if(shape!=null){if(cmd=='fillcolor'){result=shape.getAttributeNS(null,'fill');if(result=='none')result=''}else if(cmd=='linecolor'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result=''}else if(cmd=='linewidth'){result=shape.getAttributeNS(null,'stroke');if(result=='none')result='';else result=shape.getAttributeNS(null,'stroke-width')}}return result};SVGRenderer.prototype.showTracker=function(shape){var box=shape.getBBox();var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}var svgNamespace='http://www.w3.org/2000/svg';tracker=document.createElementNS(svgNamespace,'rect');tracker.setAttributeNS(null,'id','tracker');tracker.setAttributeNS(null,'x',box.x-10);tracker.setAttributeNS(null,'y',box.y-10);tracker.setAttributeNS(null,'width',box.width+20);tracker.setAttributeNS(null,'height',box.height+20);tracker.setAttributeNS(null,'fill','none');tracker.setAttributeNS(null,'stroke','blue');tracker.setAttributeNS(null,'stroke-width','1');this.svgRoot.appendChild(tracker)};SVGRenderer.prototype.getMarkup=function(){return this.container.innerHTML}; |
372 | 372 | function VMLRenderer(){this.base=AbstractRenderer}VMLRenderer.prototype=new AbstractRenderer;VMLRenderer.prototype.init=function(elem){this.container=elem;this.container.style.overflow='hidden';elem.ownerDocument.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=elem.ownerDocument.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML);")};VMLRenderer.prototype.bounds=function(shape){var rect=new Object();rect['x']=shape.offsetLeft;rect['y']=shape.offsetTop;rect['width']=shape.offsetWidth;rect['height']=shape.offsetHeight;return rect};VMLRenderer.prototype.create=function(shape,fillColor,lineColor,lineWidth,left,top,width,height,texto){var vml;if(shape=='rect'){vml=this.container.ownerDocument.createElement('v:rect')}else if(shape=='roundrect'){vml=this.container.ownerDocument.createElement('v:roundrect')}else if(shape=='ellipse'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='circ'){vml=this.container.ownerDocument.createElement('v:oval')}else if(shape=='line'){vml=this.container.ownerDocument.createElement('v:line')}else if(shape=='text'){vml=this.container.ownerDocument.createElement('v:textbox');vml.innerHTML=texto}if(shape!='line'){vml.style.position='absolute';vml.style.left=left+"px";vml.style.top=top+"px";vml.style.width=width+"px";vml.style.height=height+"px";if(fillColor!=''){vml.setAttribute('filled','true');vml.setAttribute('fillcolor',fillColor)}else{vml.setAttribute('filled','false')}}else{vml.style.position='absolute';vml.setAttribute('from',left+'px,'+top+'px');vml.setAttribute('to',width+'px,'+height+'px')}if(lineColor!=''){vml.setAttribute('stroked','true');vml.setAttribute('strokecolor',lineColor);vml.setAttribute('strokeweight',lineWidth)}else{vml.setAttribute('stroked','false')}this.container.appendChild(vml);return vml};VMLRenderer.prototype.remove=function(shape){shape.removeNode(true)};VMLRenderer.prototype.move=function(shape,left,top){if(shape.tagName=='line'){shape.style.marginLeft=left+"px";shape.style.marginTop=top+"px"}else{shape.style.left=left+"px";shape.style.top=top+"px"}};VMLRenderer.prototype.track=function(shape){};VMLRenderer.prototype.resize=function(shape,fromX,fromY,toX,toY){shape.setAttribute('to',toX+'px,'+toY+'px')};VMLRenderer.prototype.editCommand=function(shape,cmd,value){if(shape!=null){if(cmd=='fillcolor'){if(value!=''){shape.filled='true';shape.fillcolor=value}else{shape.filled='false';shape.fillcolor=''}}else if(cmd=='linecolor'){if(value!=''){shape.stroked='true';shape.strokecolor=value}else{shape.stroked='false';shape.strokecolor=''}}else if(cmd=='linewidth'){shape.strokeweight=parseInt(value)+'px'}}};VMLRenderer.prototype.queryCommand=function(shape,cmd){if(shape!=null){if(cmd=='fillcolor'){if(shape.filled=='false')return'';else return shape.fillcolor}else if(cmd=='linecolor'){if(shape.stroked=='false')return'';else return shape.strokecolor}else if(cmd=='linewidth'){if(shape.stroked=='false'){return''}else{return(parseFloat(shape.strokeweight)*(screen.logicalXDPI/72))+'px'}}}};VMLRenderer.prototype.showTracker=function(shape){var box=this.bounds(shape);var tracker=document.getElementById('tracker');if(tracker){this.remove(tracker)}tracker=this.container.ownerDocument.createElement('v:rect');tracker.id='tracker';tracker.style.position='absolute';tracker.style.left=box.x-10+"px";tracker.style.top=box.y-10+"px";tracker.style.width=box.width+20+"px";tracker.style.height=box.height+20+"px";tracker.setAttribute('filled','false');tracker.setAttribute('stroked','true');tracker.setAttribute('strokecolor','blue');tracker.setAttribute('strokeweight','1px');this.container.appendChild(tracker)};VMLRenderer.prototype.getMarkup=function(){return this.container.innerHTML}; |
373 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.coordenadas={formato:"bloco",padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"Déc. de grau",ativo:true,defepsg:""},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"}},MODOTEXTO:"",mostraCoordenadasUTM:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasUTM.idhtml}else{this.PARAMETROS.mostraCoordenadasUTM.idhtml=id}if(!$i(id)||this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}atualizaCoordenadasUTM=function(){if(this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}if(i3GEO.Interface.STATUS.atualizando.length>0){return}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10){return}if($i("wdoca")){return}if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}var tempUtm=function(retorno){var funcao,temp,texto;funcao="$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';"+"if(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml == i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml)"+"{$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml).style.display='block';i3GEO.coordenadas.mostraCoordenadasGEO();}";idSetTimeoutMostraUTM=setTimeout(funcao,3400);temp=$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml);if(retorno.data){temp.style.display="block";texto="<div onclick='javascript:clearTimeout(idSetTimeoutMostraUTM);i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml = \"\";i3GEO.coordenadas.mostraCoordenadasGEO();' style='width:300px;font-size:10px;' >UTM: x="+retorno.data.x+" y="+retorno.data.y+" zn="+retorno.data.zona+" "+retorno.data.datum+" <img class='x' src='"+i3GEO.util.$im("branco.gif")+"' /></div>";temp.innerHTML=texto}};i3GEO.php.geo2utm(tempUtm,objposicaocursor.ddx,objposicaocursor.ddy)};if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")<0){i3GEO.eventos.MOUSEPARADO.push("atualizaCoordenadasUTM()")}}catch(e){alert("mostraCoordenadasUtm: "+e.description)}},mostraCoordenadasGEO:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasGEO.idhtml}else{this.PARAMETROS.mostraCoordenadasGEO.idhtml=id}if($i(id)){if(!$i("coordgeotabela")){$i(id).innerHTML=i3GEO.coordenadas.criaMascaraDMS("coordgeotabela");atualizaLocalizarGeo=function(){var temp=$i("coordgeotabela");if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"coordgeotabela")}};if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo()")}}}}}catch(e){alert("mostraCoordenadasGeo: "+e.description)}},geo2zonaUtm:function(long){long=(long*1)+180;long=long/6;return parseInt(long,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins='<table id='+prefixo+' style=display:block;text-align:center;width:295px ><tr style="border-bottom:2px solid white" >'+"<td>"+caixa+" </td>"+'<td style=width:10px;text-align:right > X:</td>'+'<td>'+$inputText('','',prefixo+'xg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'xm','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'xs','segundo','4','00.00')+'</td>'+'<td>Y:'+$inputText('','',prefixo+'yg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'ym','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'ys','segundo','4','00.00')+'</td>',temp='var '+prefixo+'xxx = i3GEO.calculo.dms2dd($i(\''+prefixo+'xg\').value,$i(\''+prefixo+'xm\').value,$i(\''+prefixo+'xs\').value);'+'var '+prefixo+'yyy = i3GEO.calculo.dms2dd($i(\''+prefixo+'yg\').value,$i(\''+prefixo+'ym\').value,$i(\''+prefixo+'ys\').value);'+'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);';ins+='<td><img class=tic title=zoom onclick="'+temp+'" src="'+i3GEO.util.$im("branco.gif")+'" /></td>'+"</tr></table>";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");$i(prefixo+"xg").value=x[0];$i(prefixo+"xm").value=x[1];$i(prefixo+"xs").value=x[2];$i(prefixo+"yg").value=y[0];$i(prefixo+"ym").value=y[1];$i(prefixo+"ys").value=y[2];i3GEO.coordenadas.MODOTEXTO+="DMS - Latitude: "+y[0]+" "+y[1]+" "+y[2]+" Longitude: "+x[0]+" "+x[1]+" "+x[2]+"<br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<table id="+prefixo+" style=display:block;text-align:center;;width:415px ><tr style='border-bottom:2px solid white' >"+"<td>"+caixa+" <td>"+"<td style=width:100px;text-align:right >"+titulo+" X: </td>"+"<td>"+$inputText("","",prefixo+"X","X","12","00")+" </td>"+"<td>Y:"+$inputText("","",prefixo+"Y","Y","12","00")+" </td>"+"<td>Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+" </td>"+"</tr></table>";return ins},atualizaProj4:function(onde,configProj,x,y){var zona,temp,p,destino="",iu=i3GEO.util;try{if(!$i(onde+configProj+"ZN")){return}}catch(e){return}temp=i3GEO.coordenadas.config[configProj];try{if($i(onde+configProj).style.display==="none"){return}}catch(men){}if(temp.tipo==="metrica"){destino=temp.defepsg}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipo==="utm"){zona=i3GEO.coordenadas.geo2zonaUtm(x);$i(onde+configProj+"ZN").value=zona;if(objposicaocursor.ddy*1>0){destino=temp.zona[zona+"N"]}else{destino=temp.zona[zona+"S"]}if(typeof(destino)==='undefined'){iu.defineValor(onde+configProj+"X","value","?");iu.defineValor(onde+configProj+"Y","value","?");return}}if(temp.defepsg===""&&temp.tipo==="metrica"){p={x:x,y:y}}else{p=i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y)}iu.defineValor(onde+configProj+"X","value",p.x);iu.defineValor(onde+configProj+"Y","value",p.y);i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" - X: "+p.x+" Y: "+p.y+"<br>"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};Proj4js.getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/proj4js/lib/"};var source=new Proj4js.Proj("ORIGEM"),dest=new Proj4js.Proj("DESTINO"),p=new Proj4js.Point(x,y);Proj4js.transform(source,dest,p);return p},ativaBloco:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0;for(i=0;i<n;i++){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(tipos[i]===this.padrao){$i(prefixo+tipos[i]).style.display="block"}else{$i(prefixo+tipos[i]).style.display="none"}}}},mudaTipo:function(obj,onde){if(obj.value==="janela"){this.formato="janela";this.mostraCoordenadas();return}this.padrao=obj.value;obj.selectedIndex=0;i3GEO.coordenadas.ativaBloco(onde)},mostraCoordenadas:function(ativaMovimento,onde,x,y){try{var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela;i3GEO.coordenadas.MODOTEXTO="";if(arguments.length===0){ativaMovimento=true;onde=""}if(onde===""){onde=i3GEO.coordenadas.config[tipos[0]].idhtml}caixa="<select onchange='javascript:i3GEO.coordenadas.mudaTipo(this,\""+onde+"\");' style='border: 1px solid #B4B4B4;color: #B4B4B4;margin-left:3px;font-size:10px;height:16px;width:40px;' ><option>---</option><option value='janela' >janela</option>";for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){caixa+="<option value='"+tipos[i]+"'>"+temp.titulo+"</option>"}}caixa+="</select>";if(i3GEO.coordenadas.formato!=="bloco"){caixa=""}for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){ins+=i3GEO.coordenadas.criaMascaraDMS(onde+tipos[i],temp.titulo,caixa);if(i3GEO.coordenadas.formato==="separado"){try{$i(temp.idhtml).innerHTML=ins}catch(e){}ins=""}}else{ins+=i3GEO.coordenadas.criaMascaraMetrica(onde+tipos[i],temp.titulo,caixa)}}}if(this.formato==="janela"){janela=i3GEO.janela.cria("450px","120px","","","","Coordenadas aproximadas","i3GEOJanelaCoordenadas",false,"hd","","");YAHOO.util.Event.addListener(janela[0].close,"click",function(){i3GEO.coordenadas.formato="bloco",i3GEO.coordenadas.mostraCoordenadas()});temp=$i("i3GEOJanelaCoordenadas_corpo");temp.style.backgroundColor="white";temp.style.textAlign="left";temp=$i("i3GEOJanelaCoordenadas");temp.onmouseover="";temp.onmouseout="";if($i(onde)){$i(onde).innerHTML=""}onde="i3GEOJanelaCoordenadas_corpo";ins+="<br><a href='#' style='cursor:pointer;color:blue' onclick='new YAHOO.util.KeyListener(document.body,{alt:true,keys:67},{fn: function(type, args, obj){alert(i3GEO.coordenadas.MODOTEXTO);}}).enable();' >"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas</a>"}if(onde!==""&&$i(onde)){$i(onde).innerHTML=ins}atualizaLocalizarGeo=function(id,x,y){if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}};for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0])}}else{if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){i3GEO.coordenadas.atualizaProj4(onde,tipos[i],x,y)}}}}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.limpaModoTexto()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.limpaModoTexto()")}}}if(i3GEO.coordenadas.formato==="bloco"){i3GEO.coordenadas.ativaBloco(onde)}}catch(men){}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""}}; | |
374 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida",servicosexternos:true,temasmapa:false},"mostraVisual":{idhtml:""},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{permiteLogin:true,idhtml:"menus",deslocaEsquerda:0,parametrosYUI:{iframe:false,autosubmenudisplay:false,showdelay:200,hidedelay:500,lazyload:false}},"mostraMenuLista":{idhtml:"menuLista"},"mostraVersao":{idhtml:"versaoi3geo"},"mostraEmail":{idhtml:"emailInstituicao"}},mostraEmail:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.emailInstituicao)},mostraVersao:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.mensageminicia)},mostraCoordenadasUTM:function(id){try{i3GEO.coordenadas.mostraCoordenadasUTM.idhtml=i3GEO.gadgets.mostraCoordenadasUTM.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasUTM(id)},mostraCoordenadasGEO:function(id){try{i3GEO.coordenadas.mostraCoordenadasGEO.idhtml=i3GEO.gadgets.mostraCoordenadasGEO.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasGEO(id)},mostraInserirKml:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml}if($i(id)){if(!$i("i3geo_urlkml")){i=$inputText(id,"290","i3geo_urlkml","kml url","40","");ins="<table><tr><td>Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp,onde;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}onde=$i(id);if(onde){if(onde.style.display=="none"){onde.style.display="block"}if(!$i("i3geo_escalanum")){i="<form id='i3GEOescalanumForm' >"+$inputText(id,"100","i3geo_escalanum",$trad("d10"),"10",parseInt(i3GEO.parametros.mapscale,10))+"</form>";ins="<table><tr><td>"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";onde.innerHTML=ins;$i("i3GEOescalanumForm").onsubmit=function(){i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,document.getElementById("i3geo_escalanum").value);return false}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.atualizaEscalaNumerica()")}}},atualizaEscalaNumerica:function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.gadgets.atualizaEscalaNumerica()");return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}},mostraEscalaGrafica:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}var e,temp,ins;if($i(id)){atualizaEscalaGrafica=function(){e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}temp=function(retorno){eval(retorno.data);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){ins="<img class='menuarrow' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" title='opções' onclick='i3GEO.mapa.dialogo.opcoesEscala()' style='cursor:pointer'/><img id=imagemEscalaGrafica src='' />";$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){var i,ins,temp,fbusca;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}i3GEO.gadgets.mostraBuscaRapida.id=id;if($i(id)){i3geo_buscaRapida=function(){alert("i3geo_buscaRapida foi depreciada")};i="<form id=i3GEObotaoFormBuscaRapida"+id+" >"+$inputText(id,"256","valorBuscaRapida"+id,"Município, cidade, UC, endereço...","20",$trad("o2"))+"</form>";ins="<table><tr><td><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=8&idajuda=71' > </a></td><td>"+i+"</td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("p13")+"' class='ticPropriedades2' id=i3GEObotaoPropriedadesBuscaRapida"+id+" /></td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' id=i3GEObotaoBuscaRapida"+id+" /></td></tr></table>";temp=$i(id);if(temp){fbusca=function(){if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos===false&&i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa===false){alert("Escolha um tipo de busca nas propriedades");return}if($i("valorBuscaRapida"+id).value===""){alert("Digite uma palavra para busca!");return}i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida");return false};temp.innerHTML=ins;$i("i3GEObotaoBuscaRapida"+id).onclick=fbusca;$i("i3GEObotaoFormBuscaRapida"+id).onsubmit=fbusca;$i("i3GEObotaoPropriedadesBuscaRapida"+id).onclick=function(){var ins,interno="",externo="";i3GEO.janela.cria("300px","150px","","","","Propriedades","i3GEOpropriedadesBuscaRapida"+id);if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos){externo="checked"}if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa){interno="checked"}ins="<p class=paragrafo >Onde será feita a busca:</p>"+"<table class=lista3 >"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos = this.checked' type=checkbox "+externo+" ></td><td>Serviços de busca externos (Google e MMA)</td></tr>"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa = this.checked' type=checkbox "+interno+" ></td><td>Temas existentes no mapa</td></tr>"+"</table><br>"+"<p class=paragrafo >Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber operações de busca.</p>";$i("i3GEOpropriedadesBuscaRapida"+id+"_corpo").innerHTML=ins}}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins="<table style='text-align:center;position:relative;left:";if(navm){ins+="0px;'>"}else{ins+="6px;'>"}ins+="<tr><td><img id='i3geo_zoomanterior' class='zoomAnterior' title='anterior' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="<td> </td>";ins+="<td><img id='i3geo_zoomproximo' class='zoomProximo' title='proximo' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="</tr></table>";$i(id).innerHTML=ins}},visual:{inicia:function(id){alert("A i3GEO.gadgets.visual foi depreciado")},troca:function(visual){alert("A i3GEO.gadgets.visual foi depreciado")}},mostraMenuSuspenso:function(id){var objid,n,i,estilo,t,onMenuBarBeforeRender,temp,i3GEOoMenuBarLocal,ms=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso,confm=i3GEO.configura.oMenuData,ins="",alinhamento="";if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(!objid){return}if(objid&&objid.innerHTML===""){try{if(ms.permiteLogin===true||i3GEO.parametros.editor==="sim"){i3GEO.configura.oMenuData.menu.push({nome:"Admin",id:"i3GeoAdmin"});i3GEO.configura.oMenuData.submenus.i3GeoAdmin=[];if(ms.permiteLogin===true){i3GEO.configura.oMenuData.submenus.i3GeoAdmin.push({id:"omenudataAdminu1",text:"Login",url:"javascript:i3GEO.login.dialogo.abreLogin()"},{id:"omenudataAdminu2",text:"Logout",url:"javascript:i3GEO.login.dialogo.abreLogout()"})}if(i3GEO.login.verificaCookieLogin()){i3GEO.configura.oMenuData.submenus.i3GeoAdmin.push({id:"omenudataAdmin1",text:$trad("x1"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/admin/index.html')"},{id:"omenudataAdmin2",text:$trad("g1a"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/admin/html/arvore.html')"},{id:"omenudataAdmin3",text:$trad("x10"),url:"javascript:i3GEO.arvoreDeTemas.abrejanelaIframe('900','700','"+i3GEO.configura.locaplic+"/admin/html/menus.html\')"})}}}catch(e){}i3GEOoMenuBar=YAHOO.widget.MenuManager;if(objid){objid.className="yuimenubar";temp=$i("contemMenu");if(temp){temp.className="yui-navset"}if(ms.deslocaEsquerda){alinhamento="left:"+ms.deslocaEsquerda*-1+"px;"}if(!objid.style.height||parseInt(objid.style.height,10)===0){objid.style.height="21px"}else{if(!temp.style.height||parseInt(temp.style.height)===0){temp.style.height="21px"}}ins+='<div class="bd" style="top:0px;'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'+'<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';n=confm.menu.length;estilo="padding-bottom:3px;top:0px;border: 0px solid white;";for(i=0;i<n;i+=1){t="";if(confm.menu[i].target){t="target="+confm.menu[i].target}if(confm.submenus[confm.menu[i].id].length>0){ins+='<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+confm.menu[i].id+'" > '+confm.menu[i].nome+'</a></li>'}}ins+='</ul>';ins+='</div>';objid.innerHTML=ins;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI.iframe=true}i3GEOoMenuBarLocal=new YAHOO.widget.MenuBar(id,i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI);onMenuBarBeforeRender=function(p_sType,p_sArgs){var nomeMenu="",nomeSub,subs=i3GEO.configura.oMenuData.submenus,conta=0;for(nomeMenu in subs){if($i("menu"+nomeMenu)){nomeSub=subs[nomeMenu];if(nomeSub!==""){i3GEOoMenuBarLocal.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:nomeSub})}conta+=1}}};i3GEOoMenuBar.addMenu(i3GEOoMenuBarLocal);i3GEOoMenuBarLocal.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBarLocal.render()}}temp=["omenudataInterface1","omenudataInterface2","omenudataInterface3","omenudataInterface4","omenudataInterface5"];n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("checked",false)}}try{temp="";switch(i3GEO.Interface.ATUAL){case"openlayers":temp="omenudataInterface2";break;case"googlemaps":temp="omenudataInterface4";break;case"googleearth":temp="omenudataInterface5";break}if(temp!=""&&$i(temp)){i3GEOoMenuBar.getMenuItem(temp).cfg.setProperty("checked",true)}}catch(e){}temp=["omenudataFerramentas7b","omenudataArquivos3","omenudataJanelas1","omenudataJanelas3","omenudataFerramentas2a"];n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("disabled",false)}}try{temp=[];switch(i3GEO.Interface.ATUAL){case"openlayers":temp=["omenudataArquivos3","omenudataJanelas1"];break;case"googlemaps":temp=["omenudataArquivos3","omenudataJanelas1","omenudataJanelas3"];break;case"googleearth":temp=["omenudataFerramentas7b","omenudataArquivos3","omenudataJanelas3","omenudataFerramentas2a"];break};n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("disabled",true)}}}catch(e){}temp=objid.style;temp.backgroundPosition="0px -1px";temp.border="0px solid white";if(ms.finaliza&&ms.finaliza!=""){eval(ms.finaliza)}},mostraMenuLista:function(id){var objid,n,i,sub,nomeMenu="",ms=i3GEO.gadgets.PARAMETROS.mostraMenuLista,confm=i3GEO.configura.oMenuData,ins="",subs=i3GEO.configura.oMenuData.submenus;if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(objid){n=confm.menu.length;for(i=0;i<n;i+=1){ins+='<div class="listaMenuTitulo" id=menulista_'+confm.menu[i].id+'>'+confm.menu[i].nome+'</div>'}objid.innerHTML=ins;for(nomeMenu in subs){if($i("menulista_"+nomeMenu)){sub=subs[nomeMenu];n=sub.length;ins="";for(i=0;i<n;i++){ins+="<p class='listaMenuItem' ><a href='"+sub[i].url+"' target='_blank'>"+sub[i].text+"</a>"}$i("menulista_"+nomeMenu).innerHTML+=ins}}}}}; | |
375 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.social={curtirFacebook:function(url,tipo){if(tipo==="comtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&width=160&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:160px; height:21px;' allowTransparency='true'></iframe>"}if(tipo==="semtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>"}},publicarTwitter:function(url,tipo){var re=new RegExp("=","g");url=url.replace(re,'%3d');if(tipo==="comtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&via=i3geo&url='+url+'" style="width:100px; height:21px;"></iframe>'}if(tipo==="semtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=none&via=i3geo&url='+url+'" style="width:65px; height:21px;"></iframe>'}},compartilhar:function(id,urlcf,urlpt,tipo,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}if(!tipo){tipo="comtotal"}var onde=$i(id),tabela="";if(tipo==="comtotal"){tabela+="<table style='width:250px' ><tr>"}if(tipo==="semtotal"){tabela+="<table style='width:115px' ><tr>"}if(onde||id===""){if(urlpt!==""){tabela+="<td>"+i3GEO.social.publicarTwitter(urlpt,tipo)+"</td>"}if(urlcf!==""){tabela+="<td>"+i3GEO.social.curtirFacebook(urlcf,tipo)+"</td>"}tabela+="</tr></table>";if(id!==""){onde.innerHTML=tabela}return tabela}else{return false}},bookmark:function(link,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}var ins="<img style='cursor:pointer' src='"+locaplic+"/imagens/delicious.gif' onclick='javascript:window.open(\"http://del.icio.us/post?url="+link+"\")' title='Delicious'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/digg.gif' onclick='javascript:window.open(\"http://digg.com/submit/post?url="+link+"\")' title='Digg'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+link+"\")' title='Facebook'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/stumbleupon.gif' onclick='javascript:window.open(\"http://www.stumbleupon.com/submit?url="+link+"\")' title='StumbleUpon'/>";return ins}}; | |
376 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}if(typeof(i3GEOF)==='undefined'){i3GEOF=[]}i3GEO.login={divnomelogin:"i3GEONomeLogin",recarrega:true,funcaoLoginOk:null,funcaoLoginErro:null,dialogo:{abreLogin:function(locaplic){var js;if(!locaplic){locaplic=i3GEO.configura.locaplic}if(typeof(i3GEOF.loginusuario)==='undefined'){js=locaplic+"/ferramentas/loginusuario/index.js";i3GEO.util.scriptTag(js,"i3GEOF.loginusuario.criaJanelaFlutuante()","i3GEOF.loginusuario_script")}else{i3GEOF.loginusuario.criaJanelaFlutuante()}},abreLogout:function(){var r=confirm($trad("x26"));if(r==true){i3GEO.login.anulaCookie();i3GEO.janela.destroi("i3GEOF.loginusuario");if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML=""}if(i3GEO.login.recarrega==true){document.location.reload()}}}},anulaCookie:function(){i3GEO.util.insereCookie("i3geocodigologin","",1);i3GEO.util.insereCookie("i3geousuariologin","",1);i3GEO.util.insereCookie("i3geousuarionome","",1);i3GEO.util.insereCookie("i3GeoLogin","",1)},verificaCookieLogin:function(){var a=i3GEO.util.pegaCookie("i3geocodigologin"),b=i3GEO.util.pegaCookie("i3geocodigologin"),c=i3GEO.util.pegaCookie("i3geousuarionome");if(a&&b&&c&&a!=""&&b!=""&&c!=""){return true}else{return false}},verificaOperacao:function(operacao,locaplic,funcaoOk,tipo,funcaoErro){var p="",cp,temp,resultado=true;if(!i3GEO.login.verificaCookieLogin()){if(!funcaoErro){alert("Login!")}else{funcaoErro.call()}return false}if(!locaplic){locaplic=i3GEO.configura.locaplic}temp=function(retorno){if(retorno.data=="sim"){resultado=true}else{resultado=false}if(resultado===true){if(funcaoOk&&funcaoOk!=""){funcaoOk.call()}}else{if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML=""}if(funcaoErro&&funcaoErro!=""&&resultado===false){funcaoErro.call()}}return resultado};if(tipo==="sessao"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaosessao"}if(tipo==="banco"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaobanco"}cp=new cpaint();cp.set_response_type("JSON");cp.set_transfer_mode("POST");cp.call(p,"login",temp,"&operacao="+operacao)}}; | |
373 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.coordenadas={formato:"bloco",padrao:"geoProj",defOrigem:"+proj=longlat +ellps=GRS67 +no_defs",config:{"geoProj":{idhtml:"localizarxy",tipo:"geo",titulo:"Geo",ativo:true,defepsg:""},"dd":{idhtml:"localizarxy",tipo:"metrica",titulo:"Déc. de grau",ativo:true,defepsg:""},"policonicaSad69":{idhtml:"localizarxy",tipo:"metrica",titulo:"Polic SAD-69",ativo:true,defepsg:"+proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +units=m +no_defs"},"utmSad69Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sad-69",ativo:true,defepsg:"",zona:{"19N":"+proj=utm +zone=19 +ellps=aust_SA +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=aust_SA +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=aust_SA +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=aust_SA +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=aust_SA +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=aust_SA +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=aust_SA +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=aust_SA +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=aust_SA +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=aust_SA +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=aust_SA +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=aust_SA +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=aust_SA +units=m +no_defs"}},"utmSirgas2000Proj":{idhtml:"localizarxy",tipo:"utm",titulo:"UTM Sirgas",ativo:true,defepsg:"",zona:{"11N":"+proj=utm +zone=11 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","12N":"+proj=utm +zone=12 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","13N":"+proj=utm +zone=13 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","14N":"+proj=utm +zone=14 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","15N":"+proj=utm +zone=15 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","16N":"+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17N":"+proj=utm +zone=17 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18N":"+proj=utm +zone=18 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19N":"+proj=utm +zone=19 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20N":"+proj=utm +zone=20 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21N":"+proj=utm +zone=21 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22N":"+proj=utm +zone=22 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","17S":"+proj=utm +zone=17 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","18S":"+proj=utm +zone=18 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","19S":"+proj=utm +zone=19 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","20S":"+proj=utm +zone=20 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","21S":"+proj=utm +zone=21 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","22S":"+proj=utm +zone=22 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","23S":"+proj=utm +zone=23 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","24S":"+proj=utm +zone=24 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs","25S":"+proj=utm +zone=25 +south +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"}}},PARAMETROS:{"mostraCoordenadasUTM":{idhtml:"localizarxy"},"mostraCoordenadasGEO":{idhtml:"localizarxy"}},MODOTEXTO:"",mostraCoordenadasUTM:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasUTM.idhtml}else{this.PARAMETROS.mostraCoordenadasUTM.idhtml=id}if(!$i(id)||this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}atualizaCoordenadasUTM=function(){if(this.PARAMETROS.mostraCoordenadasUTM.idhtml===""){if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")>=0){i3GEO.eventos.MOUSEPARADO.remove("atualizaCoordenadasUTM()")}return}if(i3GEO.Interface.STATUS.atualizando.length>0){return}if(objposicaocursor.imgx<10||objposicaocursor.imgy<10){return}if($i("wdoca")){return}if(i3GEO.util.verificaScriptTag("i3GEOF")===true){return}var tempUtm=function(retorno){var funcao,temp,texto;funcao="$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml).style.display='none';"+"if(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml == i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml)"+"{$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasGEO.idhtml).style.display='block';i3GEO.coordenadas.mostraCoordenadasGEO();}";idSetTimeoutMostraUTM=setTimeout(funcao,3400);temp=$i(i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml);if(retorno.data){temp.style.display="block";texto="<div onclick='javascript:clearTimeout(idSetTimeoutMostraUTM);i3GEO.coordenadas.PARAMETROS.mostraCoordenadasUTM.idhtml = \"\";i3GEO.coordenadas.mostraCoordenadasGEO();' style='width:300px;font-size:10px;' >UTM: x="+retorno.data.x+" y="+retorno.data.y+" zn="+retorno.data.zona+" "+retorno.data.datum+" <img class='x' src='"+i3GEO.util.$im("branco.gif")+"' /></div>";temp.innerHTML=texto}};i3GEO.php.geo2utm(tempUtm,objposicaocursor.ddx,objposicaocursor.ddy)};if(i3GEO.eventos.MOUSEPARADO.toString().search("atualizaCoordenadasUTM()")<0){i3GEO.eventos.MOUSEPARADO.push("atualizaCoordenadasUTM()")}}catch(e){alert("mostraCoordenadasUtm: "+e.description)}},mostraCoordenadasGEO:function(id){try{if(arguments.length===0||id===""||typeof(id)==='undefined'){id=this.PARAMETROS.mostraCoordenadasGEO.idhtml}else{this.PARAMETROS.mostraCoordenadasGEO.idhtml=id}if($i(id)){if(!$i("coordgeotabela")){$i(id).innerHTML=i3GEO.coordenadas.criaMascaraDMS("coordgeotabela");atualizaLocalizarGeo=function(){var temp=$i("coordgeotabela");if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(objposicaocursor.dmsx,objposicaocursor.dmsy,"coordgeotabela")}};if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo()")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo()")}}}}}catch(e){alert("mostraCoordenadasGeo: "+e.description)}},geo2zonaUtm:function(long){long=(long*1)+180;long=long/6;return parseInt(long,10)+1},criaMascaraDMS:function(prefixo,titulo,caixa){var ins='<table id='+prefixo+' style=display:block;text-align:center;width:295px ><tr style="border-bottom:2px solid white" >'+"<td>"+caixa+" </td>"+'<td style=width:10px;text-align:right > X:</td>'+'<td>'+$inputText('','',prefixo+'xg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'xm','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'xs','segundo','4','00.00')+'</td>'+'<td>Y:'+$inputText('','',prefixo+'yg','grau','3','-00')+'</td>'+'<td>'+$inputText('','',prefixo+'ym','minuto','2','00')+'</td>'+'<td>'+$inputText('','',prefixo+'ys','segundo','4','00.00')+'</td>',temp='var '+prefixo+'xxx = i3GEO.calculo.dms2dd($i(\''+prefixo+'xg\').value,$i(\''+prefixo+'xm\').value,$i(\''+prefixo+'xs\').value);'+'var '+prefixo+'yyy = i3GEO.calculo.dms2dd($i(\''+prefixo+'yg\').value,$i(\''+prefixo+'ym\').value,$i(\''+prefixo+'ys\').value);'+'i3GEO.navega.zoomponto(i3GEO.configura.locaplic,i3GEO.configura.sid,'+prefixo+'xxx,'+prefixo+'yyy);';ins+='<td><img class=tic title=zoom onclick="'+temp+'" src="'+i3GEO.util.$im("branco.gif")+'" /></td>'+"</tr></table>";return ins},atualizaGeo:function(dmsx,dmsy,prefixo){var x=dmsx.split(" "),y=dmsy.split(" ");$i(prefixo+"xg").value=x[0];$i(prefixo+"xm").value=x[1];$i(prefixo+"xs").value=x[2];$i(prefixo+"yg").value=y[0];$i(prefixo+"ym").value=y[1];$i(prefixo+"ys").value=y[2];i3GEO.coordenadas.MODOTEXTO+="DMS - Latitude: "+y[0]+" "+y[1]+" "+y[2]+" Longitude: "+x[0]+" "+x[1]+" "+x[2]+"<br>"},criaMascaraMetrica:function(prefixo,titulo,caixa){var ins="<table id="+prefixo+" style=display:block;text-align:center;;width:415px ><tr style='border-bottom:2px solid white' >"+"<td>"+caixa+" <td>"+"<td style=width:100px;text-align:right >"+titulo+" X: </td>"+"<td>"+$inputText("","",prefixo+"X","X","12","00")+" </td>"+"<td>Y:"+$inputText("","",prefixo+"Y","Y","12","00")+" </td>"+"<td>Zn:"+$inputText("","",prefixo+"ZN","Zona","2","--")+" </td>"+"</tr></table>";return ins},atualizaProj4:function(onde,configProj,x,y){var zona,temp,p,destino="",iu=i3GEO.util;try{if(!$i(onde+configProj+"ZN")){return}}catch(e){return}temp=i3GEO.coordenadas.config[configProj];try{if($i(onde+configProj).style.display==="none"){return}}catch(men){}if(temp.tipo==="metrica"){destino=temp.defepsg}if(typeof(x)==='undefined'){x=objposicaocursor.ddx}if(typeof(y)==='undefined'){y=objposicaocursor.ddy}if(temp.tipo==="utm"){zona=i3GEO.coordenadas.geo2zonaUtm(x);$i(onde+configProj+"ZN").value=zona;if(objposicaocursor.ddy*1>0){destino=temp.zona[zona+"N"]}else{destino=temp.zona[zona+"S"]}if(typeof(destino)==='undefined'){iu.defineValor(onde+configProj+"X","value","?");iu.defineValor(onde+configProj+"Y","value","?");return}}if(temp.defepsg===""&&temp.tipo==="metrica"){p={x:x,y:y}}else{p=i3GEO.coordenadas.calculaProj4(i3GEO.coordenadas.defOrigem,destino,x,y)}iu.defineValor(onde+configProj+"X","value",p.x);iu.defineValor(onde+configProj+"Y","value",p.y);i3GEO.coordenadas.MODOTEXTO+=temp.titulo+" - X: "+p.x+" Y: "+p.y+"<br>"},calculaProj4:function(origem,destino,x,y){Proj4js.defs={'ORIGEM':origem,'DESTINO':destino};Proj4js.getScriptLocation=function(){return i3GEO.configura.locaplic+"/pacotes/proj4js/lib/"};var source=new Proj4js.Proj("ORIGEM"),dest=new Proj4js.Proj("DESTINO"),p=new Proj4js.Point(x,y);Proj4js.transform(source,dest,p);return p},ativaBloco:function(prefixo){var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,i=0;for(i=0;i<n;i++){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(tipos[i]===this.padrao){$i(prefixo+tipos[i]).style.display="block"}else{$i(prefixo+tipos[i]).style.display="none"}}}},mudaTipo:function(obj,onde){if(obj.value==="janela"){this.formato="janela";this.mostraCoordenadas();return}this.padrao=obj.value;obj.selectedIndex=0;i3GEO.coordenadas.ativaBloco(onde)},mostraCoordenadas:function(ativaMovimento,onde,x,y){try{var tipos=i3GEO.util.listaChaves(i3GEO.coordenadas.config),n=tipos.length,temp,ins="",i=0,caixa,janela;i3GEO.coordenadas.MODOTEXTO="";if(arguments.length===0){ativaMovimento=true;onde=""}if(onde===""){onde=i3GEO.coordenadas.config[tipos[0]].idhtml}caixa="<select onchange='javascript:i3GEO.coordenadas.mudaTipo(this,\""+onde+"\");' style='border: 1px solid #B4B4B4;color: #B4B4B4;margin-left:3px;font-size:10px;height:16px;width:40px;' ><option>---</option><option value='janela' >janela</option>";for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){caixa+="<option value='"+tipos[i]+"'>"+temp.titulo+"</option>"}}caixa+="</select>";if(i3GEO.coordenadas.formato!=="bloco"){caixa=""}for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){ins+=i3GEO.coordenadas.criaMascaraDMS(onde+tipos[i],temp.titulo,caixa);if(i3GEO.coordenadas.formato==="separado"){try{$i(temp.idhtml).innerHTML=ins}catch(e){}ins=""}}else{ins+=i3GEO.coordenadas.criaMascaraMetrica(onde+tipos[i],temp.titulo,caixa)}}}if(this.formato==="janela"){janela=i3GEO.janela.cria("450px","120px","","","","Coordenadas aproximadas","i3GEOJanelaCoordenadas",false,"hd","","");YAHOO.util.Event.addListener(janela[0].close,"click",function(){i3GEO.coordenadas.formato="bloco",i3GEO.coordenadas.mostraCoordenadas()});temp=$i("i3GEOJanelaCoordenadas_corpo");temp.style.backgroundColor="white";temp.style.textAlign="left";temp=$i("i3GEOJanelaCoordenadas");temp.onmouseover="";temp.onmouseout="";if($i(onde)){$i(onde).innerHTML=""}onde="i3GEOJanelaCoordenadas_corpo";ins+="<br><a href='#' style='cursor:pointer;color:blue' onclick='new YAHOO.util.KeyListener(document.body,{alt:true,keys:67},{fn: function(type, args, obj){alert(i3GEO.coordenadas.MODOTEXTO);}}).enable();' >"+"Clique aqui para ativar Alt+C para poder capturar as coordenadas</a>"}if(onde!==""&&$i(onde)){$i(onde).innerHTML=ins}atualizaLocalizarGeo=function(id,x,y){if(typeof(x)==='undefined'){x=objposicaocursor.dmsx}if(typeof(y)==='undefined'){y=objposicaocursor.dmsy}temp=$i(id);if(temp&&temp.style.display==="block"){i3GEO.coordenadas.atualizaGeo(x,y,id)}};for(i=0;i<n;i+=1){temp=i3GEO.coordenadas.config[tipos[i]];if(temp.ativo===true){if(temp.tipo==="geo"){if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("atualizaLocalizarGeo('"+onde+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("atualizaLocalizarGeo('"+onde+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){atualizaLocalizarGeo(onde+tipos[i],i3GEO.calculo.dd2dms(x)[0],i3GEO.calculo.dd2dms(y)[0])}}else{if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.atualizaProj4('"+onde+"','"+tipos[i]+"')")}}}if(typeof(x)!=='undefined'){i3GEO.coordenadas.atualizaProj4(onde,tipos[i],x,y)}}}}if(ativaMovimento===true){if(i3GEO.Interface.TABLET===true){if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSECLIQUE.push("i3GEO.coordenadas.limpaModoTexto()")}}else{if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.limpaModoTexto()")<0){i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.limpaModoTexto()")}}}if(i3GEO.coordenadas.formato==="bloco"){i3GEO.coordenadas.ativaBloco(onde)}}catch(men){}},limpaModoTexto:function(){i3GEO.coordenadas.MODOTEXTO=""}}; | |
374 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.gadgets={PARAMETROS:{"mostraInserirKml":{idhtml:"inserirKml"},"mostraEscalaNumerica":{idhtml:"escala"},"mostraEscalaGrafica":{idhtml:"escalaGrafica"},"mostraBuscaRapida":{idhtml:"buscaRapida",servicosexternos:true,temasmapa:false},"mostraVisual":{idhtml:""},"mostraHistoricoZoom":{idhtml:"historicozoom"},"mostraMenuSuspenso":{permiteLogin:true,idhtml:"menus",deslocaEsquerda:0,parametrosYUI:{iframe:false,autosubmenudisplay:false,showdelay:200,hidedelay:500,lazyload:false}},"mostraMenuLista":{idhtml:"menuLista"},"mostraVersao":{idhtml:"versaoi3geo"},"mostraEmail":{idhtml:"emailInstituicao"}},mostraEmail:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraEmail.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.emailInstituicao)},mostraVersao:function(id){if(arguments.length===0||id===""){id=i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml}else{i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml=id}i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.mensageminicia)},mostraCoordenadasUTM:function(id){try{i3GEO.coordenadas.mostraCoordenadasUTM.idhtml=i3GEO.gadgets.mostraCoordenadasUTM.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasUTM(id)},mostraCoordenadasGEO:function(id){try{i3GEO.coordenadas.mostraCoordenadasGEO.idhtml=i3GEO.gadgets.mostraCoordenadasGEO.idhtml}catch(e){}i3GEO.coordenadas.mostraCoordenadasGEO(id)},mostraInserirKml:function(id){var i,ins,temp;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml}if($i(id)){if(!$i("i3geo_urlkml")){i=$inputText(id,"290","i3geo_urlkml","kml url","40","");ins="<table><tr><td>Kml: "+i;temp='i3GEO.Interface.adicionaKml();';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";$i(id).innerHTML=ins}}},mostraEscalaNumerica:function(id){var i,ins,temp,onde;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml}onde=$i(id);if(onde){if(onde.style.display=="none"){onde.style.display="block"}if(!$i("i3geo_escalanum")){i="<form id='i3GEOescalanumForm' >"+$inputText(id,"100","i3geo_escalanum",$trad("d10"),"10",parseInt(i3GEO.parametros.mapscale,10))+"</form>";ins="<table><tr><td>"+i;temp='var nova = document.getElementById("i3geo_escalanum").value;';temp+='i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,nova);';ins+="</td><td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' onclick='"+temp+"' /></td></tr></table>";onde.innerHTML=ins;$i("i3GEOescalanumForm").onsubmit=function(){i3GEO.navega.aplicaEscala(i3GEO.configura.locaplic,i3GEO.configura.sid,document.getElementById("i3geo_escalanum").value);return false}}if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.gadgets.atualizaEscalaNumerica()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.gadgets.atualizaEscalaNumerica()")}}},atualizaEscalaNumerica:function(escala){var e=$i("i3geo_escalanum");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.gadgets.atualizaEscalaNumerica()");return}if(arguments.length===1){e.value=escala}else{if(i3GEO.parametros.mapscale!==""){e.value=parseInt(i3GEO.parametros.mapscale,10)}else{e.value=0}}},mostraEscalaGrafica:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml}var e,temp,ins;if($i(id)){atualizaEscalaGrafica=function(){e=$i("imagemEscalaGrafica");if(!e){i3GEO.eventos.NAVEGAMAPA.remove("atualizaEscalaGrafica()");return}temp=function(retorno){eval(retorno.data);$i("imagemEscalaGrafica").src=scaimagem};i3GEO.php.escalagrafica(temp)};if(!$i("imagemEscalaGrafica")){ins="<img class='menuarrow' src=\""+i3GEO.configura.locaplic+"/imagens/branco.gif\" title='opções' onclick='i3GEO.mapa.dialogo.opcoesEscala()' style='cursor:pointer'/><img id=imagemEscalaGrafica src='' />";$i(id).innerHTML=ins}atualizaEscalaGrafica();if(i3GEO.eventos.NAVEGAMAPA.toString().search("atualizaEscalaGrafica()")<0){i3GEO.eventos.NAVEGAMAPA.push("atualizaEscalaGrafica()")}}},mostraBuscaRapida:function(id){var i,ins,temp,fbusca;if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml}i3GEO.gadgets.mostraBuscaRapida.id=id;if($i(id)){i3geo_buscaRapida=function(){alert("i3geo_buscaRapida foi depreciada")};i="<form id=i3GEObotaoFormBuscaRapida"+id+" >"+$inputText(id,"256","valorBuscaRapida"+id,"Município, cidade, UC, endereço...","20",$trad("o2"))+"</form>";ins="<table><tr><td><a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=8&idajuda=71' > </a></td><td>"+i+"</td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' title='"+$trad("p13")+"' class='ticPropriedades2' id=i3GEObotaoPropriedadesBuscaRapida"+id+" /></td>";ins+="<td><img src='"+i3GEO.util.$im("branco.gif")+"' class='tic' id=i3GEObotaoBuscaRapida"+id+" /></td></tr></table>";temp=$i(id);if(temp){fbusca=function(){if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos===false&&i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa===false){alert("Escolha um tipo de busca nas propriedades");return}if($i("valorBuscaRapida"+id).value===""){alert("Digite uma palavra para busca!");return}i3GEO.janela.cria("300px","280px",i3GEO.configura.locaplic+"/ferramentas/buscarapida/index.htm","","","Busca rapida");return false};temp.innerHTML=ins;$i("i3GEObotaoBuscaRapida"+id).onclick=fbusca;$i("i3GEObotaoFormBuscaRapida"+id).onsubmit=fbusca;$i("i3GEObotaoPropriedadesBuscaRapida"+id).onclick=function(){var ins,interno="",externo="";i3GEO.janela.cria("300px","150px","","","","Propriedades","i3GEOpropriedadesBuscaRapida"+id);if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos){externo="checked"}if(i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa){interno="checked"}ins="<p class=paragrafo >Onde será feita a busca:</p>"+"<table class=lista3 >"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.servicosexternos = this.checked' type=checkbox "+externo+" ></td><td>Serviços de busca externos (Google e MMA)</td></tr>"+"<tr><td><input style=cursor:pointer onclick='i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.temasmapa = this.checked' type=checkbox "+interno+" ></td><td>Temas existentes no mapa</td></tr>"+"</table><br>"+"<p class=paragrafo >Apenas os temas especialmente configurados pelo administrador do i3Geo podem receber operações de busca.</p>";$i("i3GEOpropriedadesBuscaRapida"+id+"_corpo").innerHTML=ins}}}},mostraHistoricoZoom:function(id){if(arguments.length===0){id=i3GEO.gadgets.PARAMETROS.mostraHistoricoZoom.idhtml}if($i(id)){marcadorZoom="";var ins="<table style='text-align:center;position:relative;left:";if(navm){ins+="0px;'>"}else{ins+="6px;'>"}ins+="<tr><td><img id='i3geo_zoomanterior' class='zoomAnterior' title='anterior' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="<td> </td>";ins+="<td><img id='i3geo_zoomproximo' class='zoomProximo' title='proximo' src='"+i3GEO.util.$im("branco.gif")+"' /></td>";ins+="</tr></table>";$i(id).innerHTML=ins}},visual:{inicia:function(id){alert("A i3GEO.gadgets.visual foi depreciado")},troca:function(visual){alert("A i3GEO.gadgets.visual foi depreciado")}},mostraMenuSuspenso:function(id){var objid,n,i,estilo,t,onMenuBarBeforeRender,temp,i3GEOoMenuBarLocal,ms=i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso,confm=i3GEO.configura.oMenuData,ins="",alinhamento="";if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(!objid){return}if(objid&&objid.innerHTML===""){try{if(ms.permiteLogin===true||i3GEO.parametros.editor==="sim"){i3GEO.configura.oMenuData.menu.push({nome:"Admin",id:"i3GeoAdmin"});i3GEO.configura.oMenuData.submenus.i3GeoAdmin=[];if(ms.permiteLogin===true){i3GEO.configura.oMenuData.submenus.i3GeoAdmin.push({id:"omenudataAdminu1",text:"Login",url:"javascript:i3GEO.login.dialogo.abreLogin()"},{id:"omenudataAdminu2",text:"Logout",url:"javascript:i3GEO.login.dialogo.abreLogout()"});i3GEO.login.recarrega=true}if(i3GEO.login.verificaCookieLogin()){i3GEO.configura.oMenuData.submenus.i3GeoAdmin.push({id:"omenudataAdmin1",text:$trad("x1"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/admin/index.html')"},{id:"omenudataAdmin2",text:$trad("g1a"),url:"javascript:var w = window.open(i3GEO.configura.locaplic+'/admin/html/arvore.html')"},{id:"omenudataAdmin3",text:$trad("x10"),url:"javascript:i3GEO.arvoreDeTemas.abrejanelaIframe('900','700','"+i3GEO.configura.locaplic+"/admin/html/menus.html\')"})}}}catch(e){}i3GEOoMenuBar=YAHOO.widget.MenuManager;if(objid){objid.className="yuimenubar";temp=$i("contemMenu");if(temp){temp.className="yui-navset"}if(ms.deslocaEsquerda){alinhamento="left:"+ms.deslocaEsquerda*-1+"px;"}if(!objid.style.height||parseInt(objid.style.height,10)===0){objid.style.height="21px"}else{if(!temp.style.height||parseInt(temp.style.height)===0){temp.style.height="21px"}}ins+='<div class="bd" style="top:0px;'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >'+'<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';n=confm.menu.length;estilo="padding-bottom:3px;top:0px;border: 0px solid white;";for(i=0;i<n;i+=1){t="";if(confm.menu[i].target){t="target="+confm.menu[i].target}if(confm.submenus[confm.menu[i].id].length>0){ins+='<li class="yuimenubaritem" style="padding-top:2px;"><a style="'+estilo+'" href="#" class="yuimenubaritemlabel" '+t+'id="menu'+confm.menu[i].id+'" > '+confm.menu[i].nome+'</a></li>'}}ins+='</ul>';ins+='</div>';objid.innerHTML=ins;if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI.iframe=true}i3GEOoMenuBarLocal=new YAHOO.widget.MenuBar(id,i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.parametrosYUI);onMenuBarBeforeRender=function(p_sType,p_sArgs){var nomeMenu="",nomeSub,subs=i3GEO.configura.oMenuData.submenus,conta=0;for(nomeMenu in subs){if($i("menu"+nomeMenu)){nomeSub=subs[nomeMenu];if(nomeSub!==""){i3GEOoMenuBarLocal.getItem(conta).cfg.setProperty('submenu',{id:nomeMenu,itemdata:nomeSub})}conta+=1}}};i3GEOoMenuBar.addMenu(i3GEOoMenuBarLocal);i3GEOoMenuBarLocal.beforeRenderEvent.subscribe(onMenuBarBeforeRender);i3GEOoMenuBarLocal.render()}}temp=["omenudataInterface1","omenudataInterface2","omenudataInterface3","omenudataInterface4","omenudataInterface5"];n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("checked",false)}}try{temp="";switch(i3GEO.Interface.ATUAL){case"openlayers":temp="omenudataInterface2";break;case"googlemaps":temp="omenudataInterface4";break;case"googleearth":temp="omenudataInterface5";break}if(temp!=""&&$i(temp)){i3GEOoMenuBar.getMenuItem(temp).cfg.setProperty("checked",true)}}catch(e){}temp=["omenudataFerramentas7b","omenudataArquivos3","omenudataJanelas1","omenudataJanelas3","omenudataFerramentas2a"];n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("disabled",false)}}try{temp=[];switch(i3GEO.Interface.ATUAL){case"openlayers":temp=["omenudataArquivos3","omenudataJanelas1"];break;case"googlemaps":temp=["omenudataArquivos3","omenudataJanelas1","omenudataJanelas3"];break;case"googleearth":temp=["omenudataFerramentas7b","omenudataArquivos3","omenudataJanelas3","omenudataFerramentas2a"];break};n=temp.length;while(n>0){n-=1;i=i3GEOoMenuBar.getMenuItem(temp[n]);if(i){i.cfg.setProperty("disabled",true)}}}catch(e){}temp=objid.style;temp.backgroundPosition="0px -1px";temp.border="0px solid white";if(ms.finaliza&&ms.finaliza!=""){eval(ms.finaliza)}},mostraMenuLista:function(id){var objid,n,i,sub,nomeMenu="",ms=i3GEO.gadgets.PARAMETROS.mostraMenuLista,confm=i3GEO.configura.oMenuData,ins="",subs=i3GEO.configura.oMenuData.submenus;if(arguments.length===0){id=ms.idhtml}else{ms.idhtml=id}objid=$i(id);if(objid){n=confm.menu.length;for(i=0;i<n;i+=1){ins+='<div class="listaMenuTitulo" id=menulista_'+confm.menu[i].id+'>'+confm.menu[i].nome+'</div>'}objid.innerHTML=ins;for(nomeMenu in subs){if($i("menulista_"+nomeMenu)){sub=subs[nomeMenu];n=sub.length;ins="";for(i=0;i<n;i++){ins+="<p class='listaMenuItem' ><a href='"+sub[i].url+"' target='_blank'>"+sub[i].text+"</a>"}$i("menulista_"+nomeMenu).innerHTML+=ins}}}}}; | |
375 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.social={curtirFacebook:function(url,tipo){if(tipo==="comtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&width=160&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:160px; height:21px;' allowTransparency='true'></iframe>"}if(tipo==="semtotal"){return"<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>"}},publicarTwitter:function(url,tipo){var re=new RegExp("=","g");url=url.replace(re,'%3d');if(tipo==="comtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=horizontal&via=i3geo&url='+url+'" style="width:100px; height:21px;"></iframe>'}if(tipo==="semtotal"){return'<iframe allowtransparency="true" frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?count=none&via=i3geo&url='+url+'" style="width:65px; height:21px;"></iframe>'}},compartilhar:function(id,urlcf,urlpt,tipo,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}if(!tipo){tipo="comtotal"}var onde=$i(id),tabela="";if(tipo==="comtotal"){tabela+="<table style='width:250px' ><tr>"}if(tipo==="semtotal"){tabela+="<table style='width:115px' ><tr>"}if(onde||id===""){if(urlpt!==""){tabela+="<td>"+i3GEO.social.publicarTwitter(urlpt,tipo)+"</td>"}if(urlcf!==""){tabela+="<td>"+i3GEO.social.curtirFacebook(urlcf,tipo)+"</td>"}tabela+="</tr></table>";if(id!==""){onde.innerHTML=tabela}return tabela}else{return false}},bookmark:function(link,locaplic){if(!locaplic){locaplic=i3GEO.configura.locaplic}var ins="<img style='cursor:pointer' src='"+locaplic+"/imagens/delicious.gif' onclick='javascript:window.open(\"http://del.icio.us/post?url="+link+"\")' title='Delicious'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/digg.gif' onclick='javascript:window.open(\"http://digg.com/submit/post?url="+link+"\")' title='Digg'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+link+"\")' title='Facebook'/> ";ins+="<img style='cursor:pointer' src='"+locaplic+"/imagens/stumbleupon.gif' onclick='javascript:window.open(\"http://www.stumbleupon.com/submit?url="+link+"\")' title='StumbleUpon'/>";return ins}}; | |
376 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.login={divnomelogin:"i3GEONomeLogin",recarrega:false,funcaoLoginOk:null,funcaoLoginErro:null,dialogo:{abreLogin:function(locaplic){var js;if(!locaplic){locaplic=i3GEO.configura.locaplic}if(typeof(i3GEOF.loginusuario)==='undefined'){js=locaplic+"/ferramentas/loginusuario/index.js";i3GEO.util.scriptTag(js,"i3GEOF.loginusuario.criaJanelaFlutuante()","i3GEOF.loginusuario_script")}else{i3GEOF.loginusuario.criaJanelaFlutuante()}},abreLogout:function(){var r=confirm($trad("x26"));if(r==true){i3GEO.login.anulaCookie();i3GEO.janela.destroi("i3GEOF.loginusuario");if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML=""}if(i3GEO.login.recarrega==true){document.location.reload()}}}},anulaCookie:function(){i3GEO.util.insereCookie("i3geocodigologin","",1);i3GEO.util.insereCookie("i3geousuariologin","",1);i3GEO.util.insereCookie("i3geousuarionome","",1);i3GEO.util.insereCookie("i3GeoLogin","",1)},verificaCookieLogin:function(){var a=i3GEO.util.pegaCookie("i3geocodigologin"),b=i3GEO.util.pegaCookie("i3geocodigologin"),c=i3GEO.util.pegaCookie("i3geousuarionome");if(a&&b&&c&&a!=""&&b!=""&&c!=""){return true}else{return false}},verificaOperacao:function(operacao,locaplic,funcaoOk,tipo,funcaoErro){var p="",cp,temp,resultado=true;if(!i3GEO.login.verificaCookieLogin()){if(!funcaoErro){alert("Login!")}else{funcaoErro.call()}return false}if(!locaplic){locaplic=i3GEO.configura.locaplic}temp=function(retorno){if(retorno.data=="sim"){resultado=true}else{resultado=false}if(resultado===true){if(funcaoOk&&funcaoOk!=""){funcaoOk.call()}}else{if($i(i3GEO.login.divnomelogin)){$i(i3GEO.login.divnomelogin).innerHTML=""}if(funcaoErro&&funcaoErro!=""&&resultado===false){funcaoErro.call()}}return resultado};if(tipo==="sessao"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaosessao"}if(tipo==="banco"){p=locaplic+"/admin/php/login.php?funcao=validaoperacaobanco"}cp=new cpaint();cp.set_response_type("JSON");cp.set_transfer_mode("POST");cp.call(p,"login",temp,"&operacao="+operacao)}}; | |
377 | 377 | /* |
378 | 378 | * euDock - javascript Emulation of Dock style MAC OS X bar |
379 | 379 | * | ... | ... |
ferramentas/graficointerativo/index.js
... | ... | @@ -50,79 +50,79 @@ Classe: i3GEOF.graficointerativo |
50 | 50 | i3GEOF.graficointerativo = { |
51 | 51 | /* |
52 | 52 | Variavel: aguarde |
53 | - | |
53 | + | |
54 | 54 | Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. |
55 | 55 | */ |
56 | 56 | aguarde: "", |
57 | 57 | /* |
58 | 58 | Propriedade: titulo |
59 | - | |
59 | + | |
60 | 60 | Título do gráfico. Se for vazio, será obtido do nome do tema selecionado |
61 | 61 | */ |
62 | - titulo: "", | |
62 | + titulo: "", | |
63 | 63 | /* |
64 | 64 | Propriedade: tipo |
65 | - | |
65 | + | |
66 | 66 | Tipo de gráfico escolhido pelo usuário. |
67 | 67 | */ |
68 | 68 | tipo: "", |
69 | 69 | /* |
70 | 70 | Propriedade: acumula |
71 | - | |
71 | + | |
72 | 72 | Acumula os valores ao gerar o gráfico |
73 | - | |
73 | + | |
74 | 74 | Type: |
75 | 75 | {boolean} |
76 | - | |
76 | + | |
77 | 77 | Default: |
78 | 78 | {false} |
79 | 79 | */ |
80 | 80 | acumula: false, |
81 | 81 | /* |
82 | 82 | Propriedade: relativa |
83 | - | |
83 | + | |
84 | 84 | Utiliza valores relativos ao criar o gráfico |
85 | - | |
85 | + | |
86 | 86 | Type: |
87 | 87 | {boolean} |
88 | - | |
88 | + | |
89 | 89 | Default: |
90 | 90 | {false} |
91 | 91 | */ |
92 | 92 | relativa: false, |
93 | 93 | /* |
94 | 94 | Propriedade: dadospuros |
95 | - | |
95 | + | |
96 | 96 | Não faz nenhum tipo de processamento nos dados antes de gerar o gráfico |
97 | - | |
97 | + | |
98 | 98 | Type: |
99 | 99 | {boolean} |
100 | - | |
100 | + | |
101 | 101 | Default: |
102 | 102 | {false} |
103 | 103 | */ |
104 | 104 | dadospuros: false, |
105 | 105 | /* |
106 | 106 | Propriedade: navegacao |
107 | - | |
107 | + | |
108 | 108 | Ativa ou não a navegação dinâmica do mapa |
109 | - | |
109 | + | |
110 | 110 | Type: |
111 | 111 | {boolean} |
112 | - | |
112 | + | |
113 | 113 | Default: |
114 | 114 | {false} |
115 | 115 | */ |
116 | 116 | navegacao:false, |
117 | 117 | /* |
118 | 118 | Function: inicia |
119 | - | |
119 | + | |
120 | 120 | Inicia a ferramenta. É chamado por criaJanelaFlutuante |
121 | - | |
121 | + | |
122 | 122 | Parametros: |
123 | - | |
123 | + | |
124 | 124 | iddiv {String} - id do div que receberá o conteudo HTML da ferramenta |
125 | - | |
125 | + | |
126 | 126 | dados {JSON} - dados para o gráfico (opcional) exemplo ["n;x","'Argentina';33796870","'Paraguay';4773464","'Brazil';151525400","'Chile';13772710"] |
127 | 127 | */ |
128 | 128 | inicia: function(iddiv,dados){ |
... | ... | @@ -183,7 +183,7 @@ i3GEOF.graficointerativo = { |
183 | 183 | ); |
184 | 184 | if(arguments.length === 2){ |
185 | 185 | //i3GEOF.graficointerativo.tipo = "pizza2d"; |
186 | - //var retorno = {"attributes":{"id":""},"data":{"dados":["n;x","'4';3839572","'8';81710320","'7';24631314","'2';10967753","'1';24496400","'3';18752482","'5';13574480","'6';216507515"]}}; | |
186 | + //var retorno = {"attributes":{"id":""},"data":{"dados":["n;x","'4';3839572","'8';81710320","'7';24631314","'2';10967753","'1';24496400","'3';18752482","'5';13574480","'6';216507515"]}}; | |
187 | 187 | i3GEOF.graficointerativo.montaTabelaDados(dados); |
188 | 188 | $i("i3GEOgraficointerativoguia4").onclick.call(); |
189 | 189 | } |
... | ... | @@ -192,11 +192,11 @@ i3GEOF.graficointerativo = { |
192 | 192 | }, |
193 | 193 | /* |
194 | 194 | Function: html |
195 | - | |
195 | + | |
196 | 196 | Gera o código html para apresentação das opções da ferramenta |
197 | - | |
197 | + | |
198 | 198 | Retorno: |
199 | - | |
199 | + | |
200 | 200 | String com o código html |
201 | 201 | */ |
202 | 202 | html:function(){ |
... | ... | @@ -274,17 +274,17 @@ i3GEOF.graficointerativo = { |
274 | 274 | '<div class=guiaobj id="i3GEOgraficointerativoguia4obj" style="left:1px;display:none;top:-0px">' + |
275 | 275 | '</div>' + |
276 | 276 | '<div id="i3GEOgraficointerativoGrafico" style="position:relative;top:-10px;display:none"></div>'; |
277 | - return ins; | |
277 | + return ins; | |
278 | 278 | }, |
279 | 279 | /* |
280 | 280 | Function: criaJanelaFlutuante |
281 | - | |
281 | + | |
282 | 282 | Cria a janela flutuante para controle da ferramenta. |
283 | - | |
283 | + | |
284 | 284 | Parametro |
285 | - | |
285 | + | |
286 | 286 | dados {JSON} - dados para o gráfico |
287 | - */ | |
287 | + */ | |
288 | 288 | criaJanelaFlutuante: function(dados){ |
289 | 289 | var minimiza,cabecalho,janela,divid,temp,titulo; |
290 | 290 | //cria a janela flutuante |
... | ... | @@ -327,7 +327,7 @@ i3GEOF.graficointerativo = { |
327 | 327 | google.earth.removeEventListener(graficointerativoDragend); |
328 | 328 | } |
329 | 329 | if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEOF.graficointerativo.comboTemas()") > 0) |
330 | - {i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEOF.graficointerativo.comboTemas()");} | |
330 | + {i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEOF.graficointerativo.comboTemas()");} | |
331 | 331 | }; |
332 | 332 | YAHOO.util.Event.addListener(janela[0].close, "click", temp); |
333 | 333 | if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEOF.graficointerativo.comboTemas()") < 0) |
... | ... | @@ -335,7 +335,7 @@ i3GEOF.graficointerativo = { |
335 | 335 | }, |
336 | 336 | /* |
337 | 337 | Function: ativaFoco |
338 | - | |
338 | + | |
339 | 339 | Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado |
340 | 340 | */ |
341 | 341 | ativaFoco: function(){ |
... | ... | @@ -346,7 +346,7 @@ i3GEOF.graficointerativo = { |
346 | 346 | }, |
347 | 347 | /* |
348 | 348 | Function: comboTemas |
349 | - | |
349 | + | |
350 | 350 | Monta o combo para escolha do tema que será utilizado no gráfico |
351 | 351 | */ |
352 | 352 | comboTemas: function(){ |
... | ... | @@ -370,11 +370,11 @@ i3GEOF.graficointerativo = { |
370 | 370 | "", |
371 | 371 | false, |
372 | 372 | "ligados" |
373 | - ); | |
373 | + ); | |
374 | 374 | }, |
375 | 375 | /* |
376 | 376 | Function: ativaTipo |
377 | - | |
377 | + | |
378 | 378 | Define a variável com o tipo de gráfico e mostra a guia 2 |
379 | 379 | */ |
380 | 380 | ativaTipo: function(obj){ |
... | ... | @@ -386,7 +386,7 @@ i3GEOF.graficointerativo = { |
386 | 386 | }, |
387 | 387 | /* |
388 | 388 | Function: configuraDados |
389 | - | |
389 | + | |
390 | 390 | Configura o formulário para obtenção dos dados para cada tipo de gráfico |
391 | 391 | */ |
392 | 392 | configuraDados: function(){ |
... | ... | @@ -409,11 +409,11 @@ i3GEOF.graficointerativo = { |
409 | 409 | }, |
410 | 410 | /* |
411 | 411 | Function: comboItensSel |
412 | - | |
412 | + | |
413 | 413 | Cria um combo para selecionar os itens do tema escolhido |
414 | - | |
414 | + | |
415 | 415 | Veja: |
416 | - | |
416 | + | |
417 | 417 | <i3GEO.util.comboItens> |
418 | 418 | */ |
419 | 419 | comboItensSel: function(){ |
... | ... | @@ -438,11 +438,11 @@ i3GEOF.graficointerativo = { |
438 | 438 | }, |
439 | 439 | /* |
440 | 440 | Function: obterDados |
441 | - | |
441 | + | |
442 | 442 | Obtém os dados que serão utilizados no gráfico |
443 | - | |
443 | + | |
444 | 444 | Veja: |
445 | - | |
445 | + | |
446 | 446 | <GRAFICOSELECAO> |
447 | 447 | */ |
448 | 448 | obterDados: function(){ |
... | ... | @@ -457,16 +457,16 @@ i3GEOF.graficointerativo = { |
457 | 457 | tipo = $i("i3GEOgraficointerativoTipoAgregacao").value, |
458 | 458 | ordenax = "sim", |
459 | 459 | monta; |
460 | - | |
460 | + | |
461 | 461 | if($i("i3GEOgraficointerativoDadosPuros").checked) |
462 | 462 | {tipo = "nenhum";} |
463 | - else{ | |
463 | + else{ | |
464 | 464 | if(x === y) |
465 | 465 | {tipo = "conta";} |
466 | 466 | } |
467 | 467 | if(!$i("i3GEOgraficointerativoOrdenaX").checked) |
468 | - {ordenax = "nao";} | |
469 | - | |
468 | + {ordenax = "nao";} | |
469 | + | |
470 | 470 | if(tema === "") |
471 | 471 | {alert("Escolha um tema");return;} |
472 | 472 | if(x === "") |
... | ... | @@ -484,11 +484,11 @@ i3GEOF.graficointerativo = { |
484 | 484 | }, |
485 | 485 | /* |
486 | 486 | Function: montaTabelaDados |
487 | - | |
487 | + | |
488 | 488 | Monta a tabela com os dados que serão utilizados no gráfico |
489 | - | |
489 | + | |
490 | 490 | Parametro: |
491 | - | |
491 | + | |
492 | 492 | retorno {JSON} - dados no formato JSON |
493 | 493 | */ |
494 | 494 | montaTabelaDados: function(retorno){ |
... | ... | @@ -530,7 +530,7 @@ i3GEOF.graficointerativo = { |
530 | 530 | } |
531 | 531 | ins.push($inputText("","",id+"_cor","",12,cor,"cor")); |
532 | 532 | ins.push("</td><td>"); |
533 | - ins.push("<img alt='aquarela.gif' style=cursor:pointer src='"+i3GEO.configura.locaplic+"/imagens/aquarela.gif' onclick='i3GEOF.graficointerativo.corj(\""+id+"_cor\")' />"); | |
533 | + ins.push("<img alt='aquarela.gif' style=cursor:pointer src='"+i3GEO.configura.locaplic+"/imagens/aquarela.gif' onclick='i3GEOF.graficointerativo.corj(\""+id+"_cor\")' />"); | |
534 | 534 | ins.push("</td></tr>"); |
535 | 535 | } |
536 | 536 | ins.push("</table><br>"); |
... | ... | @@ -538,7 +538,7 @@ i3GEOF.graficointerativo = { |
538 | 538 | }, |
539 | 539 | /* |
540 | 540 | Function: tabela2dados |
541 | - | |
541 | + | |
542 | 542 | Obtém os dados da tabela para compor o gráfico |
543 | 543 | */ |
544 | 544 | tabela2dados: function(){ |
... | ... | @@ -608,9 +608,9 @@ i3GEOF.graficointerativo = { |
608 | 608 | if(temp > maiorNome) |
609 | 609 | {maiorNome = temp;} |
610 | 610 | if(temp < menorNome) |
611 | - {menorNome = temp;} | |
611 | + {menorNome = temp;} | |
612 | 612 | par.push({"value":inputs[i+1].value * 1,"label":inputs[i].value+" "}); |
613 | - | |
613 | + | |
614 | 614 | temp = inputs[i+1].value * 1; |
615 | 615 | if($i("i3GEOgraficointerativoAcumula").checked) |
616 | 616 | {temp = acum;} |
... | ... | @@ -709,7 +709,7 @@ i3GEOF.graficointerativo = { |
709 | 709 | "title":{ |
710 | 710 | "text": titulo, |
711 | 711 | "style": "{font-size: "+tituloSize+"; color:"+tituloCor+"; text-align: "+tituloAlinhamento+";}" |
712 | - } | |
712 | + } | |
713 | 713 | }; |
714 | 714 | if($i("i3GEOgraficointerativoAdLinhas").checked){ |
715 | 715 | parametros.elements.push({ |
... | ... | @@ -731,7 +731,7 @@ i3GEOF.graficointerativo = { |
731 | 731 | temp.push({"left":0,right:valores[i]}); |
732 | 732 | } |
733 | 733 | parametros.elements[0].values = temp; |
734 | - | |
734 | + | |
735 | 735 | parametros.x_axis = { |
736 | 736 | "min": 0, |
737 | 737 | "max": maior, |
... | ... | @@ -742,7 +742,7 @@ i3GEOF.graficointerativo = { |
742 | 742 | "labels": nomes |
743 | 743 | }; |
744 | 744 | parametros.x_legend.text = legendaY; |
745 | - parametros.y_legend.text = legendaX; | |
745 | + parametros.y_legend.text = legendaX; | |
746 | 746 | } |
747 | 747 | if(i3GEOF.graficointerativo.tipo === "scatter"){ |
748 | 748 | n = valores.length; |
... | ... | @@ -797,7 +797,7 @@ i3GEOF.graficointerativo = { |
797 | 797 | }, |
798 | 798 | /* |
799 | 799 | Function: excluilinha |
800 | - | |
800 | + | |
801 | 801 | Exclui uma linha da tabela de dados |
802 | 802 | */ |
803 | 803 | excluilinha: function(celula){ |
... | ... | @@ -809,14 +809,14 @@ i3GEOF.graficointerativo = { |
809 | 809 | }, |
810 | 810 | /* |
811 | 811 | Function: corj |
812 | - | |
812 | + | |
813 | 813 | Abre a janela para o usuário selecionar uma cor interativamente |
814 | 814 | */ |
815 | 815 | corj: function(obj) |
816 | 816 | {i3GEO.util.abreCor("",obj,"hex");}, |
817 | 817 | /* |
818 | 818 | Function: ordenaColuna |
819 | - | |
819 | + | |
820 | 820 | Ordena uma coluna da tabela |
821 | 821 | */ |
822 | 822 | ordenaColuna: function(coluna,cid){ |
... | ... | @@ -834,7 +834,7 @@ i3GEOF.graficointerativo = { |
834 | 834 | temp, |
835 | 835 | chaves = [], |
836 | 836 | numero = false; |
837 | - | |
837 | + | |
838 | 838 | function sortNumber(a,b) |
839 | 839 | {return a - b;} |
840 | 840 | for (t=1;t<ntrs;t++) |
... | ... | @@ -867,7 +867,7 @@ i3GEOF.graficointerativo = { |
867 | 867 | }, |
868 | 868 | /* |
869 | 869 | Function: ativaNavegacao |
870 | - | |
870 | + | |
871 | 871 | Ativa ou desativa a atualização automática ao navegar no mapa |
872 | 872 | */ |
873 | 873 | ativaNavegacao: function(obj){ |
... | ... | @@ -877,11 +877,11 @@ i3GEOF.graficointerativo = { |
877 | 877 | } |
878 | 878 | if(i3GEO.Interface.ATUAL === "googlemaps"){ |
879 | 879 | graficointerativoDragend = GEvent.addListener(i3GeoMap, "dragend", function() {i3GEOF.graficointerativo.obterDados();}); |
880 | - graficointerativoZoomend = GEvent.addListener(i3GeoMap, "zoomend", function() {i3GEOF.graficointerativo.obterDados();}); | |
880 | + graficointerativoZoomend = GEvent.addListener(i3GeoMap, "zoomend", function() {i3GEOF.graficointerativo.obterDados();}); | |
881 | 881 | } |
882 | 882 | if(i3GEO.Interface.ATUAL === "googleearth"){ |
883 | 883 | graficointerativoDragend = google.earth.addEventListener(i3GeoMap.getView(), "viewchangeend", function() {i3GEOF.graficointerativo.obterDados();}); |
884 | - } | |
884 | + } | |
885 | 885 | } |
886 | 886 | else{ |
887 | 887 | if(i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth"){ |
... | ... | @@ -1075,7 +1075,7 @@ replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { |
1075 | 1075 | |
1076 | 1076 | |
1077 | 1077 | |
1078 | -/* SWFObject v2.2 <http://code.google.com/p/swfobject/> | |
1079 | - is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> | |
1078 | +/* SWFObject v2.2 <http://code.google.com/p/swfobject/> | |
1079 | + is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> | |
1080 | 1080 | */ |
1081 | -var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}(); | |
1081 | +swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}(); | ... | ... |
ferramentas/imprimir/janelas.js
1 | 1 | g_movedoca = 0; |
2 | 2 | wd = 0; |
3 | -var novoel = document.createElement("div"); | |
3 | +novoel = document.createElement("div"); | |
4 | 4 | novoel.id = "wdoca"; |
5 | 5 | novoel.style.zIndex = "5000"; |
6 | 6 | novoel.style.left="0px"; |
7 | 7 | novoel.innerHTML = '<table><tr><td width=100% title="click para mover" class="tdclara" style="background-color:gray;cursor:move;" onmouseup="javascript:g_movedoca=0" onmousedown="javascript:if (g_movedoca==1){g_movedoca=0} else{wd = x;g_movedoca=1};movewdocaf()"><span style="background-color:gray" ></span><span style="color:white" id=textowdoca ></span></tr><tr><td valign="top" ><iframe name=wdocai id=wdocai valign="top" ></iframe></td></tr></table><div id=wdocadiv ></div>'; |
8 | 8 | document.body.appendChild(novoel); |
9 | 9 | |
10 | -var g_sid=window.opener.parent.g_sid; | |
11 | -var corpo = window.opener.parent.document.getElementById("img").src; | |
12 | -var legenda = window.opener.g_legendaHTML; | |
13 | -var escalanumerica = window.opener.parent.i3GEO.parametros.mapscale; | |
10 | +//var g_sid=window.opener.parent.g_sid; | |
14 | 11 | |
15 | -document.getElementById("mapa").innerHTML = "<img src="+corpo+" />"; | |
16 | -document.getElementById("legenda").innerHTML = legenda; | |
17 | -document.getElementById("escalanumerica").innerHTML = "1: "+escalanumerica; | |
12 | +document.getElementById("mapa").innerHTML = "<img src="+window.opener.parent.document.getElementById("img").src+" />"; | |
13 | +document.getElementById("legenda").innerHTML = window.opener.g_legendaHTML; | |
14 | +document.getElementById("escalanumerica").innerHTML = "1: "+window.opener.parent.i3GEO.parametros.mapscale; | |
18 | 15 | |
19 | 16 | |
20 | 17 | function processevent1(exy1) | ... | ... |
ferramentas/loginusuario/index.js
... | ... | @@ -86,7 +86,8 @@ i3GEOF.loginusuario = { |
86 | 86 | '<input id=i3geousuario type=text style="width:250px;" value=""/>' + |
87 | 87 | '<p class="paragrafo" >'+$trad("x28")+':<br>' + |
88 | 88 | '<input id=i3geosenha type=password style="width:250px;" value=""/><br>' + |
89 | - '<p class="paragrafo" ><input id=i3GEOFloginusuario size=20 type=button value="'+$trad("x29")+'" /> <input id=i3GEOFlogoutusuario size=20 type=button value="Logout" />'; | |
89 | + '<p class="paragrafo" ><input id=i3GEOFloginusuario size=20 type=button value="'+$trad("x29")+'" /> <input id=i3GEOFlogoutusuario size=20 type=button value="Logout" />' + | |
90 | + '<p class="paragrafo" onclick="i3GEOF.loginusuario.recuperarSenha()" style="cursor:pointer;color:blue;">'+$trad("x27")+'</p>'; | |
90 | 91 | return ins; |
91 | 92 | }, |
92 | 93 | /* |
... | ... | @@ -174,5 +175,21 @@ i3GEOF.loginusuario = { |
174 | 175 | cp.set_transfer_mode("POST"); |
175 | 176 | cp.set_response_type("JSON"); |
176 | 177 | cp.call(p,"login",temp,"&usuario="+u+"&senha="+s); |
178 | + }, | |
179 | + recuperarSenha: function(){ | |
180 | + var u = $i("i3geousuario").value, | |
181 | + temp,cp; | |
182 | + if(u == ""){ | |
183 | + alert($trad("x30")); | |
184 | + return; | |
185 | + } | |
186 | + temp = function(retorno){ | |
187 | + | |
188 | + }; | |
189 | + p = i3GEO.configura.locaplic+"/admin/php/login.php?funcao=recuperarSenha"; | |
190 | + cp = new cpaint(); | |
191 | + cp.set_transfer_mode("POST"); | |
192 | + cp.set_response_type("JSON"); | |
193 | + cp.call(p,"login",temp,"&usuario="+u); | |
177 | 194 | } |
178 | 195 | }; | ... | ... |
ferramentas/nuvemtagsflash/index.js
1 | 1 | //inicializa |
2 | 2 | function iniciaNuvem(){ |
3 | - YAHOO.example.linksRSS = [ | |
4 | - "http://www.mma.gov.br/webservice/noticias/rss_noticias.php", | |
3 | + YAHOO.example.linksRSS = [ | |
4 | + "http://www.mma.gov.br/webservice/noticias/rss_noticias.php", | |
5 | 5 | "http://www.estadao.com.br/rss/ultimas.xml", |
6 | 6 | "http://www.estadao.com.br/rss/vidae.xml", |
7 | 7 | "http://feeds.folha.uol.com.br/folha/emcimadahora/rss091.xml" |
8 | 8 | ]; |
9 | - | |
9 | + | |
10 | 10 | YAHOO.example.ACJSArray = new function() { |
11 | 11 | // Instantiate first JS Array DataSource |
12 | 12 | this.oACDS = new YAHOO.widget.DS_JSArray(YAHOO.example.linksRSS); |
... | ... | @@ -34,8 +34,8 @@ function iniciaNuvem(){ |
34 | 34 | botao1.on("click", buscarss); |
35 | 35 | } |
36 | 36 | YAHOO.util.Event.onContentReady("botao1", onPushButtonsMarkupReady); |
37 | - | |
38 | - | |
37 | + | |
38 | + | |
39 | 39 | }(); |
40 | 40 | aguarde("block"); |
41 | 41 | parametrosURL(); |
... | ... | @@ -71,7 +71,7 @@ function montaNuvem(r) |
71 | 71 | for (r=0;r<retorno.data[i].noticias.length;r++) |
72 | 72 | { |
73 | 73 | linkrss += "<span><a href='"+retorno.data[i].noticias[r].link+"' target=blanck ><img style=cursor:pointer src='../../imagens/mais.png' title='"+retorno.data[i].noticias[r].titulo+"'/></a></span>" ; |
74 | - } | |
74 | + } | |
75 | 75 | } |
76 | 76 | tags += "<span> </span> <span onmouseout='this.style.textDecoration=\"none\"' onmouseover='this.style.textDecoration=\"underline\"' onclick='procurar(\""+retorno.data[i].tag+"\")' style='cursor:pointer;vertical-align:middle;color:rgb("+cor+");font-size:"+h+"pt;'>"+retorno.data[i].tag+"</span>"+linkrss; |
77 | 77 | if(h > 7) |
... | ... | @@ -87,10 +87,10 @@ function montaNuvem(r) |
87 | 87 | } |
88 | 88 | //pega a lista de tags |
89 | 89 | $i("resultado").innerHTML = "Aguarde..."; |
90 | -var cp = new cpaint(); | |
90 | +cp = new cpaint(); | |
91 | 91 | cp.set_response_type("JSON"); |
92 | 92 | //cp.set_debug(2) |
93 | -var p = "../../classesphp/mapa_controle.php?funcao=listaTags&rss=&nrss=&g_sid="+g_sid; | |
93 | +p = "../../classesphp/mapa_controle.php?funcao=listaTags&rss=&nrss=&g_sid="+g_sid; | |
94 | 94 | cp.call(p,"listaTags",montaNuvem); |
95 | 95 | |
96 | 96 | function procurar(texto) |
... | ... | @@ -112,7 +112,7 @@ function buscarss() |
112 | 112 | cp.set_response_type("JSON"); |
113 | 113 | //cp.set_debug(2) |
114 | 114 | var p = g_locaplic+"/classesphp/mapa_controle.php?funcao=listaTags&g_sid="+g_sid+"&rss="+rss+"&nrss="+$i("nrss").value; |
115 | - cp.call(p,"listaTags",montaNuvem); | |
115 | + cp.call(p,"listaTags",montaNuvem); | |
116 | 116 | } |
117 | 117 | function flash() |
118 | 118 | { | ... | ... |
ferramentas/scielo/index.js
1 | 1 | //inicializa |
2 | 2 | parametrosURL() |
3 | 3 | if(window.parent.i3GEO.parametros.mapscale > 150001){ |
4 | - var ins = "<p>A busca é feita apenas para a região de abrangência do mapa atual, cuja escala deve estar em pelo menos 1:150.000." | |
4 | + ins = "<p>A busca é feita apenas para a região de abrangência do mapa atual, cuja escala deve estar em pelo menos 1:150.000." | |
5 | 5 | ins += "<p>A restrição de escala é necessária para melhorar a performance da busca." |
6 | 6 | ins += "<p>O mapa atual está fora do limite de escala (1:150.000)." |
7 | 7 | ins += "<p><input id=ajustaEscala size=20 type=button value='Ajustar' />" |
... | ... | @@ -9,7 +9,7 @@ if(window.parent.i3GEO.parametros.mapscale > 150001){ |
9 | 9 | } |
10 | 10 | else{ |
11 | 11 | if(window.parent.scieloAtivo == false){ |
12 | - var ins = "<p>A busca de artigos ainda é experimental." | |
12 | + ins = "<p>A busca de artigos ainda é experimental." | |
13 | 13 | ins += '<p>Os dados não são obtidos diretamente da base Scielo, mas sim do Ministério do Meio Ambiente.' |
14 | 14 | ins += "<p><input id=continuar size=20 type=button value='Continuar' />" |
15 | 15 | $i("resultadoscielo").innerHTML = ins; | ... | ... |
ferramentas/wmstime/index.js
... | ... | @@ -150,10 +150,10 @@ wms_configura = { |
150 | 150 | tipo: 2 |
151 | 151 | } |
152 | 152 | }; |
153 | -var ins = "<p>Escolha o serviço de fornecimento de dados (WMS-T)</p>"; | |
153 | +ins = "<p>Escolha o serviço de fornecimento de dados (WMS-T)</p>"; | |
154 | 154 | ins += "<select style='width:353px;border:1px solid gray;' onchange='escolheuServico(this.value)'>"; |
155 | 155 | ins += "<option value='' >---</option>"; |
156 | -for(var key in wms_configura){ | |
156 | +for(key in wms_configura){ | |
157 | 157 | ins += "<option value='"+key+"'>"+wms_configura[key].titulo+"</option>"; |
158 | 158 | } |
159 | 159 | ins += "</select>"; |
... | ... | @@ -194,7 +194,7 @@ function escolheuServico(idWMS){ |
194 | 194 | servico = wms_configura[idWMS].servico+"&VERSION=1.1.1&REQUEST=GetMap&layers="+wms_configura[idWMS].layers+"&styles="+wms_configura[idWMS].styles+"&srs="+wms_configura[idWMS].srs+"&format="+wms_configura[idWMS].format; |
195 | 195 | $i("iServico").value = servico; |
196 | 196 | $i("WMS_descricao").value = wms_configura[idWMS].descricao; |
197 | - | |
197 | + | |
198 | 198 | $i("WMS_anoinicio").value = wms_configura[idWMS].anoInicio; |
199 | 199 | //if(tipoServico > 1) |
200 | 200 | $i("WMS_mesinicio").value = wms_configura[idWMS].mesInicio; |
... | ... | @@ -254,7 +254,7 @@ function iniciaImagens(){ |
254 | 254 | |
255 | 255 | intervalo = 1; |
256 | 256 | id = 1; |
257 | - | |
257 | + | |
258 | 258 | ids = new Array(); |
259 | 259 | quantasLidas = 0; |
260 | 260 | onde = $i("imagens"); |
... | ... | @@ -480,7 +480,7 @@ function adicionaMapa(obj){ |
480 | 480 | if (retorno.data.erro) |
481 | 481 | {alert(retorno.data.erro);} |
482 | 482 | else |
483 | - {window.parent.i3GEO.atualiza("");} | |
483 | + {window.parent.i3GEO.atualiza("");} | |
484 | 484 | }; |
485 | 485 | var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=adicionatemawms"; |
486 | 486 | p += "&servico="+serv.servico; |
... | ... | @@ -500,7 +500,7 @@ function adicionaMapa(obj){ |
500 | 500 | var cp = new cpaint(); |
501 | 501 | cp.set_response_type("JSON"); |
502 | 502 | cp.call(p,"wmstime",fim); |
503 | - | |
503 | + | |
504 | 504 | } |
505 | 505 | function desativaQuadros(){ |
506 | 506 | var n = idsValidos.length; | ... | ... |
mashups/openlayers.js
1 | 1 | /*çjslint white:false,undef: false, rhino: true, onevar: true, evil: false */ |
2 | -var $i = function(id) | |
2 | +$i = function(id) | |
3 | 3 | {return document.getElementById(id);}; |
4 | 4 | //seta as variáveis navn e navm |
5 | -var navn = false; | |
6 | -var navm = false; | |
7 | -var app = navigator.appName.substring(0,1); | |
5 | +navn = false; | |
6 | +navm = false; | |
7 | +app = navigator.appName.substring(0,1); | |
8 | 8 | if (app==='N'){navn=true;}else{navm=true;} |
9 | 9 | |
10 | 10 | OpenLayers.ImgPath = "../pacotes/openlayers/img/"; |
... | ... | @@ -22,20 +22,20 @@ i3GEO.editorOL = { |
22 | 22 | fontColor: "0,0,0" |
23 | 23 | }, |
24 | 24 | backup: new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false}), |
25 | - nomeFuncaoSalvar: "i3GEO.editorOL.testeSalvar()", | |
26 | - e_oce: new OpenLayers.Layer.ArcGIS93Rest( | |
25 | + nomeFuncaoSalvar: "i3GEO.editorOL.testeSalvar()", | |
26 | + e_oce: new OpenLayers.Layer.ArcGIS93Rest( | |
27 | 27 | "ESRI Ocean Basemap", |
28 | 28 | "http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/export", |
29 | 29 | {format:"jpeg"}, |
30 | 30 | {isBaseLayer:true,visibility:false} |
31 | 31 | ), |
32 | - e_ims: new OpenLayers.Layer.ArcGIS93Rest( | |
32 | + e_ims: new OpenLayers.Layer.ArcGIS93Rest( | |
33 | 33 | "ESRI Imagery World 2D", |
34 | 34 | "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export", |
35 | 35 | {format:"jpeg"}, |
36 | 36 | {isBaseLayer:true,visibility:false} |
37 | 37 | ), |
38 | - e_wsm: new OpenLayers.Layer.ArcGIS93Rest( | |
38 | + e_wsm: new OpenLayers.Layer.ArcGIS93Rest( | |
39 | 39 | "ESRI World Street Map", |
40 | 40 | "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export", |
41 | 41 | {format:"jpeg"}, |
... | ... | @@ -102,7 +102,7 @@ i3GEO.editorOL = { |
102 | 102 | new OpenLayers.Control.ScaleLine(), |
103 | 103 | new OpenLayers.Control.MousePosition({'separator':' '}), |
104 | 104 | new OpenLayers.Control.OverviewMap(), |
105 | - new OpenLayers.Control.KeyboardDefaults() | |
105 | + new OpenLayers.Control.KeyboardDefaults() | |
106 | 106 | ], |
107 | 107 | tiles: true, |
108 | 108 | incluilayergrafico: true, |
... | ... | @@ -125,7 +125,7 @@ i3GEO.editorOL = { |
125 | 125 | } |
126 | 126 | if(i3GEO.editorOL.ativalayerswitcher === "false"){ |
127 | 127 | i3GEO.editorOL.ativalayerswitcher = false; |
128 | - } | |
128 | + } | |
129 | 129 | if(i3GEO.editorOL.ativalayerswitcher === "true"){ |
130 | 130 | i3GEO.editorOL.ativalayerswitcher = true; |
131 | 131 | } |
... | ... | @@ -134,7 +134,7 @@ i3GEO.editorOL = { |
134 | 134 | } |
135 | 135 | if(i3GEO.editorOL.ativarodadomouse === "true"){ |
136 | 136 | i3GEO.editorOL.ativarodadomouse = true; |
137 | - } | |
137 | + } | |
138 | 138 | if(i3GEO.editorOL.incluilayergrafico === "false"){ |
139 | 139 | i3GEO.editorOL.incluilayergrafico = false; |
140 | 140 | } |
... | ... | @@ -173,7 +173,7 @@ i3GEO.editorOL = { |
173 | 173 | i3GEO.editorOL.mapa.setOptions({ |
174 | 174 | numZoomLevels: i3GEO.editorOL.numzoom |
175 | 175 | }); |
176 | - } | |
176 | + } | |
177 | 177 | for(i=0;i<ncontroles;i++){ |
178 | 178 | i3GEO.editorOL.mapa.addControl(i3GEO.editorOL.controles[i]); |
179 | 179 | } |
... | ... | @@ -193,7 +193,7 @@ i3GEO.editorOL = { |
193 | 193 | } |
194 | 194 | i3GEO.editorOL.mapa.addLayers(alayers); |
195 | 195 | if(i3GEO.editorOL.layersIniciais !== ""){ |
196 | - n = i3GEO.editorOL.layersIniciais.length; | |
196 | + n = i3GEO.editorOL.layersIniciais.length; | |
197 | 197 | for(i=0;i<n;i++){ |
198 | 198 | i3GEO.editorOL.layersIniciais[i].singleTile = single; |
199 | 199 | i3GEO.editorOL.mapa.addLayer(i3GEO.editorOL.layersIniciais[i]); |
... | ... | @@ -208,13 +208,13 @@ i3GEO.editorOL = { |
208 | 208 | {i3GEO.editorOL.mapa.zoomToMaxExtent();} |
209 | 209 | if(i3GEO.editorOL.mapext != "") |
210 | 210 | {i3GEO.editorOL.mapa.zoomToExtent(i3GEO.editorOL.mapext);} |
211 | - i3GEO.editorOL.coordenadas(); | |
211 | + i3GEO.editorOL.coordenadas(); | |
212 | 212 | i3GEO.editorOL.criaJanelaBusca(); |
213 | 213 | i3GEO.editorOL.criaBotoes(i3GEO.editorOL.botoes); |
214 | 214 | if(i3GEO.editorOL.ativalayerswitcher === true) |
215 | 215 | {i3GEO.editorOL.ativaLayerSwitcher();} |
216 | 216 | if(i3GEO.editorOL.ativarodadomouse === false) |
217 | - {i3GEO.editorOL.desativaRodaDoMouse();} | |
217 | + {i3GEO.editorOL.desativaRodaDoMouse();} | |
218 | 218 | }, |
219 | 219 | criaLayerGrafico: function(){ |
220 | 220 | var sketchSymbolizers = { |
... | ... | @@ -233,7 +233,7 @@ i3GEO.editorOL = { |
233 | 233 | fontWeight: "normal", |
234 | 234 | labelAlign: "lb", |
235 | 235 | labelXOffset: "3", |
236 | - labelYOffset: "3" | |
236 | + labelYOffset: "3" | |
237 | 237 | }, |
238 | 238 | "Line": { |
239 | 239 | strokeWidth: "${strokeWidth}", |
... | ... | @@ -293,7 +293,7 @@ i3GEO.editorOL = { |
293 | 293 | if(typeof(console) !== 'undefined'){console.error(e);} |
294 | 294 | } |
295 | 295 | }); |
296 | - } | |
296 | + } | |
297 | 297 | }, |
298 | 298 | criaJanelaBusca: function(){ |
299 | 299 | var layers = i3GEO.editorOL.layersLigados(), |
... | ... | @@ -345,7 +345,7 @@ i3GEO.editorOL = { |
345 | 345 | combo += "<option value='"+i+"' >"+layers[i].name+"</option>"; |
346 | 346 | } |
347 | 347 | combo += "</select>"; |
348 | - return combo; | |
348 | + return combo; | |
349 | 349 | }, |
350 | 350 | atualizaJanelaAtivaTema: function(){ |
351 | 351 | var combo = i3GEO.editorOL.criaComboTemas(); |
... | ... | @@ -353,8 +353,8 @@ i3GEO.editorOL = { |
353 | 353 | document.getElementById("i3GEOOLlistaTemasAtivos").onchange = function(){ |
354 | 354 | if(botaoIdentifica){ |
355 | 355 | botaoIdentifica.layers = [i3GEO.editorOL.layersLigados()[this.value]]; |
356 | - } | |
357 | - }; | |
356 | + } | |
357 | + }; | |
358 | 358 | }, |
359 | 359 | criaJanelaAtivaTema: function(){ |
360 | 360 | var temp; |
... | ... | @@ -375,7 +375,7 @@ i3GEO.editorOL = { |
375 | 375 | i3GEOpanelEditor.deactivate(); |
376 | 376 | i3GEOpanelEditor.activate(); |
377 | 377 | if(i3GEO.eventos && i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()") > 0) |
378 | - {i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEO.editorOL.atualizaJanelaAtivaTema()");} | |
378 | + {i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEO.editorOL.atualizaJanelaAtivaTema()");} | |
379 | 379 | }); |
380 | 380 | if(typeof i3GEO != undefined && i3GEO != ""){ |
381 | 381 | if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEO.editorOL.atualizaJanelaAtivaTema()") < 0) |
... | ... | @@ -386,7 +386,7 @@ i3GEO.editorOL = { |
386 | 386 | temp.onclick = function(){i3GEO.janela.minimiza("paneltemaativo");}; |
387 | 387 | } |
388 | 388 | } |
389 | - else{ | |
389 | + else{ | |
390 | 390 | YAHOO.temaativo.container.panel.show(); |
391 | 391 | } |
392 | 392 | }, |
... | ... | @@ -433,7 +433,7 @@ i3GEO.editorOL = { |
433 | 433 | document.getElementById("i3geoMapa").style.cursor = "default"; |
434 | 434 | alert("Erro"); |
435 | 435 | } |
436 | - }); | |
436 | + }); | |
437 | 437 | }, |
438 | 438 | busca: function(layer,item,palavra,onde){ |
439 | 439 | document.body.style.cursor="wait"; |
... | ... | @@ -502,16 +502,16 @@ i3GEO.editorOL = { |
502 | 502 | YAHOO.legendaeditorOL.container.panel.render(document.body); |
503 | 503 | YAHOO.legendaeditorOL.container.panel.show(); |
504 | 504 | YAHOO.legendaeditorOL.container.panel.center(); |
505 | - | |
505 | + | |
506 | 506 | YAHOO.util.Event.addListener(YAHOO.legendaeditorOL.container.panel.close, "click", function(){ |
507 | 507 | //i3GEOpanelEditor.deactivate(); |
508 | 508 | //i3GEOpanelEditor.activate(); |
509 | 509 | }); |
510 | 510 | } |
511 | - else{ | |
511 | + else{ | |
512 | 512 | YAHOO.legendaeditorOL.container.panel.setBody(ins); |
513 | 513 | YAHOO.legendaeditorOL.container.panel.show(); |
514 | - } | |
514 | + } | |
515 | 515 | }, |
516 | 516 | captura: function(lonlat){ |
517 | 517 | //if(i3GEO.editorOL.layergrafico !== ""){return;} |
... | ... | @@ -519,14 +519,14 @@ i3GEO.editorOL = { |
519 | 519 | xy = lonlat.split(","), |
520 | 520 | u = layers[0].url+"&request=getfeature&service=wfs&version=1.0.0"; |
521 | 521 | u += "&OUTPUTFORMAT=gml2&typename="+layers[0].params.LAYERS; |
522 | - | |
522 | + | |
523 | 523 | //u += "&filter=<Filter><Intersects><PropertyName>Geometry</PropertyName><gml:Point><gml:coordinates>"+lonlat+"</gml:coordinates></gml:Point></Intersects></Filter>"; |
524 | - | |
524 | + | |
525 | 525 | xy[0] = xy[0] * 1; |
526 | 526 | xy[1] = xy[1] * 1; |
527 | 527 | var poligono = (xy[0]-0.1)+","+(xy[1]+0.1) + " "+(xy[0]+0.1)+","+(xy[1]+0.1)+" " + (xy[0]+0.1)+","+(xy[1]-0.1)+" " + (xy[0]-0.1)+","+(xy[1]-0.1)+" "+(xy[0]-0.1)+","+(xy[1]+0.1); |
528 | 528 | u += "&filter=<Filter><Intersects><PropertyName>Geometry</PropertyName><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:posList>"+poligono+"</gml:posList></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersects></Filter>"; |
529 | - | |
529 | + | |
530 | 530 | document.body.style.cursor="wait"; |
531 | 531 | if(document.getElementById("i3geoMapa")) |
532 | 532 | {document.getElementById("i3geoMapa").style.cursor = "wait";} |
... | ... | @@ -553,7 +553,7 @@ i3GEO.editorOL = { |
553 | 553 | strokeColor: i3GEO.editorOL.simbologia.strokeColor, |
554 | 554 | pointRadius: i3GEO.editorOL.simbologia.pointRadius, |
555 | 555 | graphicName: i3GEO.editorOL.simbologia.graphicName |
556 | - }; | |
556 | + }; | |
557 | 557 | } |
558 | 558 | i3GEO.editorOL.layergrafico.addFeatures(gml); |
559 | 559 | }, |
... | ... | @@ -584,7 +584,7 @@ i3GEO.editorOL = { |
584 | 584 | ins += "<p class=paragrafo >Foram encontrada(s) "+n+" geometria(s) selecionada(s) </p>"; |
585 | 585 | ins += "<p class=paragrafo ><a href='#' onclick='i3GEO.editorOL.listaGeometriasSel()' >Listar</a> "; |
586 | 586 | ins += "<a href='#' onclick='"+i3GEO.editorOL.nomeFuncaoSalvar+"' >Salvar</a> "; |
587 | - ins += "<a href='#' onclick='i3GEO.editorOL.exportarSHP()' >Exportar (shapefile)</a></p>"; | |
587 | + ins += "<a href='#' onclick='i3GEO.editorOL.exportarSHP()' >Exportar (shapefile)</a></p>"; | |
588 | 588 | YAHOO.salvaGeometrias.container.panel.setBody(ins); |
589 | 589 | } |
590 | 590 | else |
... | ... | @@ -592,7 +592,7 @@ i3GEO.editorOL = { |
592 | 592 | }, |
593 | 593 | exportarSHP: function(){ |
594 | 594 | i3GEO.editorOL.processageo("converteSHP"); |
595 | - }, | |
595 | + }, | |
596 | 596 | listaGeometriasSel: function(){ |
597 | 597 | var geos = i3GEO.editorOL.layergrafico.selectedFeatures; |
598 | 598 | var n = geos.length; |
... | ... | @@ -605,7 +605,7 @@ i3GEO.editorOL = { |
605 | 605 | if(a[key]){ |
606 | 606 | ins += key+" = "+a[key]+"<br>"; |
607 | 607 | } |
608 | - } | |
608 | + } | |
609 | 609 | } |
610 | 610 | var w = window.open(); |
611 | 611 | w.document.write(ins); |
... | ... | @@ -623,7 +623,7 @@ i3GEO.editorOL = { |
623 | 623 | fillOpacity: 1, |
624 | 624 | strokeWidth: 1, |
625 | 625 | strokeOpacity: 1, |
626 | - strokeColor: "#333333" | |
626 | + strokeColor: "#333333" | |
627 | 627 | }, |
628 | 628 | "Line": { |
629 | 629 | strokeWidth: 3, |
... | ... | @@ -668,7 +668,7 @@ i3GEO.editorOL = { |
668 | 668 | }); |
669 | 669 | if(botoes.procura===true){ |
670 | 670 | button = new OpenLayers.Control.Button({ |
671 | - displayClass: "editorOLprocura", | |
671 | + displayClass: "editorOLprocura", | |
672 | 672 | trigger: function(){YAHOO.procura.container.panel.show();}, |
673 | 673 | title: "procura", |
674 | 674 | type: OpenLayers.Control.TYPE_BUTTON |
... | ... | @@ -694,7 +694,7 @@ i3GEO.editorOL = { |
694 | 694 | } |
695 | 695 | if(botoes.zoomtot===true){ |
696 | 696 | button = new OpenLayers.Control.Button({ |
697 | - displayClass: "editorOLzoomtot", | |
697 | + displayClass: "editorOLzoomtot", | |
698 | 698 | trigger: function(){i3GEO.editorOL.mapa.zoomToMaxExtent();}, |
699 | 699 | title: "ajusta extensão", |
700 | 700 | type: OpenLayers.Control.TYPE_BUTTON |
... | ... | @@ -704,7 +704,7 @@ i3GEO.editorOL = { |
704 | 704 | } |
705 | 705 | if(botoes.legenda===true){ |
706 | 706 | button = new OpenLayers.Control.Button({ |
707 | - displayClass: "editorOLlegenda", | |
707 | + displayClass: "editorOLlegenda", | |
708 | 708 | trigger: function(){i3GEO.editorOL.mostraLegenda();}, |
709 | 709 | title: "legenda", |
710 | 710 | type: OpenLayers.Control.TYPE_BUTTON |
... | ... | @@ -718,7 +718,7 @@ i3GEO.editorOL = { |
718 | 718 | { |
719 | 719 | handlerOptions: {layerOptions: {styleMap: styleMap}}, |
720 | 720 | persist: true, |
721 | - displayClass: "editorOLdistancia", | |
721 | + displayClass: "editorOLdistancia", | |
722 | 722 | title: "distância", |
723 | 723 | type: OpenLayers.Control.TYPE_TOOL |
724 | 724 | } |
... | ... | @@ -739,7 +739,7 @@ i3GEO.editorOL = { |
739 | 739 | { |
740 | 740 | handlerOptions: {layerOptions: {styleMap: styleMap}}, |
741 | 741 | persist: true, |
742 | - displayClass: "editorOLarea", | |
742 | + displayClass: "editorOLarea", | |
743 | 743 | title: "área", |
744 | 744 | type: OpenLayers.Control.TYPE_TOOL |
745 | 745 | } |
... | ... | @@ -793,14 +793,14 @@ i3GEO.editorOL = { |
793 | 793 | if(temp1 != "") |
794 | 794 | f.push(temp1); |
795 | 795 | } |
796 | - texto = f.join("<br><br>"); | |
796 | + texto = f.join("<br><br>"); | |
797 | 797 | } |
798 | 798 | } |
799 | 799 | catch(e){} |
800 | 800 | return texto; |
801 | 801 | }; |
802 | 802 | i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud( |
803 | - "chicken", | |
803 | + "chicken", | |
804 | 804 | i3GEO.editorOL.mapa.getLonLatFromPixel(event.xy), |
805 | 805 | null, |
806 | 806 | lonlattexto+"<pre>"+formata(event.text)+"</pre>", |
... | ... | @@ -852,7 +852,7 @@ i3GEO.editorOL = { |
852 | 852 | ); |
853 | 853 | controles.push(button); |
854 | 854 | adiciona = true; |
855 | - } | |
855 | + } | |
856 | 856 | if(botoes.ponto===true){ |
857 | 857 | button = new OpenLayers.Control.DrawFeature( |
858 | 858 | i3GEO.editorOL.layergrafico, |
... | ... | @@ -877,7 +877,7 @@ i3GEO.editorOL = { |
877 | 877 | if(document.getElementById("panellistagEditor")) |
878 | 878 | {i3GEO.editorOL.listaGeometrias();} |
879 | 879 | } |
880 | - } | |
880 | + } | |
881 | 881 | } |
882 | 882 | ); |
883 | 883 | controles.push(button); |
... | ... | @@ -980,14 +980,14 @@ i3GEO.editorOL = { |
980 | 980 | {i3GEO.editorOL.substituiFeaturesSel(retorno.data);} |
981 | 981 | }; |
982 | 982 | i3GEO.janela.abreAguarde("i3GEO.cortador","Cortando"); |
983 | - i3GEO.php.funcoesGeometriasWkt(temp,sel+"|"+corta,"difference"); | |
983 | + i3GEO.php.funcoesGeometriasWkt(temp,sel+"|"+corta,"difference"); | |
984 | 984 | } |
985 | - } | |
985 | + } | |
986 | 986 | } |
987 | 987 | ); |
988 | 988 | controles.push(i3GEO.editorOL.CortaFeature); |
989 | 989 | adiciona = true; |
990 | - } | |
990 | + } | |
991 | 991 | if(botoes.edita===true){ |
992 | 992 | i3GEO.editorOL.ModifyFeature = new OpenLayers.Control.ModifyFeature( |
993 | 993 | i3GEO.editorOL.layergrafico, |
... | ... | @@ -1005,7 +1005,7 @@ i3GEO.editorOL = { |
1005 | 1005 | } |
1006 | 1006 | if(botoes.edita===true && botoes.listag===true){ |
1007 | 1007 | button = new OpenLayers.Control.Button({ |
1008 | - displayClass: "editorOLlistag", | |
1008 | + displayClass: "editorOLlistag", | |
1009 | 1009 | trigger: function(){ |
1010 | 1010 | i3GEO.editorOL.listaGeometrias(); |
1011 | 1011 | }, |
... | ... | @@ -1014,38 +1014,38 @@ i3GEO.editorOL = { |
1014 | 1014 | }); |
1015 | 1015 | controles.push(button); |
1016 | 1016 | adiciona = true; |
1017 | - } | |
1017 | + } | |
1018 | 1018 | if(botoes.frente===true){ |
1019 | 1019 | button = new OpenLayers.Control.Button({ |
1020 | - displayClass: "editorOLfrente", | |
1020 | + displayClass: "editorOLfrente", | |
1021 | 1021 | trigger: function(){ |
1022 | 1022 | i3GEO.editorOL.trazParaFrente(); |
1023 | 1023 | if(document.getElementById("panellistagEditor")) |
1024 | - {i3GEO.editorOL.listaGeometrias();} | |
1024 | + {i3GEO.editorOL.listaGeometrias();} | |
1025 | 1025 | }, |
1026 | 1026 | title: "traz para frente", |
1027 | 1027 | type: OpenLayers.Control.TYPE_BUTTON |
1028 | 1028 | }); |
1029 | 1029 | controles.push(button); |
1030 | 1030 | adiciona = true; |
1031 | - } | |
1031 | + } | |
1032 | 1032 | if(botoes.tools===true && i3GEO.php){ |
1033 | 1033 | button = new OpenLayers.Control.Button({ |
1034 | - displayClass: "editorOLtools", | |
1034 | + displayClass: "editorOLtools", | |
1035 | 1035 | trigger: function(){ |
1036 | 1036 | //fora do i3geo, usa o jsts |
1037 | 1037 | if(i3GEO.php) |
1038 | 1038 | {i3GEO.editorOL.ferramentas();} |
1039 | 1039 | else |
1040 | 1040 | {i3GEO.editorOL.carregajts("i3GEO.editorOL.ferramentas()");} |
1041 | - | |
1041 | + | |
1042 | 1042 | }, |
1043 | 1043 | title: "ferramentas", |
1044 | 1044 | type: OpenLayers.Control.TYPE_BUTTON |
1045 | 1045 | }); |
1046 | 1046 | controles.push(button); |
1047 | 1047 | adiciona = true; |
1048 | - } | |
1048 | + } | |
1049 | 1049 | //botao de seleção |
1050 | 1050 | if(botoes.selecao===true){ |
1051 | 1051 | i3GEO.editorOL.selbutton = new OpenLayers.Control.SelectFeature( |
... | ... | @@ -1068,7 +1068,7 @@ i3GEO.editorOL = { |
1068 | 1068 | } |
1069 | 1069 | if(botoes.apaga===true){ |
1070 | 1070 | button = new OpenLayers.Control.Button({ |
1071 | - displayClass: "editorOLapaga", | |
1071 | + displayClass: "editorOLapaga", | |
1072 | 1072 | trigger: function(){ |
1073 | 1073 | if(i3GEO.editorOL.layergrafico.selectedFeatures.length > 0){ |
1074 | 1074 | var x = window.confirm("Exclui os elementos selecionados?"); |
... | ... | @@ -1092,7 +1092,7 @@ i3GEO.editorOL = { |
1092 | 1092 | /* |
1093 | 1093 | if(botoes.undo===true){ |
1094 | 1094 | button = new OpenLayers.Control.Button({ |
1095 | - displayClass: "editorOLundo", | |
1095 | + displayClass: "editorOLundo", | |
1096 | 1096 | trigger: function(){i3GEO.editorOL.restauraBackup();}, |
1097 | 1097 | title: "recupera" |
1098 | 1098 | }); |
... | ... | @@ -1102,7 +1102,7 @@ i3GEO.editorOL = { |
1102 | 1102 | */ |
1103 | 1103 | if(botoes.propriedades===true){ |
1104 | 1104 | button = new OpenLayers.Control.Button({ |
1105 | - displayClass: "editorOLpropriedades", | |
1105 | + displayClass: "editorOLpropriedades", | |
1106 | 1106 | trigger: function(){i3GEO.editorOL.propriedades();}, |
1107 | 1107 | title: "propriedades", |
1108 | 1108 | type: OpenLayers.Control.TYPE_BUTTON |
... | ... | @@ -1112,7 +1112,7 @@ i3GEO.editorOL = { |
1112 | 1112 | } |
1113 | 1113 | if(botoes.salva===true){ |
1114 | 1114 | button = new OpenLayers.Control.Button({ |
1115 | - displayClass: "editorOLsalva", | |
1115 | + displayClass: "editorOLsalva", | |
1116 | 1116 | trigger: function(){i3GEO.editorOL.salvaGeometrias();}, |
1117 | 1117 | title: "salva", |
1118 | 1118 | type: OpenLayers.Control.TYPE_BUTTON |
... | ... | @@ -1122,7 +1122,7 @@ i3GEO.editorOL = { |
1122 | 1122 | } |
1123 | 1123 | if(botoes.ajuda===true){ |
1124 | 1124 | button = new OpenLayers.Control.Button({ |
1125 | - displayClass: "editorOLajuda", | |
1125 | + displayClass: "editorOLajuda", | |
1126 | 1126 | trigger: function(){ |
1127 | 1127 | try |
1128 | 1128 | {window.open(i3GEO.configura.locaplic+"/mashups/openlayers_ajuda.php");} |
... | ... | @@ -1137,7 +1137,7 @@ i3GEO.editorOL = { |
1137 | 1137 | } |
1138 | 1138 | if(botoes.fecha===true){ |
1139 | 1139 | button = new OpenLayers.Control.Button({ |
1140 | - displayClass: "editorOLfecha", | |
1140 | + displayClass: "editorOLfecha", | |
1141 | 1141 | trigger: function(){ |
1142 | 1142 | var temp = window.confirm("Remove a edição?"); |
1143 | 1143 | i3GEOpanelEditor.destroy(); |
... | ... | @@ -1145,12 +1145,12 @@ i3GEO.editorOL = { |
1145 | 1145 | try{YAHOO.procura.container.panel.destroy();}catch(e){} |
1146 | 1146 | try{YAHOO.editorOL.container.panel.destroy();}catch(e){} |
1147 | 1147 | try{YAHOO.editorOL.listaGeometrias.panel.destroy();}catch(e){} |
1148 | - //try{YAHOO.panelpropriedadesEditor.panel.destroy();}catch(e){} | |
1149 | - //try{YAHOO.editorOL.panellistagEditor.panel.destroy();}catch(e){} | |
1150 | - try{YAHOO.editorOL.ferramentas.panel.destroy();}catch(e){} | |
1151 | - //try{YAHOO.panelprocura.panel.destroy();}catch(e){} | |
1152 | - try{YAHOO.legendaeditorOL.container.panel.destroy();}catch(e){} | |
1153 | - try{YAHOO.salvaGeometrias.container.panel.destroy();}catch(e){} | |
1148 | + //try{YAHOO.panelpropriedadesEditor.panel.destroy();}catch(e){} | |
1149 | + //try{YAHOO.editorOL.panellistagEditor.panel.destroy();}catch(e){} | |
1150 | + try{YAHOO.editorOL.ferramentas.panel.destroy();}catch(e){} | |
1151 | + //try{YAHOO.panelprocura.panel.destroy();}catch(e){} | |
1152 | + try{YAHOO.legendaeditorOL.container.panel.destroy();}catch(e){} | |
1153 | + try{YAHOO.salvaGeometrias.container.panel.destroy();}catch(e){} | |
1154 | 1154 | if(temp === true){ |
1155 | 1155 | try{ |
1156 | 1156 | if(i3GEO.editorOL.layergrafico){ |
... | ... | @@ -1189,7 +1189,7 @@ i3GEO.editorOL = { |
1189 | 1189 | {i3GEO.editorOL.listaGeometrias();} |
1190 | 1190 | } |
1191 | 1191 | } |
1192 | - }); | |
1192 | + }); | |
1193 | 1193 | // |
1194 | 1194 | //adiciona o painel ao mapa se alguma op��o foi inserida |
1195 | 1195 | // |
... | ... | @@ -1212,7 +1212,7 @@ i3GEO.editorOL = { |
1212 | 1212 | if(i3GEO.editorOL.pontos.length === 0) |
1213 | 1213 | {return;} |
1214 | 1214 | var SHADOW_Z_INDEX = 10, |
1215 | - MARKER_Z_INDEX = 11, | |
1215 | + MARKER_Z_INDEX = 11, | |
1216 | 1216 | layer = new OpenLayers.Layer.Vector( |
1217 | 1217 | "pontos", |
1218 | 1218 | { |
... | ... | @@ -1281,7 +1281,7 @@ i3GEO.editorOL = { |
1281 | 1281 | } |
1282 | 1282 | g = features[i].geometry; |
1283 | 1283 | i3GEO.editorOL.mapa.addPopup(new OpenLayers.Popup.FramedCloud( |
1284 | - "kml", | |
1284 | + "kml", | |
1285 | 1285 | new OpenLayers.LonLat(g.x,g.y), |
1286 | 1286 | null, |
1287 | 1287 | html, |
... | ... | @@ -1326,7 +1326,7 @@ i3GEO.editorOL = { |
1326 | 1326 | ' </tr>' + |
1327 | 1327 | ' <tr>' + |
1328 | 1328 | ' <td>Tamanho da fonte</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'fontSize\',\'i3GEOEditorOLfontsize\')" type="text" style="cursor:text" id="i3GEOEditorOLfontsize" size="3" value="'+i3GEO.editorOL.simbologia.fontSize+'" /></td><td></td>' + |
1329 | - ' </tr>' + | |
1329 | + ' </tr>' + | |
1330 | 1330 | ' <tr>' + |
1331 | 1331 | ' <td>Opacidade (de 0 a 1)</td><td><input onchange="i3GEO.editorOL.mudaSimbolo(\'opacidade\',\'i3GEOEditorOLopacidade\')" type="text" style="cursor:text" id="i3GEOEditorOLopacidade" size="3" value="'+i3GEO.editorOL.simbologia.opacidade+'" /></td><td></td>' + |
1332 | 1332 | ' </tr>' + |
... | ... | @@ -1364,18 +1364,18 @@ i3GEO.editorOL = { |
1364 | 1364 | ' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.ROTATE;" type="radio" name=i3geoOLtipoEdita /></td><td>rotaciona</td>' + |
1365 | 1365 | ' <td><input style=cursor:pointer onclick="i3GEO.editorOL.ModifyFeature.mode = OpenLayers.Control.ModifyFeature.DRAG;" type="radio" name=i3geoOLtipoEdita /></td><td>desloca</td>' + |
1366 | 1366 | ' </tr>' + |
1367 | - '</table>'; | |
1367 | + '</table>'; | |
1368 | 1368 | YAHOO.editorOL.container.panel.setBody(ins); |
1369 | 1369 | if(typeof i3GEO != undefined && i3GEO != "") |
1370 | 1370 | {YAHOO.editorOL.container.panel.setHeader("Propriedades<div id='panelpropriedadesEditor_minimizaCabecalho' class='container-minimiza'></div>");} |
1371 | 1371 | else |
1372 | 1372 | {YAHOO.editorOL.container.panel.setHeader("Propriedades");} |
1373 | - | |
1373 | + | |
1374 | 1374 | YAHOO.editorOL.container.panel.setFooter(""); |
1375 | 1375 | YAHOO.editorOL.container.panel.render(document.body); |
1376 | - | |
1376 | + | |
1377 | 1377 | YAHOO.editorOL.container.panel.center(); |
1378 | - YAHOO.util.Event.addListener(YAHOO.editorOL.container.panel.close, "click", function(){}); | |
1378 | + YAHOO.util.Event.addListener(YAHOO.editorOL.container.panel.close, "click", function(){}); | |
1379 | 1379 | temp = $i("panelpropriedadesEditor_minimizaCabecalho"); |
1380 | 1380 | if(temp){ |
1381 | 1381 | temp.onclick = function(){i3GEO.janela.minimiza("panelpropriedadesEditor");}; |
... | ... | @@ -1406,7 +1406,7 @@ i3GEO.editorOL = { |
1406 | 1406 | temp.onclick = function(){i3GEO.janela.minimiza("panellistagEditor");}; |
1407 | 1407 | } |
1408 | 1408 | } |
1409 | - else{ | |
1409 | + else{ | |
1410 | 1410 | YAHOO.editorOL.listaGeometrias.panel.render(document.body); |
1411 | 1411 | } |
1412 | 1412 | var g,temp, |
... | ... | @@ -1442,10 +1442,10 @@ i3GEO.editorOL = { |
1442 | 1442 | ' <option value="">---</option>' + |
1443 | 1443 | ' <option value=union >União</option>'; |
1444 | 1444 | if(i3GEO.php){ |
1445 | - ins += ' <option value=intersection >Intersecção</option>' + | |
1446 | - ' <option value=convexhull >Convex hull</option>' + | |
1447 | - ' <option value=boundary >Bordas</option>' + | |
1448 | - ' <option value=difference >Diferença</option>' + | |
1445 | + ins += ' <option value=intersection >Intersecção</option>' + | |
1446 | + ' <option value=convexhull >Convex hull</option>' + | |
1447 | + ' <option value=boundary >Bordas</option>' + | |
1448 | + ' <option value=difference >Diferença</option>' + | |
1449 | 1449 | ' <option value=symdifference >Diferença simétrica</option>'; |
1450 | 1450 | } |
1451 | 1451 | ins += '</select>'+ |
... | ... | @@ -1467,7 +1467,7 @@ i3GEO.editorOL = { |
1467 | 1467 | temp.onclick = function(){i3GEO.janela.minimiza("panelferramentasEditor");}; |
1468 | 1468 | } |
1469 | 1469 | } |
1470 | - else{ | |
1470 | + else{ | |
1471 | 1471 | YAHOO.editorOL.ferramentas.panel.render(document.body); |
1472 | 1472 | } |
1473 | 1473 | YAHOO.editorOL.ferramentas.panel.show(); |
... | ... | @@ -1480,7 +1480,7 @@ i3GEO.editorOL = { |
1480 | 1480 | temp, |
1481 | 1481 | ativa = false; |
1482 | 1482 | i3GEOOLsnap.deactivate(); |
1483 | - for(i=0;i<ntipos;i++){ | |
1483 | + for(i=0;i<ntipos;i++){ | |
1484 | 1484 | temp = $i("target_"+tipos[i]); |
1485 | 1485 | target[tipos[i]] = temp.checked; |
1486 | 1486 | if(temp.checked === true) |
... | ... | @@ -1489,7 +1489,7 @@ i3GEO.editorOL = { |
1489 | 1489 | target[tipos[i]+"Tolerance"] = temp.value; |
1490 | 1490 | } |
1491 | 1491 | if(ativa === true) |
1492 | - {i3GEOOLsnap.activate();} | |
1492 | + {i3GEOOLsnap.activate();} | |
1493 | 1493 | }, |
1494 | 1494 | split: function(){ |
1495 | 1495 | i3GEOOLsplit.deactivate(); |
... | ... | @@ -1521,7 +1521,7 @@ i3GEO.editorOL = { |
1521 | 1521 | if(operacao === "union" && !i3GEO.php ){ |
1522 | 1522 | if(polis.length > 0){ |
1523 | 1523 | temp = i3GEO.editorOL.uniaojts(polis); |
1524 | - i3GEO.editorOL.substituiFeaturesSel(temp); | |
1524 | + i3GEO.editorOL.substituiFeaturesSel(temp); | |
1525 | 1525 | } |
1526 | 1526 | if(linhas.length > 0){ |
1527 | 1527 | temp = i3GEO.editorOL.uniaojts(linhas); |
... | ... | @@ -1530,26 +1530,26 @@ i3GEO.editorOL = { |
1530 | 1530 | if(pontos.length > 0){ |
1531 | 1531 | temp = i3GEO.editorOL.uniaojts(p); |
1532 | 1532 | i3GEO.editorOL.substituiFeaturesSel(temp); |
1533 | - } | |
1533 | + } | |
1534 | 1534 | } |
1535 | 1535 | else{ |
1536 | 1536 | if(polis.length > 0){ |
1537 | 1537 | i3GEO.janela.abreAguarde("i3GEO.editorPoli","Poligonos"); |
1538 | - i3GEO.php.funcoesGeometriasWkt(temp,polis.join("|"),operacao); | |
1538 | + i3GEO.php.funcoesGeometriasWkt(temp,polis.join("|"),operacao); | |
1539 | 1539 | } |
1540 | 1540 | if(linhas.length > 0){ |
1541 | 1541 | i3GEO.janela.abreAguarde("i3GEO.editorLinhas","Linhas"); |
1542 | - i3GEO.php.funcoesGeometriasWkt(temp,linhas.join("|"),operacao); | |
1542 | + i3GEO.php.funcoesGeometriasWkt(temp,linhas.join("|"),operacao); | |
1543 | 1543 | } |
1544 | 1544 | if(pontos.length > 0){ |
1545 | 1545 | i3GEO.janela.abreAguarde("i3GEO.editorPontos","Pontos"); |
1546 | - i3GEO.php.funcoesGeometriasWkt(temp,pontos.join("|"),operacao); | |
1546 | + i3GEO.php.funcoesGeometriasWkt(temp,pontos.join("|"),operacao); | |
1547 | 1547 | } |
1548 | 1548 | } |
1549 | 1549 | return; |
1550 | 1550 | } |
1551 | 1551 | else |
1552 | - {alert("Selecione pelo menos dois elementos");} | |
1552 | + {alert("Selecione pelo menos dois elementos");} | |
1553 | 1553 | }, |
1554 | 1554 | uniaojts: function(geoms){ |
1555 | 1555 | var n = geoms.length, |
... | ... | @@ -1562,7 +1562,7 @@ i3GEO.editorOL = { |
1562 | 1562 | uniao = (fwkt.read(geoms[0]).geometry).toString(); |
1563 | 1563 | uniao = rwkt.read(uniao); |
1564 | 1564 | for(i=1;i <= n;i++){ |
1565 | - g = (fwkt.read(geoms[i]).geometry).toString(); | |
1565 | + g = (fwkt.read(geoms[i]).geometry).toString(); | |
1566 | 1566 | uniao = uniao.union(rwkt.read(g)); |
1567 | 1567 | } |
1568 | 1568 | uniao = wwkt.write(uniao); |
... | ... | @@ -1596,15 +1596,15 @@ i3GEO.editorOL = { |
1596 | 1596 | for(i=0;i<n;i++){ |
1597 | 1597 | i3GEO.editorOL.layergrafico.features[i].renderIntent = "default"; |
1598 | 1598 | i3GEO.editorOL.selbutton.unselect(i3GEO.editorOL.layergrafico.features[i]); |
1599 | - } | |
1600 | - }, | |
1599 | + } | |
1600 | + }, | |
1601 | 1601 | unselTodosBackup:function(){ |
1602 | 1602 | var n,i; |
1603 | 1603 | n = i3GEO.editorOL.backup.features.length; |
1604 | 1604 | for(i=0;i<n;i++){ |
1605 | 1605 | i3GEO.editorOL.backup.features[i].renderIntent = "default"; |
1606 | 1606 | i3GEO.editorOL.selbutton.unselect(i3GEO.editorOL.backup.features[i]); |
1607 | - } | |
1607 | + } | |
1608 | 1608 | }, |
1609 | 1609 | restauraBackup: function(){ |
1610 | 1610 | if(i3GEO.editorOL.backup.features.length > 0){ |
... | ... | @@ -1614,7 +1614,7 @@ i3GEO.editorOL = { |
1614 | 1614 | if(document.getElementById("panellistagEditor")) |
1615 | 1615 | {i3GEO.editorOL.listaGeometrias();} |
1616 | 1616 | //i3GEO.editorOL.backup.removeFeatures(i3GEO.editorOL.backup.features); |
1617 | - }, | |
1617 | + }, | |
1618 | 1618 | substituiFeaturesSel: function(wkt){ |
1619 | 1619 | i3GEO.editorOL.guardaBackup(); |
1620 | 1620 | try{ |
... | ... | @@ -1629,7 +1629,7 @@ i3GEO.editorOL = { |
1629 | 1629 | strokeColor: i3GEO.editorOL.simbologia.strokeColor, |
1630 | 1630 | pointRadius: i3GEO.editorOL.simbologia.pointRadius, |
1631 | 1631 | graphicName: i3GEO.editorOL.simbologia.graphicName |
1632 | - }; | |
1632 | + }; | |
1633 | 1633 | i3GEO.editorOL.layergrafico.addFeatures([f]); |
1634 | 1634 | if(document.getElementById("panellistagEditor")) |
1635 | 1635 | {i3GEO.editorOL.listaGeometrias();} |
... | ... | @@ -1681,7 +1681,7 @@ i3GEO.editorOL = { |
1681 | 1681 | {i3GEO.editorOL.listaGeometrias();} |
1682 | 1682 | } |
1683 | 1683 | else |
1684 | - {alert("Selecione pelo menos um elemento");} | |
1684 | + {alert("Selecione pelo menos um elemento");} | |
1685 | 1685 | }, |
1686 | 1686 | pegaControle: function(classe){ |
1687 | 1687 | var n = i3GEO.editorOL.controles.length, |
... | ... | @@ -1700,6 +1700,6 @@ i3GEO.editorOL = { |
1700 | 1700 | }, |
1701 | 1701 | desativaRodaDoMouse: function(){ |
1702 | 1702 | var controls = i3GEO.editorOL.mapa.getControlsByClass('OpenLayers.Control.Navigation'); |
1703 | - for(var i = 0; i<controls.length; ++i){controls[i].disableZoomWheel();} | |
1703 | + for(var i = 0; i<controls.length; ++i){controls[i].disableZoomWheel();} | |
1704 | 1704 | } |
1705 | 1705 | }; |
1706 | 1706 | \ No newline at end of file | ... | ... |
mashups/openlayers_compacto.js
... | ... | @@ -41,8 +41,8 @@ u.style.height="1px";u.style.width="1px";u.style.position="absolute";u.style.lef |
41 | 41 | setTimeout(function(){a.removeClass(v,"yui-force-redraw");},0);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(j,i){YAHOO.widget.Dialog.superclass.constructor.call(this,j,i);};var b=YAHOO.util.Event,g=YAHOO.util.CustomEvent,e=YAHOO.util.Dom,a=YAHOO.widget.Dialog,f=YAHOO.lang,h={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},c={"POST_METHOD":{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTONS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};a.CSS_DIALOG="yui-dialog";function d(){var m=this._aButtons,k,l,j;if(f.isArray(m)){k=m.length;if(k>0){j=k-1;do{l=m[j];if(YAHOO.widget.Button&&l instanceof YAHOO.widget.Button){l.destroy();}else{if(l.tagName.toUpperCase()=="BUTTON"){b.purgeElement(l);b.purgeElement(l,false);}}}while(j--);}}}YAHOO.extend(a,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){a.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(c.POST_METHOD.key,{handler:this.configPostMethod,value:c.POST_METHOD.value,validator:function(i){if(i!="form"&&i!="async"&&i!="none"&&i!="manual"){return false;}else{return true;}}});this.cfg.addProperty(c.POST_DATA.key,{value:c.POST_DATA.value});this.cfg.addProperty(c.HIDEAFTERSUBMIT.key,{value:c.HIDEAFTERSUBMIT.value});this.cfg.addProperty(c.BUTTONS.key,{handler:this.configButtons,value:c.BUTTONS.value,supercedes:c.BUTTONS.supercedes});},initEvents:function(){a.superclass.initEvents.call(this);var i=g.LIST;this.beforeSubmitEvent=this.createEvent(h.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=i;this.submitEvent=this.createEvent(h.SUBMIT);this.submitEvent.signature=i;this.manualSubmitEvent=this.createEvent(h.MANUAL_SUBMIT);this.manualSubmitEvent.signature=i;this.asyncSubmitEvent=this.createEvent(h.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=i;this.formSubmitEvent=this.createEvent(h.FORM_SUBMIT);this.formSubmitEvent.signature=i;this.cancelEvent=this.createEvent(h.CANCEL);this.cancelEvent.signature=i;},init:function(j,i){a.superclass.init.call(this,j);this.beforeInitEvent.fire(a);e.addClass(this.element,a.CSS_DIALOG);this.cfg.setProperty("visible",false);if(i){this.cfg.applyConfig(i,true);}this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(a);},doSubmit:function(){var q=YAHOO.util.Connect,r=this.form,l=false,o=false,s,n,m,j;switch(this.cfg.getProperty("postmethod")){case"async":s=r.elements;n=s.length;if(n>0){m=n-1;do{if(s[m].type=="file"){l=true;break;}}while(m--);}if(l&&YAHOO.env.ua.ie&&this.isSecure){o=true;}j=this._getFormAttributes(r);q.setForm(r,l,o);var k=this.cfg.getProperty("postdata");var p=q.asyncRequest(j.method,j.action,this.callback,k);this.asyncSubmitEvent.fire(p);break;case"form":r.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},_getFormAttributes:function(k){var i={method:null,action:null};if(k){if(k.getAttributeNode){var j=k.getAttributeNode("action");var l=k.getAttributeNode("method");if(j){i.action=j.value;}if(l){i.method=l.value;}}else{i.action=k.getAttribute("action");i.method=k.getAttribute("method");}}i.method=(f.isString(i.method)?i.method:"POST").toUpperCase();i.action=f.isString(i.action)?i.action:"";return i;},registerForm:function(){var i=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==i&&e.isAncestor(this.element,this.form)){return;}else{b.purgeElement(this.form);this.form=null;}}if(!i){i=document.createElement("form");i.name="frm_"+this.id;this.body.appendChild(i);}if(i){this.form=i;b.on(i,"submit",this._submitHandler,this,true);}},_submitHandler:function(i){b.stopEvent(i);this.submit();this.form.blur();},setTabLoop:function(i,j){i=i||this.firstButton;j=j||this.lastButton;a.superclass.setTabLoop.call(this,i,j);},_setTabLoop:function(i,j){i=i||this.firstButton;j=this.lastButton||j;this.setTabLoop(i,j);},setFirstLastFocusable:function(){a.superclass.setFirstLastFocusable.call(this);var k,j,m,n=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&n&&n.length>0){j=n.length;for(k=0;k<j;++k){m=n[k];if(this.form===m.form){this.firstFormElement=m;break;}}for(k=j-1;k>=0;--k){m=n[k];if(this.form===m.form){this.lastFormElement=m;break;}}}},configClose:function(j,i,k){a.superclass.configClose.apply(this,arguments);},_doClose:function(i){b.preventDefault(i);this.cancel();},configButtons:function(t,s,n){var o=YAHOO.widget.Button,v=s[0],l=this.innerElement,u,q,k,r,p,j,m;d.call(this);this._aButtons=null;if(f.isArray(v)){p=document.createElement("span");p.className="button-group";r=v.length;this._aButtons=[];this.defaultHtmlButton=null;for(m=0;m<r;m++){u=v[m];if(o){k=new o({label:u.text,type:u.type});k.appendTo(p);q=k.get("element");if(u.isDefault){k.addClass("default");this.defaultHtmlButton=q;}if(f.isFunction(u.handler)){k.set("onclick",{fn:u.handler,obj:this,scope:this});}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){k.set("onclick",{fn:u.handler.fn,obj:((!f.isUndefined(u.handler.obj))?u.handler.obj:this),scope:(u.handler.scope||this)});}}this._aButtons[this._aButtons.length]=k;}else{q=document.createElement("button");q.setAttribute("type","button");if(u.isDefault){q.className="default";this.defaultHtmlButton=q;}q.innerHTML=u.text;if(f.isFunction(u.handler)){b.on(q,"click",u.handler,this,true);}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){b.on(q,"click",u.handler.fn,((!f.isUndefined(u.handler.obj))?u.handler.obj:this),(u.handler.scope||this));}}p.appendChild(q);this._aButtons[this._aButtons.length]=q;}u.htmlButton=q;if(m===0){this.firstButton=q;}if(m==(r-1)){this.lastButton=q;}}this.setFooter(p);j=this.footer;if(e.inDocument(this.element)&&!e.isAncestor(l,j)){l.appendChild(j);}this.buttonSpan=p;}else{p=this.buttonSpan; |
42 | 42 | j=this.footer;if(p&&j){j.removeChild(p);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}this.changeContentEvent.fire();},getButtons:function(){return this._aButtons||null;},focusFirst:function(k,i,n){var j=this.firstFormElement,m=false;if(i&&i[1]){b.stopEvent(i[1]);if(i[0]===9&&this.firstElement){j=this.firstElement;}}if(j){try{j.focus();m=true;}catch(l){}}else{if(this.defaultHtmlButton){m=this.focusDefaultButton();}else{m=this.focusFirstButton();}}return m;},focusLast:function(k,i,n){var o=this.cfg.getProperty("buttons"),j=this.lastFormElement,m=false;if(i&&i[1]){b.stopEvent(i[1]);if(i[0]===9&&this.lastElement){j=this.lastElement;}}if(o&&f.isArray(o)){m=this.focusLastButton();}else{if(j){try{j.focus();m=true;}catch(l){}}}return m;},_getButton:function(j){var i=YAHOO.widget.Button;if(i&&j&&j.nodeName&&j.id){j=i.getButton(j.id)||j;}return j;},focusDefaultButton:function(){var i=this._getButton(this.defaultHtmlButton),k=false;if(i){try{i.focus();k=true;}catch(j){}}return k;},blurButtons:function(){var o=this.cfg.getProperty("buttons"),l,n,k,j;if(o&&f.isArray(o)){l=o.length;if(l>0){j=(l-1);do{n=o[j];if(n){k=this._getButton(n.htmlButton);if(k){try{k.blur();}catch(m){}}}}while(j--);}}},focusFirstButton:function(){var m=this.cfg.getProperty("buttons"),k,i,l=false;if(m&&f.isArray(m)){k=m[0];if(k){i=this._getButton(k.htmlButton);if(i){try{i.focus();l=true;}catch(j){}}}}return l;},focusLastButton:function(){var n=this.cfg.getProperty("buttons"),j,l,i,m=false;if(n&&f.isArray(n)){j=n.length;if(j>0){l=n[(j-1)];if(l){i=this._getButton(l.htmlButton);if(i){try{i.focus();m=true;}catch(k){}}}}}return m;},configPostMethod:function(j,i,k){this.registerForm();},validate:function(){return true;},submit:function(){if(this.validate()){if(this.beforeSubmitEvent.fire()){this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide();}return true;}else{return false;}}else{return false;}},cancel:function(){this.cancelEvent.fire();this.hide();},getData:function(){var A=this.form,k,t,w,m,u,r,q,j,x,l,y,B,p,C,o,z,v;function s(n){var i=n.tagName.toUpperCase();return((i=="INPUT"||i=="TEXTAREA"||i=="SELECT")&&n.name==m);}if(A){k=A.elements;t=k.length;w={};for(z=0;z<t;z++){m=k[z].name;u=e.getElementsBy(s,"*",A);r=u.length;if(r>0){if(r==1){u=u[0];q=u.type;j=u.tagName.toUpperCase();switch(j){case"INPUT":if(q=="checkbox"){w[m]=u.checked;}else{if(q!="radio"){w[m]=u.value;}}break;case"TEXTAREA":w[m]=u.value;break;case"SELECT":x=u.options;l=x.length;y=[];for(v=0;v<l;v++){B=x[v];if(B.selected){o=B.attributes.value;y[y.length]=(o&&o.specified)?B.value:B.text;}}w[m]=y;break;}}else{q=u[0].type;switch(q){case"radio":for(v=0;v<r;v++){p=u[v];if(p.checked){w[m]=p.value;break;}}break;case"checkbox":y=[];for(v=0;v<r;v++){C=u[v];if(C.checked){y[y.length]=C.value;}}w[m]=y;break;}}}}}return w;},destroy:function(i){d.call(this);this._aButtons=null;var j=this.element.getElementsByTagName("form"),k;if(j.length>0){k=j[0];if(k){b.purgeElement(k);if(k.parentNode){k.parentNode.removeChild(k);}this.form=null;}}a.superclass.destroy.call(this,i);},toString:function(){return"Dialog "+this.id;}});}());(function(){YAHOO.widget.SimpleDialog=function(e,d){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,e,d);};var c=YAHOO.util.Dom,b=YAHOO.widget.SimpleDialog,a={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};b.ICON_BLOCK="blckicon";b.ICON_ALARM="alrticon";b.ICON_HELP="hlpicon";b.ICON_INFO="infoicon";b.ICON_WARN="warnicon";b.ICON_TIP="tipicon";b.ICON_CSS_CLASSNAME="yui-icon";b.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(b,YAHOO.widget.Dialog,{initDefaultConfig:function(){b.superclass.initDefaultConfig.call(this);this.cfg.addProperty(a.ICON.key,{handler:this.configIcon,value:a.ICON.value,suppressEvent:a.ICON.suppressEvent});this.cfg.addProperty(a.TEXT.key,{handler:this.configText,value:a.TEXT.value,suppressEvent:a.TEXT.suppressEvent,supercedes:a.TEXT.supercedes});},init:function(e,d){b.superclass.init.call(this,e);this.beforeInitEvent.fire(b);c.addClass(this.element,b.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(d){this.cfg.applyConfig(d,true);}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(b);},registerForm:function(){b.superclass.registerForm.call(this);var e=this.form.ownerDocument,d=e.createElement("input");d.type="hidden";d.name=this.id;d.value="";this.form.appendChild(d);},configIcon:function(k,j,h){var d=j[0],e=this.body,f=b.ICON_CSS_CLASSNAME,l,i,g;if(d&&d!="none"){l=c.getElementsByClassName(f,"*",e);if(l.length===1){i=l[0];g=i.parentNode;if(g){g.removeChild(i);i=null;}}if(d.indexOf(".")==-1){i=document.createElement("span");i.className=(f+" "+d);i.innerHTML=" ";}else{i=document.createElement("img");i.src=(this.imageRoot+d);i.className=f;}if(i){e.insertBefore(i,e.firstChild);}}},configText:function(e,d,f){var g=d[0];if(g){this.setBody(g);this.cfg.refireEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(function(){YAHOO.widget.ContainerEffect=function(e,h,g,d,f){if(!f){f=YAHOO.util.Anim;}this.overlay=e;this.attrIn=h;this.attrOut=g;this.targetElement=d||e.element;this.animClass=f;};var b=YAHOO.util.Dom,c=YAHOO.util.CustomEvent,a=YAHOO.widget.ContainerEffect;a.FADE=function(d,f){var g=YAHOO.util.Easing,i={attributes:{opacity:{from:0,to:1}},duration:f,method:g.easeIn},e={attributes:{opacity:{to:0}},duration:f,method:g.easeOut},h=new a(d,i,e,d.element);h.handleUnderlayStart=function(){var k=this.overlay.underlay;if(k&&YAHOO.env.ua.ie){var j=(k.filters&&k.filters.length>0);if(j){b.addClass(d.element,"yui-effect-fade");}}};h.handleUnderlayComplete=function(){var j=this.overlay.underlay;if(j&&YAHOO.env.ua.ie){b.removeClass(d.element,"yui-effect-fade");}};h.handleStartAnimateIn=function(k,j,l){l.overlay._fadingIn=true;b.addClass(l.overlay.element,"hide-select");if(!l.overlay.underlay){l.overlay.cfg.refireEvent("underlay"); |
43 | 43 | }l.handleUnderlayStart();l.overlay._setDomVisibility(true);b.setStyle(l.overlay.element,"opacity",0);};h.handleCompleteAnimateIn=function(k,j,l){l.overlay._fadingIn=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateInCompleteEvent.fire();};h.handleStartAnimateOut=function(k,j,l){l.overlay._fadingOut=true;b.addClass(l.overlay.element,"hide-select");l.handleUnderlayStart();};h.handleCompleteAnimateOut=function(k,j,l){l.overlay._fadingOut=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.overlay._setDomVisibility(false);b.setStyle(l.overlay.element,"opacity",1);l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateOutCompleteEvent.fire();};h.init();return h;};a.SLIDE=function(f,d){var i=YAHOO.util.Easing,l=f.cfg.getProperty("x")||b.getX(f.element),k=f.cfg.getProperty("y")||b.getY(f.element),m=b.getClientWidth(),h=f.element.offsetWidth,j={attributes:{points:{to:[l,k]}},duration:d,method:i.easeIn},e={attributes:{points:{to:[(m+25),k]}},duration:d,method:i.easeOut},g=new a(f,j,e,f.element,YAHOO.util.Motion);g.handleStartAnimateIn=function(o,n,p){p.overlay.element.style.left=((-25)-h)+"px";p.overlay.element.style.top=k+"px";};g.handleTweenAnimateIn=function(q,p,r){var s=b.getXY(r.overlay.element),o=s[0],n=s[1];if(b.getStyle(r.overlay.element,"visibility")=="hidden"&&o<l){r.overlay._setDomVisibility(true);}r.overlay.cfg.setProperty("xy",[o,n],true);r.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateIn=function(o,n,p){p.overlay.cfg.setProperty("xy",[l,k],true);p.startX=l;p.startY=k;p.overlay.cfg.refireEvent("iframe");p.animateInCompleteEvent.fire();};g.handleStartAnimateOut=function(o,n,r){var p=b.getViewportWidth(),s=b.getXY(r.overlay.element),q=s[1];r.animOut.attributes.points.to=[(p+25),q];};g.handleTweenAnimateOut=function(p,o,q){var s=b.getXY(q.overlay.element),n=s[0],r=s[1];q.overlay.cfg.setProperty("xy",[n,r],true);q.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateOut=function(o,n,p){p.overlay._setDomVisibility(false);p.overlay.cfg.setProperty("xy",[l,k]);p.animateOutCompleteEvent.fire();};g.init();return g;};a.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=c.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=c.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=c.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=c.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateOutEvent.fire();this.animOut.animate();},lastFrameOnStop:true,_stopAnims:function(d){if(this.animOut&&this.animOut.isAnimated()){this.animOut.stop(d);}if(this.animIn&&this.animIn.isAnimated()){this.animIn.stop(d);}},handleStartAnimateIn:function(e,d,f){},handleTweenAnimateIn:function(e,d,f){},handleCompleteAnimateIn:function(e,d,f){},handleStartAnimateOut:function(e,d,f){},handleTweenAnimateOut:function(e,d,f){},handleCompleteAnimateOut:function(e,d,f){},toString:function(){var d="ContainerEffect";if(this.overlay){d+=" ["+this.overlay.toString()+"]";}return d;}};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider);})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.9.0",build:"2800"}); |
44 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.parametros.mapexten;cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{alert("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}}; | |
45 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/á|à|ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<input onchange=\""+onch+"\" tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.ResizePanel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas,n,nome="";if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td> <input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value=' ' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value=' ' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento,nx="",texto="Cor",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.ResizePanel(id,{height:"480px",modal:false,width:"380px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versao adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)}; | |
44 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.parametros.mapexten;cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{alert("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}}; | |
45 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/á|à|ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<input onchange=\""+onch+"\" tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.ResizePanel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas,n,nome="";if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td> <input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value=' ' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value=' ' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento,nx="",texto="Cor",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.ResizePanel(id,{height:"480px",modal:false,width:"380px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versao adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)}; | |
46 | 46 | /* |
47 | 47 | OpenLayers.js -- OpenLayers Map Viewer Library |
48 | 48 | Copyright 2005-2011 OpenLayers Contributors, released under the FreeBSD |
... | ... | @@ -3012,12 +3012,12 @@ if(data&&data.nodeType==9){data=data.documentElement;} |
3012 | 3012 | var capabilities={};this.readNode(data,capabilities);capabilities.version=this.version;return capabilities;},readers:{"wmts":{"Capabilities":function(node,obj){this.readChildNodes(node,obj);},"Contents":function(node,obj){obj.contents={};obj.contents.layers=[];obj.contents.tileMatrixSets={};this.readChildNodes(node,obj.contents);},"Layer":function(node,obj){var layer={styles:[],formats:[],tileMatrixSetLinks:[]};layer.layers=[];this.readChildNodes(node,layer);obj.layers.push(layer);},"Style":function(node,obj){var style={};style.isDefault=(node.getAttribute("isDefault")==="true");this.readChildNodes(node,style);obj.styles.push(style);},"Format":function(node,obj){obj.formats.push(this.getChildValue(node));},"TileMatrixSetLink":function(node,obj){var tileMatrixSetLink={};this.readChildNodes(node,tileMatrixSetLink);obj.tileMatrixSetLinks.push(tileMatrixSetLink);},"TileMatrixSet":function(node,obj){if(obj.layers){var tileMatrixSet={matrixIds:[]};this.readChildNodes(node,tileMatrixSet);obj.tileMatrixSets[tileMatrixSet.identifier]=tileMatrixSet;}else{obj.tileMatrixSet=this.getChildValue(node);}},"TileMatrix":function(node,obj){var tileMatrix={supportedCRS:obj.supportedCRS};this.readChildNodes(node,tileMatrix);obj.matrixIds.push(tileMatrix);},"ScaleDenominator":function(node,obj){obj.scaleDenominator=parseFloat(this.getChildValue(node));},"TopLeftCorner":function(node,obj){var topLeftCorner=this.getChildValue(node);var coords=topLeftCorner.split(" ");var yx;if(obj.supportedCRS){var crs=obj.supportedCRS.replace(/urn:ogc:def:crs:(\w+):.+:(\w+)$/,"urn:ogc:def:crs:$1::$2");yx=!!this.yx[crs];} |
3013 | 3013 | if(yx){obj.topLeftCorner=new OpenLayers.LonLat(coords[1],coords[0]);}else{obj.topLeftCorner=new OpenLayers.LonLat(coords[0],coords[1]);}},"TileWidth":function(node,obj){obj.tileWidth=parseInt(this.getChildValue(node));},"TileHeight":function(node,obj){obj.tileHeight=parseInt(this.getChildValue(node));},"MatrixWidth":function(node,obj){obj.matrixWidth=parseInt(this.getChildValue(node));},"MatrixHeight":function(node,obj){obj.matrixHeight=parseInt(this.getChildValue(node));},"ResourceURL":function(node,obj){obj.resourceUrl=obj.resourceUrl||{};obj.resourceUrl[node.getAttribute("resourceType")]={format:node.getAttribute("format"),template:node.getAttribute("template")};},"WSDL":function(node,obj){obj.wsdl={};obj.wsdl.href=node.getAttribute("xlink:href");},"ServiceMetadataURL":function(node,obj){obj.serviceMetadataUrl={};obj.serviceMetadataUrl.href=node.getAttribute("xlink:href");}},"ows":OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]},CLASS_NAME:"OpenLayers.Format.WMTSCapabilities.v1_0_0"}); |
3014 | 3014 | /*çjslint white:false,undef: false, rhino: true, onevar: true, evil: false */ |
3015 | -var $i = function(id) | |
3015 | +$i = function(id) | |
3016 | 3016 | {return document.getElementById(id);}; |
3017 | 3017 | //seta as variáveis navn e navm |
3018 | -var navn = false; | |
3019 | -var navm = false; | |
3020 | -var app = navigator.appName.substring(0,1); | |
3018 | +navn = false; | |
3019 | +navm = false; | |
3020 | +app = navigator.appName.substring(0,1); | |
3021 | 3021 | if (app==='N'){navn=true;}else{navm=true;} |
3022 | 3022 | OpenLayers.ImgPath = "../pacotes/openlayers/img/"; |
3023 | 3023 | OpenLayers.Lang.setCode("pt-BR"); | ... | ... |
mashups/openlayers_compacto.js.php
... | ... | @@ -41,8 +41,8 @@ u.style.height="1px";u.style.width="1px";u.style.position="absolute";u.style.lef |
41 | 41 | setTimeout(function(){a.removeClass(v,"yui-force-redraw");},0);},toString:function(){return"Panel "+this.id;}});}());(function(){YAHOO.widget.Dialog=function(j,i){YAHOO.widget.Dialog.superclass.constructor.call(this,j,i);};var b=YAHOO.util.Event,g=YAHOO.util.CustomEvent,e=YAHOO.util.Dom,a=YAHOO.widget.Dialog,f=YAHOO.lang,h={"BEFORE_SUBMIT":"beforeSubmit","SUBMIT":"submit","MANUAL_SUBMIT":"manualSubmit","ASYNC_SUBMIT":"asyncSubmit","FORM_SUBMIT":"formSubmit","CANCEL":"cancel"},c={"POST_METHOD":{key:"postmethod",value:"async"},"POST_DATA":{key:"postdata",value:null},"BUTTONS":{key:"buttons",value:"none",supercedes:["visible"]},"HIDEAFTERSUBMIT":{key:"hideaftersubmit",value:true}};a.CSS_DIALOG="yui-dialog";function d(){var m=this._aButtons,k,l,j;if(f.isArray(m)){k=m.length;if(k>0){j=k-1;do{l=m[j];if(YAHOO.widget.Button&&l instanceof YAHOO.widget.Button){l.destroy();}else{if(l.tagName.toUpperCase()=="BUTTON"){b.purgeElement(l);b.purgeElement(l,false);}}}while(j--);}}}YAHOO.extend(a,YAHOO.widget.Panel,{form:null,initDefaultConfig:function(){a.superclass.initDefaultConfig.call(this);this.callback={success:null,failure:null,argument:null};this.cfg.addProperty(c.POST_METHOD.key,{handler:this.configPostMethod,value:c.POST_METHOD.value,validator:function(i){if(i!="form"&&i!="async"&&i!="none"&&i!="manual"){return false;}else{return true;}}});this.cfg.addProperty(c.POST_DATA.key,{value:c.POST_DATA.value});this.cfg.addProperty(c.HIDEAFTERSUBMIT.key,{value:c.HIDEAFTERSUBMIT.value});this.cfg.addProperty(c.BUTTONS.key,{handler:this.configButtons,value:c.BUTTONS.value,supercedes:c.BUTTONS.supercedes});},initEvents:function(){a.superclass.initEvents.call(this);var i=g.LIST;this.beforeSubmitEvent=this.createEvent(h.BEFORE_SUBMIT);this.beforeSubmitEvent.signature=i;this.submitEvent=this.createEvent(h.SUBMIT);this.submitEvent.signature=i;this.manualSubmitEvent=this.createEvent(h.MANUAL_SUBMIT);this.manualSubmitEvent.signature=i;this.asyncSubmitEvent=this.createEvent(h.ASYNC_SUBMIT);this.asyncSubmitEvent.signature=i;this.formSubmitEvent=this.createEvent(h.FORM_SUBMIT);this.formSubmitEvent.signature=i;this.cancelEvent=this.createEvent(h.CANCEL);this.cancelEvent.signature=i;},init:function(j,i){a.superclass.init.call(this,j);this.beforeInitEvent.fire(a);e.addClass(this.element,a.CSS_DIALOG);this.cfg.setProperty("visible",false);if(i){this.cfg.applyConfig(i,true);}this.beforeHideEvent.subscribe(this.blurButtons,this,true);this.subscribe("changeBody",this.registerForm);this.initEvent.fire(a);},doSubmit:function(){var q=YAHOO.util.Connect,r=this.form,l=false,o=false,s,n,m,j;switch(this.cfg.getProperty("postmethod")){case"async":s=r.elements;n=s.length;if(n>0){m=n-1;do{if(s[m].type=="file"){l=true;break;}}while(m--);}if(l&&YAHOO.env.ua.ie&&this.isSecure){o=true;}j=this._getFormAttributes(r);q.setForm(r,l,o);var k=this.cfg.getProperty("postdata");var p=q.asyncRequest(j.method,j.action,this.callback,k);this.asyncSubmitEvent.fire(p);break;case"form":r.submit();this.formSubmitEvent.fire();break;case"none":case"manual":this.manualSubmitEvent.fire();break;}},_getFormAttributes:function(k){var i={method:null,action:null};if(k){if(k.getAttributeNode){var j=k.getAttributeNode("action");var l=k.getAttributeNode("method");if(j){i.action=j.value;}if(l){i.method=l.value;}}else{i.action=k.getAttribute("action");i.method=k.getAttribute("method");}}i.method=(f.isString(i.method)?i.method:"POST").toUpperCase();i.action=f.isString(i.action)?i.action:"";return i;},registerForm:function(){var i=this.element.getElementsByTagName("form")[0];if(this.form){if(this.form==i&&e.isAncestor(this.element,this.form)){return;}else{b.purgeElement(this.form);this.form=null;}}if(!i){i=document.createElement("form");i.name="frm_"+this.id;this.body.appendChild(i);}if(i){this.form=i;b.on(i,"submit",this._submitHandler,this,true);}},_submitHandler:function(i){b.stopEvent(i);this.submit();this.form.blur();},setTabLoop:function(i,j){i=i||this.firstButton;j=j||this.lastButton;a.superclass.setTabLoop.call(this,i,j);},_setTabLoop:function(i,j){i=i||this.firstButton;j=this.lastButton||j;this.setTabLoop(i,j);},setFirstLastFocusable:function(){a.superclass.setFirstLastFocusable.call(this);var k,j,m,n=this.focusableElements;this.firstFormElement=null;this.lastFormElement=null;if(this.form&&n&&n.length>0){j=n.length;for(k=0;k<j;++k){m=n[k];if(this.form===m.form){this.firstFormElement=m;break;}}for(k=j-1;k>=0;--k){m=n[k];if(this.form===m.form){this.lastFormElement=m;break;}}}},configClose:function(j,i,k){a.superclass.configClose.apply(this,arguments);},_doClose:function(i){b.preventDefault(i);this.cancel();},configButtons:function(t,s,n){var o=YAHOO.widget.Button,v=s[0],l=this.innerElement,u,q,k,r,p,j,m;d.call(this);this._aButtons=null;if(f.isArray(v)){p=document.createElement("span");p.className="button-group";r=v.length;this._aButtons=[];this.defaultHtmlButton=null;for(m=0;m<r;m++){u=v[m];if(o){k=new o({label:u.text,type:u.type});k.appendTo(p);q=k.get("element");if(u.isDefault){k.addClass("default");this.defaultHtmlButton=q;}if(f.isFunction(u.handler)){k.set("onclick",{fn:u.handler,obj:this,scope:this});}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){k.set("onclick",{fn:u.handler.fn,obj:((!f.isUndefined(u.handler.obj))?u.handler.obj:this),scope:(u.handler.scope||this)});}}this._aButtons[this._aButtons.length]=k;}else{q=document.createElement("button");q.setAttribute("type","button");if(u.isDefault){q.className="default";this.defaultHtmlButton=q;}q.innerHTML=u.text;if(f.isFunction(u.handler)){b.on(q,"click",u.handler,this,true);}else{if(f.isObject(u.handler)&&f.isFunction(u.handler.fn)){b.on(q,"click",u.handler.fn,((!f.isUndefined(u.handler.obj))?u.handler.obj:this),(u.handler.scope||this));}}p.appendChild(q);this._aButtons[this._aButtons.length]=q;}u.htmlButton=q;if(m===0){this.firstButton=q;}if(m==(r-1)){this.lastButton=q;}}this.setFooter(p);j=this.footer;if(e.inDocument(this.element)&&!e.isAncestor(l,j)){l.appendChild(j);}this.buttonSpan=p;}else{p=this.buttonSpan; |
42 | 42 | j=this.footer;if(p&&j){j.removeChild(p);this.buttonSpan=null;this.firstButton=null;this.lastButton=null;this.defaultHtmlButton=null;}}this.changeContentEvent.fire();},getButtons:function(){return this._aButtons||null;},focusFirst:function(k,i,n){var j=this.firstFormElement,m=false;if(i&&i[1]){b.stopEvent(i[1]);if(i[0]===9&&this.firstElement){j=this.firstElement;}}if(j){try{j.focus();m=true;}catch(l){}}else{if(this.defaultHtmlButton){m=this.focusDefaultButton();}else{m=this.focusFirstButton();}}return m;},focusLast:function(k,i,n){var o=this.cfg.getProperty("buttons"),j=this.lastFormElement,m=false;if(i&&i[1]){b.stopEvent(i[1]);if(i[0]===9&&this.lastElement){j=this.lastElement;}}if(o&&f.isArray(o)){m=this.focusLastButton();}else{if(j){try{j.focus();m=true;}catch(l){}}}return m;},_getButton:function(j){var i=YAHOO.widget.Button;if(i&&j&&j.nodeName&&j.id){j=i.getButton(j.id)||j;}return j;},focusDefaultButton:function(){var i=this._getButton(this.defaultHtmlButton),k=false;if(i){try{i.focus();k=true;}catch(j){}}return k;},blurButtons:function(){var o=this.cfg.getProperty("buttons"),l,n,k,j;if(o&&f.isArray(o)){l=o.length;if(l>0){j=(l-1);do{n=o[j];if(n){k=this._getButton(n.htmlButton);if(k){try{k.blur();}catch(m){}}}}while(j--);}}},focusFirstButton:function(){var m=this.cfg.getProperty("buttons"),k,i,l=false;if(m&&f.isArray(m)){k=m[0];if(k){i=this._getButton(k.htmlButton);if(i){try{i.focus();l=true;}catch(j){}}}}return l;},focusLastButton:function(){var n=this.cfg.getProperty("buttons"),j,l,i,m=false;if(n&&f.isArray(n)){j=n.length;if(j>0){l=n[(j-1)];if(l){i=this._getButton(l.htmlButton);if(i){try{i.focus();m=true;}catch(k){}}}}}return m;},configPostMethod:function(j,i,k){this.registerForm();},validate:function(){return true;},submit:function(){if(this.validate()){if(this.beforeSubmitEvent.fire()){this.doSubmit();this.submitEvent.fire();if(this.cfg.getProperty("hideaftersubmit")){this.hide();}return true;}else{return false;}}else{return false;}},cancel:function(){this.cancelEvent.fire();this.hide();},getData:function(){var A=this.form,k,t,w,m,u,r,q,j,x,l,y,B,p,C,o,z,v;function s(n){var i=n.tagName.toUpperCase();return((i=="INPUT"||i=="TEXTAREA"||i=="SELECT")&&n.name==m);}if(A){k=A.elements;t=k.length;w={};for(z=0;z<t;z++){m=k[z].name;u=e.getElementsBy(s,"*",A);r=u.length;if(r>0){if(r==1){u=u[0];q=u.type;j=u.tagName.toUpperCase();switch(j){case"INPUT":if(q=="checkbox"){w[m]=u.checked;}else{if(q!="radio"){w[m]=u.value;}}break;case"TEXTAREA":w[m]=u.value;break;case"SELECT":x=u.options;l=x.length;y=[];for(v=0;v<l;v++){B=x[v];if(B.selected){o=B.attributes.value;y[y.length]=(o&&o.specified)?B.value:B.text;}}w[m]=y;break;}}else{q=u[0].type;switch(q){case"radio":for(v=0;v<r;v++){p=u[v];if(p.checked){w[m]=p.value;break;}}break;case"checkbox":y=[];for(v=0;v<r;v++){C=u[v];if(C.checked){y[y.length]=C.value;}}w[m]=y;break;}}}}}return w;},destroy:function(i){d.call(this);this._aButtons=null;var j=this.element.getElementsByTagName("form"),k;if(j.length>0){k=j[0];if(k){b.purgeElement(k);if(k.parentNode){k.parentNode.removeChild(k);}this.form=null;}}a.superclass.destroy.call(this,i);},toString:function(){return"Dialog "+this.id;}});}());(function(){YAHOO.widget.SimpleDialog=function(e,d){YAHOO.widget.SimpleDialog.superclass.constructor.call(this,e,d);};var c=YAHOO.util.Dom,b=YAHOO.widget.SimpleDialog,a={"ICON":{key:"icon",value:"none",suppressEvent:true},"TEXT":{key:"text",value:"",suppressEvent:true,supercedes:["icon"]}};b.ICON_BLOCK="blckicon";b.ICON_ALARM="alrticon";b.ICON_HELP="hlpicon";b.ICON_INFO="infoicon";b.ICON_WARN="warnicon";b.ICON_TIP="tipicon";b.ICON_CSS_CLASSNAME="yui-icon";b.CSS_SIMPLEDIALOG="yui-simple-dialog";YAHOO.extend(b,YAHOO.widget.Dialog,{initDefaultConfig:function(){b.superclass.initDefaultConfig.call(this);this.cfg.addProperty(a.ICON.key,{handler:this.configIcon,value:a.ICON.value,suppressEvent:a.ICON.suppressEvent});this.cfg.addProperty(a.TEXT.key,{handler:this.configText,value:a.TEXT.value,suppressEvent:a.TEXT.suppressEvent,supercedes:a.TEXT.supercedes});},init:function(e,d){b.superclass.init.call(this,e);this.beforeInitEvent.fire(b);c.addClass(this.element,b.CSS_SIMPLEDIALOG);this.cfg.queueProperty("postmethod","manual");if(d){this.cfg.applyConfig(d,true);}this.beforeRenderEvent.subscribe(function(){if(!this.body){this.setBody("");}},this,true);this.initEvent.fire(b);},registerForm:function(){b.superclass.registerForm.call(this);var e=this.form.ownerDocument,d=e.createElement("input");d.type="hidden";d.name=this.id;d.value="";this.form.appendChild(d);},configIcon:function(k,j,h){var d=j[0],e=this.body,f=b.ICON_CSS_CLASSNAME,l,i,g;if(d&&d!="none"){l=c.getElementsByClassName(f,"*",e);if(l.length===1){i=l[0];g=i.parentNode;if(g){g.removeChild(i);i=null;}}if(d.indexOf(".")==-1){i=document.createElement("span");i.className=(f+" "+d);i.innerHTML=" ";}else{i=document.createElement("img");i.src=(this.imageRoot+d);i.className=f;}if(i){e.insertBefore(i,e.firstChild);}}},configText:function(e,d,f){var g=d[0];if(g){this.setBody(g);this.cfg.refireEvent("icon");}},toString:function(){return"SimpleDialog "+this.id;}});}());(function(){YAHOO.widget.ContainerEffect=function(e,h,g,d,f){if(!f){f=YAHOO.util.Anim;}this.overlay=e;this.attrIn=h;this.attrOut=g;this.targetElement=d||e.element;this.animClass=f;};var b=YAHOO.util.Dom,c=YAHOO.util.CustomEvent,a=YAHOO.widget.ContainerEffect;a.FADE=function(d,f){var g=YAHOO.util.Easing,i={attributes:{opacity:{from:0,to:1}},duration:f,method:g.easeIn},e={attributes:{opacity:{to:0}},duration:f,method:g.easeOut},h=new a(d,i,e,d.element);h.handleUnderlayStart=function(){var k=this.overlay.underlay;if(k&&YAHOO.env.ua.ie){var j=(k.filters&&k.filters.length>0);if(j){b.addClass(d.element,"yui-effect-fade");}}};h.handleUnderlayComplete=function(){var j=this.overlay.underlay;if(j&&YAHOO.env.ua.ie){b.removeClass(d.element,"yui-effect-fade");}};h.handleStartAnimateIn=function(k,j,l){l.overlay._fadingIn=true;b.addClass(l.overlay.element,"hide-select");if(!l.overlay.underlay){l.overlay.cfg.refireEvent("underlay"); |
43 | 43 | }l.handleUnderlayStart();l.overlay._setDomVisibility(true);b.setStyle(l.overlay.element,"opacity",0);};h.handleCompleteAnimateIn=function(k,j,l){l.overlay._fadingIn=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateInCompleteEvent.fire();};h.handleStartAnimateOut=function(k,j,l){l.overlay._fadingOut=true;b.addClass(l.overlay.element,"hide-select");l.handleUnderlayStart();};h.handleCompleteAnimateOut=function(k,j,l){l.overlay._fadingOut=false;b.removeClass(l.overlay.element,"hide-select");if(l.overlay.element.style.filter){l.overlay.element.style.filter=null;}l.overlay._setDomVisibility(false);b.setStyle(l.overlay.element,"opacity",1);l.handleUnderlayComplete();l.overlay.cfg.refireEvent("iframe");l.animateOutCompleteEvent.fire();};h.init();return h;};a.SLIDE=function(f,d){var i=YAHOO.util.Easing,l=f.cfg.getProperty("x")||b.getX(f.element),k=f.cfg.getProperty("y")||b.getY(f.element),m=b.getClientWidth(),h=f.element.offsetWidth,j={attributes:{points:{to:[l,k]}},duration:d,method:i.easeIn},e={attributes:{points:{to:[(m+25),k]}},duration:d,method:i.easeOut},g=new a(f,j,e,f.element,YAHOO.util.Motion);g.handleStartAnimateIn=function(o,n,p){p.overlay.element.style.left=((-25)-h)+"px";p.overlay.element.style.top=k+"px";};g.handleTweenAnimateIn=function(q,p,r){var s=b.getXY(r.overlay.element),o=s[0],n=s[1];if(b.getStyle(r.overlay.element,"visibility")=="hidden"&&o<l){r.overlay._setDomVisibility(true);}r.overlay.cfg.setProperty("xy",[o,n],true);r.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateIn=function(o,n,p){p.overlay.cfg.setProperty("xy",[l,k],true);p.startX=l;p.startY=k;p.overlay.cfg.refireEvent("iframe");p.animateInCompleteEvent.fire();};g.handleStartAnimateOut=function(o,n,r){var p=b.getViewportWidth(),s=b.getXY(r.overlay.element),q=s[1];r.animOut.attributes.points.to=[(p+25),q];};g.handleTweenAnimateOut=function(p,o,q){var s=b.getXY(q.overlay.element),n=s[0],r=s[1];q.overlay.cfg.setProperty("xy",[n,r],true);q.overlay.cfg.refireEvent("iframe");};g.handleCompleteAnimateOut=function(o,n,p){p.overlay._setDomVisibility(false);p.overlay.cfg.setProperty("xy",[l,k]);p.animateOutCompleteEvent.fire();};g.init();return g;};a.prototype={init:function(){this.beforeAnimateInEvent=this.createEvent("beforeAnimateIn");this.beforeAnimateInEvent.signature=c.LIST;this.beforeAnimateOutEvent=this.createEvent("beforeAnimateOut");this.beforeAnimateOutEvent.signature=c.LIST;this.animateInCompleteEvent=this.createEvent("animateInComplete");this.animateInCompleteEvent.signature=c.LIST;this.animateOutCompleteEvent=this.createEvent("animateOutComplete");this.animateOutCompleteEvent.signature=c.LIST;this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);},animateIn:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateInEvent.fire();this.animIn.animate();},animateOut:function(){this._stopAnims(this.lastFrameOnStop);this.beforeAnimateOutEvent.fire();this.animOut.animate();},lastFrameOnStop:true,_stopAnims:function(d){if(this.animOut&&this.animOut.isAnimated()){this.animOut.stop(d);}if(this.animIn&&this.animIn.isAnimated()){this.animIn.stop(d);}},handleStartAnimateIn:function(e,d,f){},handleTweenAnimateIn:function(e,d,f){},handleCompleteAnimateIn:function(e,d,f){},handleStartAnimateOut:function(e,d,f){},handleTweenAnimateOut:function(e,d,f){},handleCompleteAnimateOut:function(e,d,f){},toString:function(){var d="ContainerEffect";if(this.overlay){d+=" ["+this.overlay.toString()+"]";}return d;}};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider);})();YAHOO.register("container",YAHOO.widget.Module,{version:"2.9.0",build:"2800"}); |
44 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.parametros.mapexten;cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{alert("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}}; | |
45 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/á|à|ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<input onchange=\""+onch+"\" tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.ResizePanel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas,n,nome="";if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td> <input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value=' ' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value=' ' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento,nx="",texto="Cor",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.ResizePanel(id,{height:"480px",modal:false,width:"380px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versao adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)}; | |
44 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}i3GEO.calculo={metododistancia:"vicenty",dms2dd:function(cd,cm,cs){try{var sinal,spm,mpg,dd;sinal='positivo';if(cd<0){cd=cd*-1;sinal='negativo'}spm=cs/3600;mpg=cm/60;dd=(cd*1)+(mpg*1)+(spm*1);if(sinal==='negativo'){dd=dd*-1}return(dd)}catch(e){return(0)}},dd2tela:function(vx,vy,docmapa,ext,cellsize){try{var pos,xyn,dc,imgext,c,xy;if(i3GEO.Interface.ATUAL==="googlemaps"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xyn=i3GeoMapOverlay.getProjection().fromLatLngToContainerPixel(new google.maps.LatLng(vy,vx));xy=[];return[(xyn.x)+pos[0],(xyn.y)+pos[1]]}if(i3GEO.Interface.ATUAL==="openlayers"&&docmapa.id!=="mapaReferencia"){pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xy=i3geoOL.getViewPortPxFromLonLat(new OpenLayers.LonLat(vx,vy));return[(xy.x)+pos[0],(xy.y)+pos[1]]}if(arguments.length===3){ext=i3GEO.parametros.mapexten;cellsize=i3GEO.parametros.pixelsize}if(arguments.length===4){cellsize=i3GEO.parametros.pixelsize}if(!docmapa){docmapa=window.document}dc=docmapa;pos=i3GEO.util.pegaPosicaoObjeto(dc);imgext=ext.split(" ");vx=(vx*1)-(imgext[0]*1);vy=(vy*-1)+(imgext[3]*1);c=cellsize*1;return[(vx/c)+pos[0],(vy/c)+pos[1]]}catch(e){return([])}},dd2dms:function(x,y){var restod=0,sx="00.00",sy="00.00",mx,mm,restos,my,s,dx,dy;dx=parseInt(x,10);if(dx>0){restod=x-dx}if(dx<0){restod=(x*-1)-(dx*-1)}if(restod!==0){mm=restod*60;mx=parseInt(restod*60,10);restos=mm-mx;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sx=s}}else{mx="00";sx="00.00"}dy=parseInt(y,10);if(dy>0){restod=y-dy}if(dy<0){restod=(y*-1)-(dy*-1)}if(restod!==0){mm=restod*60;my=parseInt(restod*60,10);restos=mm-my;if(restos!==0){s=restos*60;s=(s+"_").substring(0,5);sy=s}}else{my="00";sy="00.00"}return[dx+" "+mx+" "+sx,dy+" "+my+" "+sy]},tela2dd:function(xfign,yfign,g_celula,imgext,idorigem){try{var amext,longdd,latdd;if(i3GEO.Interface.ATUAL==="googlemaps"&&arguments.length===4){amext=i3GeoMapOverlay.getProjection().fromContainerPixelToLatLng(new google.maps.Point(xfign,yfign));return[amext.lng(),amext.lat()]}if(i3GEO.Interface.ATUAL==="openlayers"&&arguments.length===4){amext=i3geoOL.getLonLatFromPixel(new OpenLayers.Pixel(xfign,yfign));return[amext.lon,amext.lat]}if(navm){xfign=xfign-2.2;yfign=yfign-2.7}else{xfign=xfign-0.12;yfign=yfign-1.05}amext=imgext.split(" ");longdd=(amext[0]*1)+(g_celula*xfign);latdd=(amext[3]*1)-(g_celula*yfign);return[longdd,latdd]}catch(e){return(0)}},area:function(pontos,pixel){var $polygon_area,$i,$array_length;try{if(pontos.xpt.length>2){$array_length=pontos.xpt.length;pontos.xtela.push(pontos.xtela[0]);pontos.ytela.push(pontos.ytela[0]);$polygon_area=0;for($i=0;$i<$array_length;$i+=1){$polygon_area+=((pontos.xtela[$i]*pontos.ytela[$i+1])-(pontos.ytela[$i]*pontos.xtela[$i+1]))}$polygon_area=Math.abs($polygon_area)/2}else{$polygon_area=0}return $polygon_area*pixel}catch(e){return(0)}},distancia:function(lon1,lat1,lon2,lat2){if(i3GEO.calculo.metododistancia==="haversine"){return i3GEO.calculo.distHaversine(lon1,lat1,lon2,lat2)}if(i3GEO.calculo.metododistancia==="vicenty"){return i3GEO.calculo.distVincenty(lon1,lat1,lon2,lat2)}},distHaversine:function(lon1,lat1,lon2,lat2){var dLat,dLon,a,c,d;dLat=((lat2-lat1))*Math.PI/180;dLon=((lon2-lon1))*Math.PI/180;a=Math.sin(dLat/2)*Math.sin(dLat/2)+Math.cos(lat1*Math.PI/180)*Math.cos(lat2*Math.PI/180)*Math.sin(dLon/2)*Math.sin(dLon/2);c=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));d=6378.137*c;return d},distVincenty:function(lon1,lat1,lon2,lat2){var rad=function(x){return x*Math.PI/180},ct={a:6378137,b:6356752.3142,f:1/298.257223563},p1={lat:lat1,lon:lon1},p2={lat:lat2,lon:lon2},a=ct.a,b=ct.b,f=ct.f,L=rad(p2.lon-p1.lon),U1=Math.atan((1-f)*Math.tan(rad(p1.lat))),U2=Math.atan((1-f)*Math.tan(rad(p2.lat))),sinU1=Math.sin(U1),cosU1=Math.cos(U1),sinU2=Math.sin(U2),cosU2=Math.cos(U2),lambda=L,lambdaP=2*Math.PI,iterLimit=20,sinLambda,cosLambda,sinSigma=0,cosSigma=0,sigma=0,alpha,cosSqAlpha=0,cos2SigmaM=0,C,uSq,A,B,s,d,deltaSigma;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){sinLambda=Math.sin(lambda);cosLambda=Math.cos(lambda);sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma===0){return 0}cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;sigma=Math.atan2(sinSigma,cosSigma);alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)))}if(iterLimit===0){return NaN}uSq=cosSqAlpha*(a*a-b*b)/(b*b);A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)-B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));s=b*A*(sigma-deltaSigma);d=s.toFixed(3)/1000;return d},direcao:function(lon1,lat1,lon2,lat2){var dLon,y,x,r;lat1=lat1*(Math.PI/180);lat2=lat2*(Math.PI/180);dLon=(lon2-lon1)*(Math.PI/180);y=Math.sin(dLon)*Math.cos(lat2);x=Math.cos(lat1)*Math.sin(lat2)-Math.sin(lat1)*Math.cos(lat2)*Math.cos(dLon);r=Math.atan2(y,x);r=r*180/Math.PI;r=r+360;return r%360},destinoDD:function(lon,lat,d,direcao){var R,lat1,lon1,brng,lat2,lon2;R=6371;lat1=lat*(Math.PI/180);lon1=lon*(Math.PI/180);brng=direcao*(Math.PI/180);lat2=Math.asin(Math.sin(lat1)*Math.cos(d/R)+Math.cos(lat1)*Math.sin(d/R)*Math.cos(brng));lon2=lon1+Math.atan2(Math.sin(brng)*Math.sin(d/R)*Math.cos(lat1),Math.cos(d/R)-Math.sin(lat1)*Math.sin(lat2));lon2=(lon2+Math.PI)%(2*Math.PI)-Math.PI;if(isNaN(lat2)||isNaN(lon2)){return null}return[(lon2*180/Math.PI),(lat2*180/Math.PI)]},rect2ext:function(idrect,mapext,pixel){var bx,bxs,xfig,yfig,nx,ny,pos,amext,dy,x1,y1,x2,y2,pix=parseInt(document.getElementById(idrect).style.left,10),piy=parseInt(document.getElementById(idrect).style.top,10);if($i(idrect)){bx=$i(idrect);bxs=bx.style}else{alert("Box nao encontrado");return}pos=i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));xfig=pix+(parseInt(bxs.width,10))-pos[0];yfig=piy+(parseInt(bxs.height,10))-pos[1];amext=mapext.split(" ");dy=((amext[1]*1)-(amext[3]*1))/-1;if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x1=(amext[0]*1)+nx;y1=(amext[3]*1)-ny;xfig=pix-pos[0];yfig=piy-pos[1];if(dy<0){dy=dy*-1}nx=pixel*xfig;ny=pixel*yfig;x2=(amext[0]*1)+nx;y2=(amext[3]*1)-ny;return[x2+" "+y2+" "+x1+" "+y1,x1,y1,x2,y2]},ext2rect:function(idrect,mapext,boxext,pixel,documento){var rectbox,xyMin,xyMax,w,h,tl,pos,t,l,d,box;rectbox=boxext.split(" ");xyMin=i3GEO.calculo.dd2tela(rectbox[0],rectbox[1],documento,boxext,pixel);xyMax=i3GEO.calculo.dd2tela(rectbox[2],rectbox[3],documento,boxext,pixel);w=xyMax[0]-xyMin[0];h=xyMin[1]-xyMax[1];tl=i3GEO.calculo.dd2tela(rectbox[0],rectbox[3],documento,mapext,pixel);pos=i3GEO.util.pegaPosicaoObjeto(documento);t=tl[1]-pos[1];l=tl[0]-pos[0];d="block";if($i(idrect)){box=$i(idrect);box.style.width=w+"px";box.style.height=h+"px";box.style.top=t+"px";box.style.left=l+"px";box.style.display=d}return[w,h,xyMax[1],xyMin[0]]}}; | |
45 | +if(typeof(i3GEO)==='undefined'){var i3GEO={}}navm=false;navn=false;chro=navigator.userAgent.toLowerCase().indexOf('chrome')>-1;opera=navigator.userAgent.toLowerCase().indexOf('opera')>-1;if(navigator.appName.substring(0,1)==='N'){navn=true}if(navigator.appName.substring(0,1)==='M'){navm=true}if(opera===true){navn=true}g_operacao="";g_tipoacao="zoomli";$i=function(id){return document.getElementById(id)};Array.prototype.remove=function(s){try{var n=this.length,i;for(i=0;i<n;i++){if(this[i]==s){this.splice(i,1)}}}catch(e){}};i3GEO.util={PINS:[],BOXES:[],escapeURL:function(sUrl){var re;sUrl=escape(sUrl);re=new RegExp("%3F","g");sUrl=sUrl.replace(re,'?');re=new RegExp("%3D","g");sUrl=sUrl.replace(re,'=');re=new RegExp("%26","g");sUrl=sUrl.replace(re,'&');return sUrl},insereCookie:function(nome,valor,expira){if(!expira){expira=10}var exdate=new Date();exdate.setDate(exdate.getDate()+expira);document.cookie=nome+"="+valor+"; expires="+exdate.toUTCString()+";path=/"},pegaCookie:function(nome){var cookies,i,fim;cookies=document.cookie;i=cookies.indexOf(nome);if(i===-1){return null}fim=cookies.indexOf(";",i);if(fim===-1){fim=cookies.length}return(unescape(cookies.substring(i,fim))).split("=")[1]},listaChaves:function(obj){var keys,key="";keys=[];for(key in obj){if(obj[key]){keys.push(key)}}return keys},criaBotaoAplicar:function(nomeFuncao,titulo,classe,obj){try{if(typeof(tempoBotaoAplicar)!=='undefined'){clearTimeout(tempoBotaoAplicar)}}catch(e){}var executar=new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"),novoel,xy;tempoBotaoAplicar=setTimeout(executar,(i3GEO.configura.tempoAplicar));if(arguments.length===1){titulo="Aplicar"}if(arguments.length===1||arguments.length===2){classe="i3geoBotaoAplicar"}if(!document.getElementById("i3geo_aplicar")){novoel=document.createElement("input");novoel.id='i3geo_aplicar';novoel.type='button';novoel.value=titulo;novoel.style.cursor="pointer";novoel.style.fontSize="10px";novoel.style.zIndex=15000;novoel.style.position="absolute";novoel.style.display="none";novoel.onmouseover=function(){this.style.display="block"};novoel.onmouseout=function(){this.style.display="none"};novoel.className=classe;document.body.appendChild(novoel)}else{novoel=document.getElementById("i3geo_aplicar")}novoel.onclick=function(){clearTimeout(i3GEO.parametros.tempo);i3GEO.parametros.tempo="";this.style.display='none';eval(nomeFuncao+"\(\)")};if(arguments.length===4){novoel.style.display="block";xy=YAHOO.util.Dom.getXY(obj);YAHOO.util.Dom.setXY(novoel,xy)}return(novoel)},arvore:function(titulo,onde,obj){var arvore,root,tempNode,d,c,i,linha,conteudo,j,temaNode;if(!$i(onde)){return}arvore=new YAHOO.widget.TreeView(onde);root=arvore.getRoot();try{tempNode=new YAHOO.widget.TextNode('',root,false);tempNode.isLeaf=false;tempNode.enableHighlight=false}catch(e){}titulo="<table><tr><td><b>"+titulo+"</b></td><td></td></tr></table>";d={html:titulo};tempNode=new YAHOO.widget.HTMLNode(d,root,true,true);tempNode.enableHighlight=false;c=obj.propriedades.length;for(i=0,j=c;i<j;i++){linha=obj.propriedades[i];if(linha.url!==""){conteudo="<a href='#' onclick='"+linha.url+"'>"+$trad(linha.text)+"</a>"}else{conteudo=linha.text}d={html:conteudo};temaNode=new YAHOO.widget.HTMLNode(d,tempNode,false,true);temaNode.enableHighlight=false}arvore.collapseAll();arvore.draw()},removeAcentos:function(palavra){var re;re=/á|à|ã|â/gi;palavra=palavra.replace(re,"a");re=/é|ê/gi;palavra=palavra.replace(re,"e");re=/í/gi;palavra=palavra.replace(re,"i");re=/ó|õ|ô/gi;palavra=palavra.replace(re,"o");re=/ç/gi;palavra=palavra.replace(re,"c");re=/ú/gi;palavra=palavra.replace(re,"u");return(palavra)},protocolo:function(){var u=window.location.href;u=u.split(":");return(u[0])},pegaPosicaoObjeto:function(obj){if(obj){if(!obj.style){return[0,0]}var curleft=0,curtop=0;if(obj){if(obj.offsetParent){do{curleft+=obj.offsetLeft-obj.scrollLeft;curtop+=obj.offsetTop-obj.scrollTop;obj=obj.offsetParent}while(obj)}}return[curleft+document.body.scrollLeft,curtop+document.body.scrollTop]}else{return[0,0]}},pegaElementoPai:function(e){var targ=document;if(!e){e=window.event}if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ.nodeType===3){targ=targ.parentNode}if(targ.parentNode){tparent=targ.parentNode;return(tparent)}else{return targ}},mudaCursor:function(cursores,tipo,idobjeto,locaplic){var os=[],o,i,c="",n,cursor="",ext=".ff";try{if(navm){ext=".ie"}os.push(document.getElementById(idobjeto));if(i3GEO.Interface.ATUAL==="openlayers"){os=YAHOO.util.Dom.getElementsByClassName('olTileImage','img')}if(i3GEO.Interface.ATUAL==="googlemaps"){os=document.getElementById(idobjeto).firstChild;os=os.getElementsByTagName("div")}n=os.length;if(tipo==="default"||tipo==="pointer"||tipo==="crosshair"||tipo==="help"||tipo==="move"||tipo==="text"){cursor=tipo}else{c=eval("cursores."+tipo+ext)}if(c==="default"||c==="pointer"||c==="crosshair"||c==="help"||c==="move"||c==="text"){cursor=c}if(cursor===""){cursor="URL(\""+locaplic+eval("cursores."+tipo+ext)+"\"),auto"}for(i=0;i<n;i++){o=os[i];if(o){o.style.cursor=cursor}}}catch(e){}},criaBox:function(id){if(arguments.length===0){id="boxg"}if(!$i(id)){var novoel=document.createElement("div");novoel.id=id;novoel.style.zIndex=1;novoel.innerHTML='<font face="Arial" size=0></font>';document.body.appendChild(novoel);novoel.onmouseover=function(){novoel.style.display='none'};novoel.onmouseout=function(){novoel.style.display='block'};i3GEO.util.BOXES.push(id)}else{$i(id).style.display="block"}},escondeBox:function(){var l,i;l=i3GEO.util.BOXES.length;for(i=0;i<l;i++){if($i(i3GEO.util.BOXES[i])){$i(i3GEO.util.BOXES[i]).style.display="none"}}},criaPin:function(id,imagem,w,h,mouseover){if(arguments.length<1||id===""){id="boxpin"}if(arguments.length<2||imagem===""){imagem=i3GEO.configura.locaplic+'/imagens/marker.png'}if(arguments.length<3||w===""){w=21}if(arguments.length<4||h===""){h=25}if(!$i(id)){var novoel=document.createElement("img");novoel.id=id;novoel.style.zIndex=10000;novoel.style.position="absolute";novoel.style.width=parseInt(w,10)+"px";novoel.style.height=parseInt(h,10)+"px";novoel.style.top="0px";novoel.style.left="0px";novoel.src=imagem;if(id==="boxpin"){novoel.onmouseover=function(){$i("boxpin").style.display="none"}}else if(mouseover){novoel.onmouseover=mouseover}document.body.appendChild(novoel);i3GEO.util.PINS.push(id)}$i(id).style.display="block"},posicionaImagemNoMapa:function(id,x,y){var i,mx,my;if(x&&x!=""){objposicaocursor.telax=x}if(y&&y!=""){objposicaocursor.telay=y}i=$i(id);mx=parseInt(i.style.width,10)/2;my=parseInt(i.style.height,10)/2;i.style.position="absolute";i.style.top=objposicaocursor.telay-my+"px";i.style.left=objposicaocursor.telax-mx+"px";return[objposicaocursor.telay-my,objposicaocursor.telax-mx]},escondePin:function(){var l,i;l=i3GEO.util.PINS.length;for(i=0;i<l;i++){if($i(i3GEO.util.PINS[i])){$i(i3GEO.util.PINS[i]).style.display="none"}}},$im:function(g){return i3GEO.configura.locaplic+"/imagens/visual/default/"+g},$inputText:function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}if(idPai!==""){if(larguraIdPai!==""){$i(idPai).style.width=larguraIdPai+"px"}$i(idPai).style.padding="3";$i(idPai).style.textAlign="center"}if(!onch){onch=""}return"<input onchange=\""+onch+"\" tabindex='0' onmouseover='javascript:this.className=\"digitarOver\";' onmouseout='javascript:this.className=\"digitar\";' onclick='javascript:this.select();this.className=\"digitarMouseclick\";' id='"+idInput+"' title='"+titulo+"' type='text' size='"+digitos+"' class='digitar' value='"+valor+"' name='"+nome+"' />"},$inputTextMudaCor:function(obj){var n=obj.value.split(" ");obj.style.color="rgb("+n[0]+","+n[1]+","+n[2]+")"},$top:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelTop){document.getElementById(id).style.pixelTop=valor}else{document.getElementById(id).style.top=valor+"px"}}},$left:function(id,valor){if(document.getElementById(id).style){if(document.getElementById(id).style.pixelLeft){document.getElementById(id).style.pixelLeft=valor}else{document.getElementById(id).style.left=valor+"px"}}},insereMarca:{CONTAINER:[],cria:function(xi,yi,funcaoOnclick,container,texto,srci){if(!srci||srci===""){srci=i3GEO.configura.locaplic+"/imagens/dot2.gif"}if(i3GEO.Interface.ATUAL==="googleearth"){i3GEO.Interface.googleearth.insereMarca(texto,xi,yi,container);return}try{var novoel,i,novoimg,temp;if(i3GEO.util.insereMarca.CONTAINER.toString().search(container)<0){i3GEO.util.insereMarca.CONTAINER.push(container)}if(!$i(container)){novoel=document.createElement("div");novoel.id=container;i=novoel.style;i.position="absolute";if($i(i3GEO.Interface.IDCORPO)){i.top=parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDCORPO).style.left,10)+"px"}else{i.top=parseInt($i(i3GEO.Interface.IDMAPA).style.top,10)+"px";i.left=parseInt($i(i3GEO.Interface.IDMAPA).style.left,10)+"px"}document.body.appendChild(novoel)}container=$i(container);novoel=document.createElement("div");i=novoel.style;i.position="absolute";i.zIndex=2000;i.top=(yi-2)+"px";i.left=(xi-2)+"px";i.width="5px";i.height="5px";novoimg=document.createElement("img");if(funcaoOnclick!==""){novoimg.onclick=funcaoOnclick}else{novoimg.onclick=function(){i3GEO.util.insereMarca.limpa()}}novoimg.src=srci;temp=novoimg.style;temp.width="5px";temp.height="5px";temp.zIndex=2000;novoel.appendChild(novoimg);container.appendChild(novoel);if(i3GEO.eventos.NAVEGAMAPA.toString().search("i3GEO.util.insereMarca.limpa()")<0){i3GEO.eventos.NAVEGAMAPA.push("i3GEO.util.insereMarca.limpa()")}}catch(e){alert("Ocorreu um erro. inseremarca"+e)}},limpa:function(){try{var n,i;n=i3GEO.util.insereMarca.CONTAINER.length;for(i=0;i<n;i++){if($i(i3GEO.util.insereMarca.CONTAINER[i])){$i(i3GEO.util.insereMarca.CONTAINER[i]).innerHTML=""}}i3GEO.util.insereMarca.CONTAINER=[];i3GEO.eventos.NAVEGAMAPA.remove("i3GEO.util.insereMarca.limpa()")}catch(e){}}},adicionaSHP:function(path){var temp=path.split(".");if((temp[1]==="SHP")||(temp[1]==="shp")){i3GEO.php.adicionaTemaSHP(i3GEO.atualiza,path)}else{i3GEO.php.adicionaTemaIMG(i3GEO.atualiza,path)}},abreCor:function(janelaid,elemento,tipo){if(!i3GEO.configura){i3GEO.configura={locaplic:"../"}}if(arguments.length===2){tipo="rgb"}var janela,ins,novoel,wdocaiframe,wsrc=i3GEO.configura.locaplic+"/ferramentas/colorpicker/index.htm?doc="+janelaid+"&elemento="+elemento+"&tipo="+tipo,texto="Cor",id="i3geo_janelaCor",classe="hd";if($i(id)){YAHOO.i3GEO.janela.manager.find(id).show();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCor_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCor_corpo" class="bd" style="padding:5px">';if(wsrc!==""){ins+='<iframe name="'+id+'i" id="i3geo_janelaCori" valign="top" style="height:230px,border:0px white solid"></iframe>'}ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCor";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCori");if(wdocaiframe){wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="230px";wdocaiframe.style.width="325px";wdocaiframe.style.border="0px solid white"}janela=new YAHOO.widget.ResizePanel(id,{height:"290px",modal:false,width:"350px",fixedcenter:true,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},ajaxhttp:function(){var objhttp1;try{objhttp1=new XMLHttpRequest()}catch(ee){try{objhttp1=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{objhttp1=new ActiveXObject("Microsoft.XMLHTTP")}catch(E){objhttp1=false}}}return(objhttp1)},ajaxexecASXml:function(programa,funcao){var h,ohttp;if(programa.search("http")===0){h=window.location.host;if(programa.search(h)<0){alert("OOps! Nao e possivel chamar um XML de outro host.\nContacte o administrador do sistema.\nConfigure corretamente o ms_configura.php");return}}ohttp=i3GEO.util.ajaxhttp();ohttp.open("GET",programa,true);ohttp.onreadystatechange=function(){var retorno,parser,dom;if(ohttp.readyState===4){retorno=ohttp.responseText;if(retorno!==undefined){if(document.implementation.createDocument){parser=new DOMParser();dom=parser.parseFromString(retorno,"text/xml")}else{dom=new ActiveXObject("Microsoft.XMLDOM");dom.async="false";dom.load(programa)}}else{return"erro"}if(funcao!=="volta"){eval(funcao+'(dom)')}else{return dom}}};ohttp.send(null)},aparece:function(id,tempo,intervalo){var n,obj,opacidade,fadei=0,tempoFadei=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="block";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=0;if(navm){obj.style.filter='alpha(opacity=0)'}else{obj.style.opacity=0}obj.style.display="block";fadei=function(){opacidade+=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade<100){tempoFadei=setTimeout(fadei,tempo)}else{if(tempoFadei){clearTimeout(tempoFadei)}if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}}};tempoFadei=setTimeout(fadei,tempo)},desaparece:function(id,tempo,intervalo,removeobj){var n,obj,opacidade,fade=0,p,tempoFade=null;n=parseInt(tempo/intervalo,10);obj=$i(id);if(n===1){obj.style.display="none";if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}return}tempo=n*intervalo;intervalo=(intervalo*100)/tempo;opacidade=100;if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}obj.style.display="block";fade=function(){opacidade-=intervalo;if(navm){obj.style.filter='alpha(opacity='+opacidade+')'}else{obj.style.opacity=opacidade/100}if(opacidade>0){tempoFade=setTimeout(fade,tempo)}else{if(tempoFade){clearTimeout(tempoFade)}obj.style.display="none";if(navm){obj.style.filter='alpha(opacity=100)'}else{obj.style.opacity=1}if(removeobj){p=obj.parentNode;if(p){p.removeChild(obj)}}}};tempoFade=setTimeout(fade,tempo)},wkt2ext:function(wkt,tipo){var re,x,y,w,xMin,xMax,yMin,yMax,temp;tipo=tipo.toLowerCase();ext=false;if(tipo==="polygon"){try{re=new RegExp("POLYGON","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[2].split(")")[0];wkt=wkt.split(",");x=[];y=[];for(w=0;w<wkt.length;w++){temp=wkt[w].split(" ");x.push(temp[0]);y.push(temp[1])}x.sort(i3GEO.util.sortNumber);xMin=x[0];xMax=x[(x.length)-1];y.sort(i3GEO.util.sortNumber);yMin=y[0];yMax=y[(y.length)-1];return xMin+" "+yMin+" "+xMax+" "+yMax}catch(e){}}if(tipo==="point"){try{re=new RegExp("POINT","g");wkt=wkt.replace(re,"");wkt=wkt.split("(")[1].split(")")[0];wkt=wkt.split(" ");return(wkt[0]*1-0.01)+" "+(wkt[1]*1-0.01)+" "+(wkt[0]*1+0.01)+" "+(wkt[1]*1+0.01)}catch(e){}}return ext},sortNumber:function(a,b){return a-b},getScrollerWidth:function(){var scr=null,inn=null,wNoScroll=0,wScroll=0;scr=document.createElement('div');scr.style.position='absolute';scr.style.top='-1000px';scr.style.left='-1000px';scr.style.width='100px';scr.style.height='50px';scr.style.overflow='hidden';inn=document.createElement('div');inn.style.width='100%';inn.style.height='200px';scr.appendChild(inn);document.body.appendChild(scr);wNoScroll=inn.offsetWidth;scr.style.overflow='auto';wScroll=inn.offsetWidth;document.body.removeChild(document.body.lastChild);return(wNoScroll-wScroll)},scriptTag:function(js,ini,id,aguarde){if(!aguarde){aguarde=false}var head,script,tipojanela=i3GEO.janela.ESTILOAGUARDE;if(!$i(id)||id===""){if(i3GEO.janela&&aguarde===true){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS")}head=document.getElementsByTagName('head')[0];script=document.createElement('script');script.type='text/javascript';if(ini!==""){if(navm){script.onreadystatechange=function(){if(this.readyState==='loaded'||this.readyState==='complete'){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}}else{script.onload=function(){if(i3GEO.janela){i3GEO.janela.fechaAguarde(id+"aguarde")}eval(ini)}}i3GEO.janela.ESTILOAGUARDE=tipojanela}script.src=js;if(id!==""){script.id=id}head.appendChild(script)}else{if(ini!==""){eval(ini)}}},removeScriptTag:function(id){try{old=$i("loadscriptI3GEO");if(old!==null){old.parentNode.removeChild(old);old=null;eval(id+" = null;")}old=$i(id);if(old!==null){old.parentNode.removeChild(old)}}catch(erro){}},verificaScriptTag:function(texto){var s=document.getElementsByTagName("script"),n=s.length,i,t;for(i=0;i<n;i++){t=s[i].id;t=t.split(".");if(t[0]===texto){return true}}return false},mensagemAjuda:function(onde,texto){var ins="<table style='width:100%;padding:2;vertical-align:top;background-color:#ffffff;' ><tr><th style='background-color: #cedff2; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border: 1px solid #B1CDEB; text-align: left; padding-left: 7px;padding-right: 11px;'>";ins+='<div style="float:right"><img src="'+i3GEO.configura.locaplic+'/imagens/question.gif" /></div>';ins+='<div style="text-align:left;">';if(texto===""){texto=$i(onde).innerHTML}ins+=texto;ins+='</div></th></tr></table>';if(onde!==""){$i(onde).innerHTML=ins}else{return(ins)}},randomRGB:function(){var v=Math.random(),r=parseInt(255*v,10),g;v=Math.random();g=parseInt(255*v,10);v=Math.random();b=parseInt(255*v,10);return(r+","+g+","+b)},rgb2hex:function(str){var re=new RegExp(" ","g"),rgb=str.replace(re,',');return YAHOO.util.Dom.Color.toHex("rgb("+rgb+")")},comboTemas:function(id,funcao,onde,nome,multiplo,tipoCombo){if(arguments.length>2){i3GEO.util.defineValor(onde,"innerHTML","<span style=color:red;font-size:10px; >buscando temas...</span>")}if(arguments.length===3){nome=""}if(arguments.length<5){multiplo=false}var monta,temp,temp1,temp2;monta=function(retorno){var i,comboTemas,n,nome="";if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){if(multiplo){comboTemas="<select style='font-size:12px;' id='"+id+"' size='4' multiple='multiple' name='"+nome+"'>"}else{comboTemas="<select style='font-size:12px;' id='"+id+"' name='"+nome+"'>"}comboTemas+="<option value=''>----</option>";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}if(retorno[i].escondido!=="sim"){comboTemas+="<option value="+tema+" >"+nome+"</option>"}}comboTemas+="</select>";temp={dados:comboTemas,tipo:"dados"}}else{if(tipoCombo==="poligonosSelecionados"||tipoCombo==="selecionados"||tipoCombo==="pontosSelecionados"){temp={dados:'<div class=alerta >Nenhum tema encontrado. <span style=cursor:pointer;color:blue onclick="i3GEO.mapa.dialogo.selecao()" > Selecionar...</span></div>',tipo:"mensagem"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado. </div>',tipo:"mensagem"}}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")};if(tipoCombo==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="ligadosComTabela"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"menor",temp);temp2=i3GEO.arvoreDeCamadas.filtraCamadas("type",8,"igual",temp);monta(temp1.concat(temp2))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="editaveis"){i3GEO.php.listaTemasEditaveis(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}if(tipoCombo==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoCombo==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo==="poligonosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="naolinearSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",1,"diferente",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoCombo==="linhaDoTempo"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("linhadotempo","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}if(tipoCombo===""){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type","","diferente",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},checkTemas:function(id,funcao,onde,nome,tipoLista,prefixo,size){if(arguments.length>2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando temas...</span>"}if(arguments.length===3){nome=""}var monta,temp,temp1,n,i;monta=function(retorno){try{var i,comboTemas,n,nome;if(retorno!==undefined){if(retorno.data){retorno=retorno.data}n=retorno.length;if(n>0){comboTemas="<table class=lista3 >";for(i=0;i<n;i++){if(retorno[i].nome){nome=retorno[i].nome;tema=retorno[i].tema}else{nome=retorno[i].tema;tema=retorno[i].name}comboTemas+="<tr><td><input size=2 style='cursor:pointer' type=checkbox name='"+tema+"' /></td>";comboTemas+="<td> <input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+tema+"' type=text size='"+size+"' value='"+nome+"' /></td></tr>"}comboTemas+="</table>";temp={dados:comboTemas,tipo:"dados"}}else{temp={dados:'<div class=alerta >Nenhum tema encontrado.</div>',tipo:"mensagem"}}}else{temp={dados:"<p style=color:red >Ocorreu um erro<br>",tipo:"erro"}}eval("funcao(temp);")}catch(e){}};if(tipoLista==="ligados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("status",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemas(monta,"ligados",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="selecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listaTemasComSel(monta,i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="raster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{i3GEO.php.listatemasTipo(monta,"raster",i3GEO.configura.locaplic,i3GEO.configura.sid)}}if(tipoLista==="polraster"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",3,"igual",i3GEO.arvoreDeCamadas.CAMADAS);temp1=i3GEO.arvoreDeCamadas.filtraCamadas("type",2,"igual",i3GEO.arvoreDeCamadas.CAMADAS);n=temp1.length;for(i=0;i<n;i++){temp.push(temp1[i])}monta(temp)}else{alert($trad("x13"))}}if(tipoLista==="pontosSelecionados"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){temp=i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS);monta(i3GEO.arvoreDeCamadas.filtraCamadas("sel","sim","igual",temp))}else{alert($trad("x13"))}}if(tipoLista==="pontos"){if(i3GEO.arvoreDeCamadas.CAMADAS!==""){monta(i3GEO.arvoreDeCamadas.filtraCamadas("type",0,"igual",i3GEO.arvoreDeCamadas.CAMADAS))}else{alert($trad("x13"))}}},comboItens:function(id,tema,funcao,onde,nome){if(arguments.length>3){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}if(arguments.length!==5){nome=""}var monta=function(retorno){var ins,temp,i;if(retorno.data!==undefined){ins=[];ins.push("<select id='"+id+"' name='"+nome+"'>");ins.push("<option value='' >---</option>");temp=retorno.data.valores.length;for(i=0;i<temp;i++){if(retorno.data.valores[i].tema===tema){ins.push("<option value='"+retorno.data.valores[i].item+"' >"+retorno.data.valores[i].item+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}eval("funcao(temp)")};i3GEO.php.listaItensTema(monta,tema)},comboValoresItem:function(id,tema,itemTema,funcao,onde){if(arguments.length===5){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando valores...</span>"}var monta=function(retorno){var ins=[],i,pares,j,temp;if(retorno.data!==undefined){ins.push("<select id="+id+" >");ins.push("<option value='' >---</option>");for(i=0;i<retorno.data[1].registros.length;i++){pares=retorno.data[1].registros[i].valores;for(j=0;j<pares.length;j++){ins.push("<option value='"+pares[j].valor+"' >"+pares[j].valor+"</option>")}}ins.push("</select>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaValoresItensTema(monta,tema,itemTema)},comboFontes:function(id,onde){$i(onde).innerHTML="<span style=color:red >buscando fontes...</span>";var monta=function(retorno){var ins="",temp,i,dados;if(retorno.data!==undefined){ins+="<select id='"+id+"'>";ins+="<option value='bitmap' >bitmap</option>";dados=retorno.data.split(",");temp=dados.length;for(i=0;i<temp;i++){ins+="<option value='"+dados[i]+"' >"+dados[i]+"</option>"}ins+="</select>"}$i(onde).innerHTML=ins};i3GEO.php.listaFontesTexto(monta)},comboSimNao:function(id,selecionado){var combo="<select name="+id+" id="+id+" >";combo+="<option value='' >---</option>";if(selecionado.toLowerCase()==="sim"){combo+="<option value=TRUE selected >"+$trad("x14")+"</option>"}else{combo+="<option value=TRUE >"+$trad("x14")+"</option>"}if(selecionado==="nao"){combo+="<option value=FALSE selected >"+$trad("x15")+"</option>"}else{combo+="<option value=FALSE >"+$trad("x15")+"</option>"}combo+="</select>";return(combo)},checkItensEditaveis:function(tema,funcao,onde,size,prefixo){if(onde!==""){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando itens...</span>"}var monta=function(retorno){var ins=[],i,temp,n;if(retorno.data!==undefined){ins.push("<table class=lista3 >");n=retorno.data.valores.length;for(i=0;i<n;i++){ins.push("<tr><td><input size=2 style='cursor:pointer' name='"+retorno.data.valores[i].tema+"' type=checkbox id='"+prefixo+retorno.data.valores[i].item+"' /></td>");ins.push("<td><input style='text-align:left; cursor:text;' onclick='javascript:this.select();' id='"+prefixo+retorno.data.valores[i].item+retorno.data.valores[i].tema+"' type=text size='"+size+"' value='"+retorno.data.valores[i].item+"' /></td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</div>',tipo:"erro"}}funcao.apply(funcao,temp)};i3GEO.php.listaItensTema(monta,tema)},radioEpsg:function(funcao,onde,prefixo){if(arguments.length===2){$i(onde).innerHTML="<span style=color:red;font-size:10px; >buscando...</span>"}var monta=function(retorno){var ins=[],i,n,temp;if(retorno.data!==undefined){ins.push("<table class=lista2 >");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio checked value='' /></td>");ins.push("<td>"+retorno.data[0].nome+"</td></tr>");ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='' /></td>");ins.push("<td>"+retorno.data[1].nome+"</td></tr>");n=retorno.data.length;for(i=2;i<n;i++){ins.push("<tr><td><input size=2 style='border:0px solid white;cursor:pointer' name='"+prefixo+"EPSG' type=radio value='"+retorno.data[i].codigo+"' /></td>");ins.push("<td>"+retorno.data[i].nome+"</td></tr>")}ins.push("</table>");ins=ins.join('');temp={dados:ins,tipo:"dados"}}else{temp={dados:'<div class=erro >Ocorreu um erro</erro>',tipo:"erro"}}funcao(temp)};i3GEO.php.listaEpsg(monta)},proximoAnterior:function(anterior,proxima,texto,idatual,container){var temp=$i(idatual),ndiv=document.createElement("div"),nids,i,fundo;if(temp){$i(container).removeChild(temp)}if(!document.getElementById(idatual)){fundo=$i(container).style.backgroundColor;ndiv.id=idatual;texto+="<br><br><table style='width:100%;background-color:"+fundo+";' ><tr style='width:100%'>";if(anterior!==""){texto+="<td style='border:0px solid white;text-align:left;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"anterior_' onclick='"+anterior+"' type='button' value=' ' /></td>"}if(proxima!==""){texto+="<td style='border:0px solid white;text-align:right;cursor:pointer;background-color:"+fundo+";'><input id='"+idatual+"proxima_' onclick='"+proxima+"' type='button' value=' ' /></td>"}ndiv.innerHTML=texto+"</tr></table>";$i(container).appendChild(ndiv);new YAHOO.widget.Button(idatual+"anterior_",{onclick:{fn:function(){eval(anterior+"()")},lazyloadmenu:true}});new YAHOO.widget.Button(idatual+"proxima_",{onclick:{fn:function(){eval(proxima+"()")},lazyloadmenu:true}});i=$i(idatual+"proxima_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_avanca.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}i=$i(idatual+"anterior_-button");if(i){i.style.backgroundImage="url('"+i3GEO.configura.locaplic+"/imagens/player_volta.png')";i.style.backgroundRepeat="no-repeat";i.style.backgroundPosition="center center"}}temp=$i(container).getElementsByTagName("div");nids=temp.length;for(i=0;i<nids;i++){temp[i].style.display="none"}$i(idatual).style.display="block"},dialogoFerramenta:function(mensagem,dir,nome){var js=i3GEO.configura.locaplic+"/ferramentas/"+dir+"/index.js";if(!$i("i3GEOF."+nome+"_script")){i3GEO.janela.ESTILOAGUARDE="reduzida";i3GEO.util.multiStep([i3GEO.janela.abreAguarde,i3GEO.util.scriptTag],[["i3GEOF."+nome+"_script"+"aguarde","Carregando JS"],[js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script"]],function(){})}else{i3GEO.util.scriptTag(js,"i3GEOF."+nome+".criaJanelaFlutuante()","i3GEOF."+nome+"_script")}},intersectaBox:function(box1,box2){box1=box1.split(" ");box2=box2.split(" ");var box1i=box2,box2i=box1,coordx,coordy;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}box1=box1i;box2=box2i;coordx=box1[0]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true;coordx=box1[0]*1;coordy=box1[3]*1}if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[3]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}coordx=box1[2]*1;coordy=box1[1]*1;if(coordx>=box2[0]*1&&coordx<=box2[2]*1&&coordy>=box2[1]*1&&coordy<=box2[3]*1){return true}return false},abreColourRamp:function(janelaid,elemento,ncores){var janela,ins,novoel,wdocaiframe,fix=false,wsrc=i3GEO.configura.locaplic+"/ferramentas/colourramp/index.php?ncores="+ncores+"&doc="+janelaid+"&elemento="+elemento,nx="",texto="Cor",id="i3geo_janelaCorRamp",classe="hd";if($i(id)){janela=YAHOO.i3GEO.janela.manager.find(id);janela.show();janela.bringToTop();return}ins='<div id="'+id+'_cabecalho" class="hd">';ins+="<span><img id='i3geo_janelaCorRamp_imagemCabecalho' style='visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' /></span>";ins+=texto;ins+='</div><div id="i3geo_janelaCorRamp_corpo" class="bd" style="padding:5px">';ins+='<iframe name="'+id+'i" id="i3geo_janelaCorRampi" valign="top" ></iframe>';ins+='</div>';novoel=document.createElement("div");novoel.id="i3geo_janelaCorRamp";novoel.style.display="block";novoel.innerHTML=ins;if($i("i3geo")){$i("i3geo").appendChild(novoel)}else{document.body.appendChild(novoel)}wdocaiframe=$i("i3geo_janelaCorRampi");wdocaiframe.style.display="block";wdocaiframe.src=wsrc;wdocaiframe.style.height="430px";wdocaiframe.style.width="340px";wdocaiframe.style.border="0px solid white";if(nx===""||nx==="center"){fix=true}janela=new YAHOO.widget.ResizePanel(id,{height:"480px",modal:false,width:"380px",fixedcenter:fix,constraintoviewport:false,visible:true,iframe:false});YAHOO.i3GEO.janela.manager.register(janela);janela.render();$i(id+'_cabecalho').className=classe},localizai3GEO:function(){var scriptLocation="",scripts=document.getElementsByTagName('script'),i=0,index,ns=scripts.length,src;for(i=0;i<ns;i++){src=scripts[i].getAttribute('src');if(src){index=src.lastIndexOf("/classesjs/i3geo.js");if((index>-1)&&(index+"/classesjs/i3geo.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geo.js".length);break}index=src.lastIndexOf("/classesjs/i3geonaocompacto.js");if((index>-1)&&(index+"/classesjs/i3geonaocompacto.js".length===src.length)){scriptLocation=src.slice(0,-"/classesjs/i3geonaocompacto.js".length);break}}}if(i3GEO.configura){i3GEO.configura.locaplic=scriptLocation}return scriptLocation},removeChild:function(id,el){var j=$i(id);if(j){if(!el){el=j.parentNode}el.removeChild(j)}},defineValor:function(id,prop,valor){try{eval("$i('"+id+"')."+prop+"='"+valor+"';")}catch(e){}},in_array:function(x,matriz){var txt=" "+matriz.join(" ")+" ";var er=new RegExp(" "+x+" ","gim");return((txt.match(er))?true:false)},timedProcessArray:function(items,process,callback){var todo=items.concat();setTimeout(function(){var start=+new Date();do{process(todo.shift())}while(todo.length>0&&(+new date()-start<50));if(todo.length>0){setTimeout(arguments.callee,25)}else{callback(items)}},25)},multiStep:function(steps,args,callback){var tasks=steps.concat();setTimeout(function(){var task=tasks.shift(),a=args.shift();task.apply(null,a||[]);if(tasks.length>0){setTimeout(arguments.callee,25)}else{callback()}},25)},tamanhoBrowser:function(){var viewportwidth,viewportheight;if(typeof window.innerWidth!='undefined'){viewportwidth=window.innerWidth,viewportheight=window.innerHeight}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){viewportwidth=document.documentElement.clientWidth,viewportheight=document.documentElement.clientHeight}else{viewportwidth=document.getElementsByTagName('body')[0].clientWidth,viewportheight=document.getElementsByTagName('body')[0].clientHeight}viewportwidth=viewportwidth-i3GEO.util.getScrollerWidth();return[viewportwidth,viewportheight]},detectaTablet:function(){var p,c=DetectaMobile("DetectMobileLong");if(c===false){return false}p=confirm("Direciona para a versao adaptada para tablets?");if(p){window.location=i3GEO.configura.locaplic+'/interface/'+i3GEO.Interface.ALTTABLET+'?'+i3GEO.configura.sid;return true}},calculaDPI:function(){var novoel=document.createElement("div"),valor=72;novoel.style.height="1in";novoel.style.left="-100%";novoel.style.position="absolute";novoel.style.top="-100%";novoel.style.width="1in";document.body.appendChild(novoel);if(novoel.offsetHeight){valor=novoel.offsetHeight}document.body.removeChild(novoel);return valor},ajustaDocType:function(){try{if(document.implementation.createDocumentType){var newDoctype=document.implementation.createDocumentType('html','-//W3C//DTD XHTML 1.0 Transitional//EN','http://www.w3.org/TR/html4/loose.dtd');if(document.doctype){document.doctype.parentNode.replaceChild(newDoctype,document.doctype)}}}catch(e){}},versaoNavegador:function(){if(navm&&navigator.userAgent.toLowerCase().indexOf('msie 8.')>-1){return"IE8"}if(navn&&navigator.userAgent.toLowerCase().indexOf('3.')>-1){return"FF3"}return""},decimalPlaces:function(float,length){var ret="",str=float.toString(),array=str.split("."),i;if(array.length==2){ret+=array[0]+".";for(i=0;i<length;i++){if(i>=array[1].length)ret+='0';else ret+=array[1][i]}}else if(array.length==1){ret+=array[0]+".";for(i=0;i<length;i++){ret+='0'}}return ret}};try{YAHOO.namespace("lutsr");YAHOO.lutsr.accordion={properties:{animation:true,animationDuration:10,multipleOpen:false,Id:"sanfona",altura:200,ativa:0},init:function(animation,animationDuration,multipleOpen,Id,altura,ativa){if(animation){this.properties.animation=animation}if(animationDuration){this.properties.animationDuration=animationDuration}if(multipleOpen){this.properties.multipleOpen=multipleOpen}if(Id){this.properties.Id=Id}if(altura){this.properties.altura=altura}if(ativa){this.properties.ativa=ativa}var accordionObject=document.getElementById(this.properties.Id),headers;if(accordionObject){if(accordionObject.nodeName==="DL"){headers=accordionObject.getElementsByTagName("dt");this.attachEvents(headers,0)}}},attachEvents:function(headers,nr){var i,headerProperties,parentObj,header;for(i=0;i<headers.length;i++){headerProperties={objRef:headers[i],nr:i,jsObj:this};YAHOO.util.Event.addListener(headers[i],"click",this.clickHeader,headerProperties)}parentObj=headers[this.properties.ativa].parentNode;headers=parentObj.getElementsByTagName("dd");header=headers[this.properties.ativa];this.expand(header)},clickHeader:function(e,headerProperties){var parentObj=headerProperties.objRef.parentNode,headers=parentObj.getElementsByTagName("dd"),header=headers[headerProperties.nr],i;if(YAHOO.util.Dom.hasClass(header,"open")){headerProperties.jsObj.collapse(header)}else{if(headerProperties.jsObj.properties.multipleOpen){headerProperties.jsObj.expand(header)}else{for(i=0;i<headers.length;i++){if(YAHOO.util.Dom.hasClass(headers[i],"open")){headerProperties.jsObj.collapse(headers[i])}}headerProperties.jsObj.expand(header)}}},collapse:function(header){YAHOO.util.Dom.removeClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.removeClass(header,"open")}else{this.initAnimation(header,"close")}},expand:function(header){YAHOO.util.Dom.addClass(YAHOO.util.Dom.getPreviousSibling(header),"selected");if(!this.properties.animation){YAHOO.util.Dom.addClass(header,"open")}else{this.initAnimation(header,"open")}},initAnimation:function(header,dir){var attributes,animation,animationEnd;if(dir==="open"){YAHOO.util.Dom.setStyle(header,"visibility","hidden");YAHOO.util.Dom.setStyle(header,"height",this.properties.altura);YAHOO.util.Dom.addClass(header,"open");attributes={height:{from:0,to:this.properties.altura}};YAHOO.util.Dom.setStyle(header,"height",0);YAHOO.util.Dom.setStyle(header,"visibility","visible");animation=new YAHOO.util.Anim(header,attributes);animationEnd=function(){header.style.height=this.properties.altura+"px"};animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}else if("close"){attributes={height:{to:0}};animationEnd=function(){YAHOO.util.Dom.removeClass(header,"open")};animation=new YAHOO.util.Anim(header,attributes);animation.duration=this.properties.animationDuration;animation.useSeconds=false;animation.onComplete.subscribe(animationEnd);animation.animate()}}}}catch(e){}$im=function(g){return i3GEO.util.$im(g)};$inputText=function(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch){if(arguments.length===6){nome=""}return i3GEO.util.$inputText(idPai,larguraIdPai,idInput,titulo,digitos,valor,nome,onch)};$top=function(id,valor){i3GEO.util.$top(id,valor)};$left=function(id,valor){i3GEO.util.$left(id,valor)}; | |
46 | 46 | /* |
47 | 47 | OpenLayers.js -- OpenLayers Map Viewer Library |
48 | 48 | Copyright 2005-2011 OpenLayers Contributors, released under the FreeBSD |
... | ... | @@ -3012,12 +3012,12 @@ if(data&&data.nodeType==9){data=data.documentElement;} |
3012 | 3012 | var capabilities={};this.readNode(data,capabilities);capabilities.version=this.version;return capabilities;},readers:{"wmts":{"Capabilities":function(node,obj){this.readChildNodes(node,obj);},"Contents":function(node,obj){obj.contents={};obj.contents.layers=[];obj.contents.tileMatrixSets={};this.readChildNodes(node,obj.contents);},"Layer":function(node,obj){var layer={styles:[],formats:[],tileMatrixSetLinks:[]};layer.layers=[];this.readChildNodes(node,layer);obj.layers.push(layer);},"Style":function(node,obj){var style={};style.isDefault=(node.getAttribute("isDefault")==="true");this.readChildNodes(node,style);obj.styles.push(style);},"Format":function(node,obj){obj.formats.push(this.getChildValue(node));},"TileMatrixSetLink":function(node,obj){var tileMatrixSetLink={};this.readChildNodes(node,tileMatrixSetLink);obj.tileMatrixSetLinks.push(tileMatrixSetLink);},"TileMatrixSet":function(node,obj){if(obj.layers){var tileMatrixSet={matrixIds:[]};this.readChildNodes(node,tileMatrixSet);obj.tileMatrixSets[tileMatrixSet.identifier]=tileMatrixSet;}else{obj.tileMatrixSet=this.getChildValue(node);}},"TileMatrix":function(node,obj){var tileMatrix={supportedCRS:obj.supportedCRS};this.readChildNodes(node,tileMatrix);obj.matrixIds.push(tileMatrix);},"ScaleDenominator":function(node,obj){obj.scaleDenominator=parseFloat(this.getChildValue(node));},"TopLeftCorner":function(node,obj){var topLeftCorner=this.getChildValue(node);var coords=topLeftCorner.split(" ");var yx;if(obj.supportedCRS){var crs=obj.supportedCRS.replace(/urn:ogc:def:crs:(\w+):.+:(\w+)$/,"urn:ogc:def:crs:$1::$2");yx=!!this.yx[crs];} |
3013 | 3013 | if(yx){obj.topLeftCorner=new OpenLayers.LonLat(coords[1],coords[0]);}else{obj.topLeftCorner=new OpenLayers.LonLat(coords[0],coords[1]);}},"TileWidth":function(node,obj){obj.tileWidth=parseInt(this.getChildValue(node));},"TileHeight":function(node,obj){obj.tileHeight=parseInt(this.getChildValue(node));},"MatrixWidth":function(node,obj){obj.matrixWidth=parseInt(this.getChildValue(node));},"MatrixHeight":function(node,obj){obj.matrixHeight=parseInt(this.getChildValue(node));},"ResourceURL":function(node,obj){obj.resourceUrl=obj.resourceUrl||{};obj.resourceUrl[node.getAttribute("resourceType")]={format:node.getAttribute("format"),template:node.getAttribute("template")};},"WSDL":function(node,obj){obj.wsdl={};obj.wsdl.href=node.getAttribute("xlink:href");},"ServiceMetadataURL":function(node,obj){obj.serviceMetadataUrl={};obj.serviceMetadataUrl.href=node.getAttribute("xlink:href");}},"ows":OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]},CLASS_NAME:"OpenLayers.Format.WMTSCapabilities.v1_0_0"}); |
3014 | 3014 | /*çjslint white:false,undef: false, rhino: true, onevar: true, evil: false */ |
3015 | -var $i = function(id) | |
3015 | +$i = function(id) | |
3016 | 3016 | {return document.getElementById(id);}; |
3017 | 3017 | //seta as variáveis navn e navm |
3018 | -var navn = false; | |
3019 | -var navm = false; | |
3020 | -var app = navigator.appName.substring(0,1); | |
3018 | +navn = false; | |
3019 | +navm = false; | |
3020 | +app = navigator.appName.substring(0,1); | |
3021 | 3021 | if (app==='N'){navn=true;}else{navm=true;} |
3022 | 3022 | OpenLayers.ImgPath = "../pacotes/openlayers/img/"; |
3023 | 3023 | OpenLayers.Lang.setCode("pt-BR"); | ... | ... |